Fix layout of add watcher fields on legacy wp view

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/2419/head
Alex Coles 10 years ago
parent 8df90c1e30
commit dae00cdf2f
  1. 6
      app/assets/stylesheets/legacy/_01_tables.sass
  2. 32
      app/views/watchers/_watchers.html.erb

@ -30,11 +30,7 @@
ul
margin: 0
padding: 0
select
width: 200px
display: block
float: left
margin-right: 10px
a.delete
opacity: 0.4
&:hover

@ -29,13 +29,15 @@ See doc/COPYRIGHT.rdoc for more details.
<% user_allowed_to_add_watchers = User.current.allowed_to?(:add_work_package_watchers, @project) %>
<strong><%= l(:label_work_package_watchers) %> (<%= watched.watcher_users.size %>)</strong>
<% if user_allowed_to_add_watchers %>
<%= toggle_link icon_wrapper('icon icon-add', l(:button_add_watcher)),
'new-watcher-form',
{ focus: 'watcher_user_id' },
{ :class => 'no-decoration-on-hover', :title => l(:button_add_watcher) } %>
<% end %>
<p>
<strong><%= l(:label_work_package_watchers) %> (<%= watched.watcher_users.size %>)</strong>
<% if user_allowed_to_add_watchers %>
<%= toggle_link icon_wrapper('icon icon-add', l(:button_add_watcher)),
'new-watcher-form',
{ focus: 'watcher_user_id' },
{ :class => 'no-decoration-on-hover', :title => l(:button_add_watcher) } %>
<% end %>
</p>
<%= form_for(:watcher,
url: watchers_path(watched.class.name.underscore.pluralize, watched),
@ -43,12 +45,16 @@ See doc/COPYRIGHT.rdoc for more details.
remote: true,
complete: "Form.Element.focus('watcher_user_id');",
html: { id: 'new-watcher-form', style: (@watcher ? '' : 'display:none;') }) do |f| %>
<p>
<%= f.select :user_id, (watched.addable_watcher_users.collect {|m| [m.name, m.id]}.sort_by{|name, id | name}), :prompt => "--- #{l(:actionview_instancetag_blank_option)} ---" %>
<%= submit_tag l(:button_add), class: 'button -highlight' %>
<%= toggle_link l(:button_cancel), 'new-watcher-form', {}, class: 'button' %>
</p>
<div class="grid-block">
<div class="grid-content small-6">
<%= f.select :user_id, (watched.addable_watcher_users.collect {|m| [m.name, m.id]}.sort_by{|name, id | name}),
{ :prompt => "--- #{l(:actionview_instancetag_blank_option)} ---" },
class: 'form--select' %>
<%= submit_tag l(:button_add), class: 'button -highlight' %>
<%= toggle_link l(:button_cancel), 'new-watcher-form', {}, class: 'button' %>
</div>
</div>
<% end %>
<%= watchers_list(watched) %>

Loading…
Cancel
Save