modifs ergonomie adhérents

This commit is contained in:
Nicolas Bally 2013-03-18 23:50:14 +01:00
parent 8ca237d75a
commit 6c56628f91
12 changed files with 127 additions and 149 deletions

View File

@ -38,76 +38,6 @@ label {
.button{
display: inline-block;
background: #3c74a8;
background: -webkit-gradient(linear, 0% 100%, 0% 0%, from(rgb(239,242,242)), to(rgb(255,255,255)));
background: -moz-linear-gradient(bottom, rgb(239,242,242), rgb(255,255,255));
box-shadow: rgba(0,0,0, 0.4) 0px 0px 3px;
-moz-box-shadow: rgba(0,0,0, 0.4) 0px 0px 3px;
-webkit-box-shadow: rgba(0,0,0, 0.4) 0px 0px 3px;
border: none;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
color: RGB(46,46,46);
padding: 5px 15px;
margin:0px 5px 0px 5px;
font-weight:normal;
}
.button:hover {
box-shadow: rgba(0,0,0, 0.6) 0px 0px 5px;
-moz-box-shadow: rgba(0,0,0, 0.6) 0px 0px 5px;
-webkit-box-shadow: rgba(0,0,0, 0.6) 0px 0px 5px;
color: RGB(46,46,46);
cursor: pointer;
}
.actions{
text-align:right;
}
button,input[type=submit] {
display: inline-block;
background: #3c74a8;
background: -webkit-gradient(linear, 0% 100%, 0% 0%, from(rgb(60,116,168)), to(rgb(103,146,187)));
background: -moz-linear-gradient(bottom, rgb(60,116,168), rgb(103,146,187));
box-shadow: rgba(0,0,0, 0.4) 0px 0px 3px;
-moz-box-shadow: rgba(0,0,0, 0.4) 0px 0px 3px;
-webkit-box-shadow: rgba(0,0,0, 0.4) 0px 0px 3px;
border: none;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
color: white;
margin:0px 5px 0px 5px;
padding: 5px 15px;
text-shadow: 0 1px 1px rgba(0,0,0,0.6);
font-weight:normal;
font-size:13px;
}
button:hover,input[type=submit]:hover {
box-shadow: rgba(0,0,0, 0.6) 0px 0px 5px;
-moz-box-shadow: rgba(0,0,0, 0.6) 0px 0px 5px;
-webkit-box-shadow: rgba(0,0,0, 0.6) 0px 0px 5px;
cursor: pointer;
}
.field_with_errors{

View File

@ -465,7 +465,7 @@ label {
padding: 5px 15px;
padding: 7px 17px;
margin:0px 5px 0px 5px;
font-weight:normal;
@ -503,10 +503,10 @@ button,input[type=submit] {
margin:0px 5px 0px 5px;
padding: 5px 15px;
padding: 7px 17px;
text-shadow: 0 1px 1px rgba(0,0,0,0.6);
font-weight:normal;
font-size:13px;
}

View File

@ -39,8 +39,8 @@ background:#1b1b1b;
color:white;
}
@include border-radius(5px);
overflow:auto;
@include box-shadow(0px 0px 10px rgba(0,0,0,0.8));
position:fixed;
top:20px;
@ -48,15 +48,58 @@ left:20px;
right:20px;
bottom:20px;
background:white;
padding:10px;
.content{
padding:10px;
position:absolute;
top:40px;
bottom:0px;
left:0px;
right:0px;
overflow:auto;
}
}
#sheet_show{
@extend .sheet_window;
.links{
text-align:right;
position:absolute;
top:0px;
left:0px;
right:0px;
height:30px;
padding:10px;
}
}
.edit .links{
background:#FF6B00;
}
.show .links{
background : #a4bed6;
}
.new .links{
background : #95bc14;
}
#sheets_selecteds{
height: 300px;
overflow : auto;

View File

@ -21,8 +21,7 @@
%td{:style => "width:16%;text-align:right;"}
-if has_permission?('adherent.edit')
= link_to image_tag("/images/style/quartz-admin/delete.png"), :url => person, :method => :delete, :confirm => "Voulez-vous vraiment supprimer "+person.name.to_s+" de cette fiche ?", :remote => true
= link_to image_tag("/images/style/quartz-admin/edit.png"), edit_person_path(person), :remote => true
-if person == person.sheet.person
-img = image_tag("/images/style/quartz-admin/principal_active.png")
-else

View File

@ -1,7 +1,5 @@
#sheet_year.sheet_block{:id => sheet_year.id}
.links{:style => "float:right"}
= link_to image_tag("/images/style/quartz-admin/delete.png"), :url => sheet_year, :method => :delete, :remote => true, :confirm => "Voulez-vous vraiment supprimer l'année "+sheet_year.year.to_s+" de cette fiche ?" if has_permission?('adherent.edit')
= link_to image_tag("/images/style/quartz-admin/edit.png"), :url => edit_sheet_year_path(sheet_year), :method => :get, :remote => true if has_permission?('adherent.edit')
%h3=sheet_year.year
%p
Type d'adhésion :

View File

