Display a projects tree instead of a flat list in notification preferences (#11539).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10189 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-08-10 17:30:35 +00:00
parent 0a6c1d9c13
commit c0c491dd61
3 changed files with 18 additions and 15 deletions

View File

@ -13,7 +13,9 @@
<h2><%=l(:label_project_plural)%></h2> <h2><%=l(:label_project_plural)%></h2>
<div id="projects-index">
<%= render_project_hierarchy(@projects)%> <%= render_project_hierarchy(@projects)%>
</div>
<% if User.current.logged? %> <% if User.current.logged? %>
<p style="text-align:right;"> <p style="text-align:right;">

View File

@ -9,17 +9,15 @@
</p> </p>
<%= content_tag 'div', :id => 'notified-projects', :style => (@user.mail_notification == 'selected' ? '' : 'display:none;') do %> <%= content_tag 'div', :id => 'notified-projects', :style => (@user.mail_notification == 'selected' ? '' : 'display:none;') do %>
<p> <p>
<% @user.projects.each do |project| %> <%= render_project_nested_lists(@user.projects) do |project|
<label> content_tag('label',
<%= check_box_tag( check_box_tag(
'notified_project_ids[]', 'notified_project_ids[]',
project.id, project.id,
@user.notified_projects_ids.include?(project.id) @user.notified_projects_ids.include?(project.id)
) %> ) + ' ' + h(project.name)
<%= h(project.name) %> )
</label> end %>
<br />
<% end %>
</p> </p>
<p><em class="info"><%= l(:text_user_mail_option) %></em></p> <p><em class="info"><%= l(:text_user_mail_option) %></em></p>
<% end %> <% end %>

View File

@ -412,12 +412,15 @@ form .attributes select { width: 60%; }
input#issue_subject { width: 99%; } input#issue_subject { width: 99%; }
select#issue_done_ratio { width: 95px; } select#issue_done_ratio { width: 95px; }
ul.projects { margin: 0; padding-left: 1em; } ul.projects {margin:0; padding-left:1em;}
ul.projects.root { margin: 0; padding: 0; } ul.projects.root {margin:0; padding:0;}
ul.projects ul.projects { border-left: 3px solid #e0e0e0; } ul.projects li {list-style-type:none;}
ul.projects li.root { list-style-type:none; margin-bottom: 1em; }
ul.projects li.child { list-style-type:none; margin-top: 1em;} #projects-index ul.projects ul.projects { border-left: 3px solid #e0e0e0; }
ul.projects div.root a.project { font-family: "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: 16px; margin: 0 0 10px 0; } #projects-index ul.projects li.root {margin-bottom: 1em;}
#projects-index ul.projects li.child {margin-top: 1em;}
#projects-index ul.projects div.root a.project { font-family: "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: 16px; margin: 0 0 10px 0; }
#notified-projects ul.projects ul {padding-left:1.6em;}
.my-project { padding-left: 18px; background: url(../images/fav.png) no-repeat 0 50%; } .my-project { padding-left: 18px; background: url(../images/fav.png) no-repeat 0 50%; }
#tracker_project_ids ul { margin: 0; padding-left: 1em; } #tracker_project_ids ul { margin: 0; padding-left: 1em; }