Commit e531dd970fd7ca899ee9e7757812b8bda446d593
1 parent
72324796
Exists in
master
and in
23 other branches
ActionItem235: new friend tasks are beaulty now
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1574 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
5 changed files
with
84 additions
and
32 deletions
Show diff stats
app/views/tasks/_add_friend.rhtml
| 1 | 1 | <h2><%= _('New friend') %></h2> |
| 2 | 2 | |
| 3 | -<p> | |
| 4 | -<%= _('%s wants to connect to you as a friend.') % task.requestor.name %> | |
| 5 | -</p> | |
| 3 | +<%= link_to( profile_image(task.requestor, :minor, :border => 0), task.requestor.public_profile_url ) %> | |
| 4 | + | |
| 5 | +<%= _('%s wants to connect to you as a friend.') % link_to( task.requestor.name, task.requestor.public_profile_url ) %> | |
| 6 | 6 | |
| 7 | 7 | <% form_for('task', task, :url => { :action => 'close', :id => task.id } ) do |f| %> |
| 8 | 8 | |
| 9 | 9 | <div> |
| 10 | - <%= radio_button_tag(:decision, 'finish', true, :id => "decision-finish-#{task.id}", :onclick => "Element.show('group-for-friend-#{task.id}')") %> | |
| 11 | - <%= _('Accept') %> | |
| 10 | + | |
| 11 | + <%= radio_button_tag(:decision, 'finish', true, | |
| 12 | + :id => "decision-finish-#{task.id}", | |
| 13 | + :onclick => "Element.show('group-for-friend-#{task.id}')") %> | |
| 14 | + <label for="<%= "decision-finish-#{task.id}" %>"><%= _('Accept') %></label> | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + <%= radio_button_tag(:decision, 'cancel', false, | |
| 19 | + :id => "decision-cancel-#{task.id}", | |
| 20 | + :onclick => "Element.hide('group-for-friend-#{task.id}')") %> | |
| 21 | + <label for="<%= "decision-cancel-#{task.id}" %>"><%= _('Ignore') %></label> | |
| 12 | 22 | |
| 13 | 23 | <% |
| 14 | - content_tag('div', :id => "group-for-friend-#{task.id}", :help => _('You can type the first letters of an existing group and have the system present you the available options, or you can type the name of a new group if you want.')) do %> | |
| 15 | - <%= _('Classify your new friend %s:') % task.requestor.name %> | |
| 16 | - <%= text_field_with_local_autocomplete("task[group_for_friend]", profile.suggested_friend_groups, :id => "field-group-for-friend-#{task.id}") %> | |
| 17 | - <p> | |
| 24 | + content_tag('div', :id => "group-for-friend-#{task.id}", | |
| 25 | + :help => _('You can type the first letters of an existing group and have the system present you the available options, or you can type the name of a new group if you want.')) do %> | |
| 26 | + <%= _('Classify your new friend:') %> | |
| 27 | + <%= text_field_with_local_autocomplete("task[group_for_friend]", | |
| 28 | + profile.suggested_friend_groups, | |
| 29 | + :id => "field-group-for-friend-#{task.id}") %> | |
| 30 | + <p class="friend-classify-suggestions"> | |
| 18 | 31 | <%= _('Suggestions: %s') % profile.suggested_friend_groups.join(', ') %> |
| 19 | 32 | </p> |
| 20 | 33 | |
| 21 | 34 | <% end %> |
| 22 | 35 | </div> |
| 23 | 36 | |
| 24 | - <div> | |
| 25 | - <%= radio_button_tag(:decision, 'cancel', false, :id => "decision-cancel-#{task.id}", :onclick => "Element.hide('group-for-friend-#{task.id}')") %> | |
| 26 | - <%= _('Ignore') %> | |
| 27 | - </div> | |
| 28 | - | |
| 29 | 37 | <% button_bar do %> |
| 30 | - <%= submit_button(:ok, _('OK')) %> | |
| 38 | + <%= submit_button(:ok, _('Ok!')) %> | |
| 31 | 39 | <% end %> |
| 32 | 40 | <% end %> | ... | ... |
app/views/tasks/index.rhtml
| 1 | 1 | <h1><%= _("%s's pending tasks") % profile.name %></h1> |
| 2 | 2 | |
| 3 | +<p> | |
| 3 | 4 | <% if @tasks.empty? %> |
| 4 | - <p><em><%= _('No pending tasks for %s' % profile.name) %></em></p> | |
| 5 | + <em><%= _('No pending tasks for %s' % profile.name) %></em> | |
| 5 | 6 | <% else %> |
| 6 | 7 | <ul class='task-list'> |
| 7 | 8 | <% @tasks.each do |item| %> |
| 8 | - <li><%= render :partial => partial_for_class(item.class), :locals => { :task => item } %></li> | |
| 9 | + <li class="task-<%= item.class %>"><%= render :partial => partial_for_class(item.class), :locals => { :task => item } %></li> | |
| 9 | 10 | <% end %> |
| 10 | 11 | </ul> |
| 11 | 12 | <% end %> |
| 13 | +</p> | |
| 12 | 14 | |
| 13 | 15 | <% button_bar do %> |
| 14 | 16 | <%= button(:edit, _('View processed tasks'), :action => 'processed') %> | ... | ... |
app/views/tasks/processed.rhtml
| 1 | 1 | <h1><%= _("%s's processed tasks") % profile.name %></h1> |
| 2 | 2 | |
| 3 | +<p> | |
| 3 | 4 | <% if @tasks.empty? %> |
| 4 | - <p><em><%= _('No processed tasks.') %></em></p> | |
| 5 | + <em><%= _('No processed tasks.') %></em> | |
| 5 | 6 | <% else %> |
| 6 | 7 | <ul> |
| 7 | 8 | <% @tasks.each do |item| %> |
| 8 | 9 | <li> |
| 9 | - <table> | |
| 10 | - <tr> | |
| 11 | - <th><%= _('Task') %></th> | |
| 12 | - <td><%= item.description %></td> | |
| 13 | - </tr> | |
| 14 | - <tr> | |
| 15 | - <th><%= _('Created') %></th> | |
| 16 | - <td><%= show_date (item.created_at) %></th> | |
| 17 | - </tr> | |
| 18 | - <tr> | |
| 19 | - <th><%= _('Processed') %></th> | |
| 20 | - <td><%= show_date (item.end_date) %></th> | |
| 21 | - </tr> | |
| 22 | - </table> | |
| 10 | + <strong><%= item.description %></strong> <br/> | |
| 11 | + <small> | |
| 12 | + <%= _('Created:') +' '+ show_date(item.created_at) %> | |
| 13 | + — | |
| 14 | + <%= _('Processed:') +' '+ show_date(item.end_date) %> | |
| 15 | + </small> | |
| 23 | 16 | </li> |
| 24 | 17 | <% end %> |
| 25 | 18 | </ul> |
| 26 | 19 | <% end %> |
| 20 | +</p> | |
| 27 | 21 | |
| 28 | 22 | <% button_bar do %> |
| 29 | 23 | <%= button(:back, _('Back'), :action => 'index') %> | ... | ... |
public/designs/themes/default/stylesheets/controller_tasks.css
0 → 100644
| ... | ... | @@ -0,0 +1,36 @@ |
| 1 | + | |
| 2 | +#content .task-list li { | |
| 3 | + margin: 10px 20px 10px 10px; | |
| 4 | + padding: 0px 10px; | |
| 5 | + list-style: none; | |
| 6 | + border: 1px solid #3465A4; | |
| 7 | + background: #B8CFE7; | |
| 8 | +} | |
| 9 | + | |
| 10 | +.task-AddFriend h2 { | |
| 11 | + text-align: center; | |
| 12 | +} | |
| 13 | + | |
| 14 | +.task-AddFriend img { | |
| 15 | + position: relative; /* msie sux */ | |
| 16 | + float: left; | |
| 17 | + margin-right: 10px; | |
| 18 | +} | |
| 19 | + | |
| 20 | +.task-AddFriend form { | |
| 21 | + margin: 5px 0px; | |
| 22 | +} | |
| 23 | + | |
| 24 | +.friend-classify-suggestions { | |
| 25 | + font-size: 10px; | |
| 26 | +} | |
| 27 | + | |
| 28 | +.task-AddFriend .submit { | |
| 29 | + position: relative; | |
| 30 | + top: -5px; | |
| 31 | + float: right; | |
| 32 | +} | |
| 33 | +.msie .task-AddFriend .submit { | |
| 34 | + top: -10px; | |
| 35 | +} | |
| 36 | + | ... | ... |