@ -1,10 +1,13 @@
#sheet_show
.links{:style => "float:right;"}
=link_to "Retour", @sheet, :class => "lien", :remote => true, :confirm => "Attention, les changements éventuellements apportés ne seront pas sauvegardés."
= link_to 'Fermer', "#", :onclick => "$('#sheet_show').remove();return false;"
%h1 Modifier une fiche
#sheet_show.edit
.links
=link_to "Détail", @sheet, :class => "button", :remote => true, :confirm => "Attention, les changements éventuellements apportés ne seront pas sauvegardés."
= link_to 'Fermer', "#",:class => "button", :onclick => "$('#sheet_show').remove();$('body').css('overflow', 'auto');return false;"
%input{:type => "submit", :onclick => "$(this).closest('#sheet_show').find('form').submit();return false;", :value => "Sauvegarder"}
.content
%h1 Modifier une fiche
= semantic_form_for [@sheet], :remote => true do |form|
= semantic_form_for [@sheet], :remote => true do |form|
=render :partial => "form", :locals => {:form => form}
=render :partial => "form", :locals => {:form => form}

View File

@ -1,2 +1,3 @@
$('#sheet_show').remove();
$('body').append("<%= escape_javascript(render(:template => "sheets/edit.html.haml")); %>");
$('body').append("<%= escape_javascript(render(:template => "sheets/edit.html.haml")); %>");
$("body").css("overflow", "hidden");

View File

@ -1,9 +1,11 @@
#sheet_show
#sheet_show.new
.links{:style => "float:right;"}
= link_to 'Retour', "#", :onclick => "$('#sheet_show').remove();return false;"
%h1 Nouvelle fiche
= link_to 'Retour', "#", :class => "button", :onclick => "$('#sheet_show').remove();return false;"
.content
%h1 Nouvelle fiche
= semantic_form_for [@sheet], :remote => true do |form|
= semantic_form_for [@sheet], :remote => true do |form|
=render :partial => "form", :locals => {:form => form}
=render :partial => "form", :locals => {:form => form}

View File

@ -1,2 +1,3 @@
$('#sheet_show').remove();
$('body').append("<%= escape_javascript(render(:template => "sheets/new.html.haml")); %>");
$('body').append("<%= escape_javascript(render(:template => "sheets/new.html.haml")); %>");
$("body").css("overflow", "hidden");

View File

@ -1,56 +1,56 @@
#sheet_show
.links{:style => "float:right;"}
= link_to 'Modifier', edit_sheet_path(@sheet), :method => :get, :remote => true
= link_to 'Fermer', "#", :onclick => "$('#sheet_show').remove();return false;"
%h1
Fiche n°
=@sheet.id
Adhérent depuis
=@sheet.first_year
="/"
=@sheet.last_year
-if @sheet.plume
%p{:style => "background:red;"} Souhaite recevoir la plume par courrier.
%h2 Cette adhésion regroupe :
= link_to 'Ajouter', :url => new_person_path(:sheet_id => @sheet), :update => "new_sheet_people", :method => :get, :remote => true #if has_permission?('adherent.edit')
#new_sheet_people
#sheet_peoples
=render @sheet.people
%h2 Informations principales
#sheet_detail.sheet_block=render :partial => "sheet_detail"
%h2 Années d'adhésion
#new_sheet_years
#sheet_years
=render @sheet.sheet_years
%h2 Dons
#new_donates
#donates
=render @sheet.donates
%br
%br
%br
#sheet_show.show
.links
= link_to 'Retour', sheets_path
= link_to 'Modifier', edit_sheet_path(@sheet), :class => "button", :method => :get, :remote => true
= link_to 'Fermer', "#", :class => "button", :onclick => "$('#sheet_show').remove();$('body').css('overflow', 'auto');return false;"
.content
%h1
Fiche n°
=@sheet.id
Adhérent depuis
=@sheet.first_year
="/"
=@sheet.last_year
-if @sheet.plume
%p{:style => "background:red;"} Souhaite recevoir la plume par courrier.
%h2 Cette adhésion regroupe :
= link_to 'Ajouter', :class => "button", :url => new_person_path(:sheet_id => @sheet), :update => "new_sheet_people", :method => :get, :remote => true #if has_permission?('adherent.edit')
#new_sheet_people
#sheet_peoples
=render @sheet.people
%h2 Informations principales
#sheet_detail.sheet_block=render :partial => "sheet_detail"
%h2 Années d'adhésion
#new_sheet_years
#sheet_years
=render @sheet.sheet_years
%h2 Dons
#new_donates
#donates
=render @sheet.donates
%br
%br
%br

View File

@ -1,2 +1,3 @@
$('#sheet_show').remove();
$('body').append("<%= escape_javascript(render(:template => "sheets/show.html.haml")); %>");
$('body').append("<%= escape_javascript(render(:template => "sheets/show.html.haml")); %>");
$("body").css("overflow", "hidden");

View File

@ -1,3 +1,3 @@
$('#sheet_show').remove();
$("body").css("overflow", "auto");
$('#sheet_line_<%= @sheet.id %>').replaceWith("<%= escape_javascript(render(@sheet)) %>");