Removed duplicated helper (#11539).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10191 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
32fcdff69f
commit
145e5997b2
|
@ -203,7 +203,7 @@ module ApplicationHelper
|
|||
if projects.any?
|
||||
ancestors = []
|
||||
original_project = @project
|
||||
projects.each do |project|
|
||||
projects.sort_by(&:lft).each do |project|
|
||||
# set the project environment to please macros.
|
||||
@project = project
|
||||
if (ancestors.empty? || project.is_descendant_of?(ancestors.last))
|
||||
|
@ -302,30 +302,6 @@ module ApplicationHelper
|
|||
Project.project_tree(projects, &block)
|
||||
end
|
||||
|
||||
def project_nested_ul(projects, &block)
|
||||
s = ''
|
||||
if projects.any?
|
||||
ancestors = []
|
||||
projects.sort_by(&:lft).each do |project|
|
||||
if (ancestors.empty? || project.is_descendant_of?(ancestors.last))
|
||||
s << "<ul>\n"
|
||||
else
|
||||
ancestors.pop
|
||||
s << "</li>"
|
||||
while (ancestors.any? && !project.is_descendant_of?(ancestors.last))
|
||||
ancestors.pop
|
||||
s << "</ul></li>\n"
|
||||
end
|
||||
end
|
||||
s << "<li>"
|
||||
s << yield(project).to_s
|
||||
ancestors << project
|
||||
end
|
||||
s << ("</li></ul>\n" * ancestors.size)
|
||||
end
|
||||
s.html_safe
|
||||
end
|
||||
|
||||
def principals_check_box_tags(name, principals)
|
||||
s = ''
|
||||
principals.sort.each do |principal|
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<div class="splitcontentright">
|
||||
<% if @projects.any? %>
|
||||
<fieldset class="box" id="tracker_project_ids"><legend><%= l(:label_project_plural) %></legend>
|
||||
<%= project_nested_ul(@projects) do |p|
|
||||
<%= render_project_nested_lists(@projects) do |p|
|
||||
content_tag('label', check_box_tag('tracker[project_ids][]', p.id, @tracker.projects.include?(p), :id => nil) + ' ' + h(p))
|
||||
end %>
|
||||
<%= hidden_field_tag('tracker[project_ids][]', '', :id => nil) %>
|
||||
|
|
|
@ -413,19 +413,16 @@ input#issue_subject { width: 99%; }
|
|||
select#issue_done_ratio { width: 95px; }
|
||||
|
||||
ul.projects {margin:0; padding-left:1em;}
|
||||
ul.projects ul {padding-left:1.6em;}
|
||||
ul.projects.root {margin:0; padding:0;}
|
||||
ul.projects li {list-style-type:none;}
|
||||
|
||||
#projects-index ul.projects ul.projects { border-left: 3px solid #e0e0e0; }
|
||||
#projects-index ul.projects ul.projects { border-left: 3px solid #e0e0e0; padding-left:1em;}
|
||||
#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%; }
|
||||
|
||||
#tracker_project_ids ul { margin: 0; padding-left: 1em; }
|
||||
#tracker_project_ids li { list-style-type:none; }
|
||||
|
||||
#related-issues li img {vertical-align:middle;}
|
||||
|
||||
ul.properties {padding:0; font-size: 0.9em; color: #777;}
|
||||
|
|
Loading…
Reference in New Issue