]> source.dussan.org Git - redmine.git/commitdiff
Refactor: extract Members Box to partial.
authorEric Davis <edavis@littlestreamsoftware.com>
Thu, 19 Aug 2010 22:24:37 +0000 (22:24 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Thu, 19 Aug 2010 22:24:37 +0000 (22:24 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4009 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/_members_box.html.erb [new file with mode: 0644]
app/views/projects/show.rhtml

diff --git a/app/views/projects/_members_box.html.erb b/app/views/projects/_members_box.html.erb
new file mode 100644 (file)
index 0000000..dd8d93e
--- /dev/null
@@ -0,0 +1,8 @@
+  <% if @users_by_role.any? %>
+       <div class="members box">
+               <h3><%=l(:label_member_plural)%></h3>   
+               <p><% @users_by_role.keys.sort.each do |role| %>
+               <%=h role %>: <%= @users_by_role[role].sort.collect{|u| link_to_user u}.join(", ") %><br />
+               <% end %></p>
+       </div>
+       <% end %>
index fa97715212e7d93b3ea529a6620c22475dbd83aa..62ea27848e5d150d0ed84c569032f20ef47b6e69 100644 (file)
 </div>
 
 <div class="splitcontentright">
-  <% if @users_by_role.any? %>
-       <div class="members box">
-               <h3><%=l(:label_member_plural)%></h3>   
-               <p><% @users_by_role.keys.sort.each do |role| %>
-               <%=h role %>: <%= @users_by_role[role].sort.collect{|u| link_to_user u}.join(", ") %><br />
-               <% end %></p>
-       </div>
-       <% end %>
+  <%= render :partial => 'members_box' %>
     
   <% if @news.any? && authorize_for('news', 'index') %>
   <div class="news box">