]> source.dussan.org Git - redmine.git/commitdiff
Display shared versions in project settings (#4357).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 8 Dec 2009 14:19:38 +0000 (14:19 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 8 Dec 2009 14:19:38 +0000 (14:19 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3133 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/settings/_versions.rhtml
public/images/link.png [new file with mode: 0644]
public/stylesheets/application.css

index 4fb5e937540047e487374d7f0431f1da62946399..2a6acc37c2728f94d00a2516b2527616f3d8c60d 100644 (file)
@@ -1,4 +1,4 @@
-<% if @project.versions.any? %>
+<% if @project.shared_versions.any? %>
 <table class="list versions">
        <thead>
     <th><%= l(:label_version) %></th>
     <th style="width:15%"></th>
     </thead>
        <tbody>
-<% for version in @project.versions.sort %>
-    <tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %>">
-    <td><%= link_to h(version.name), :controller => 'versions', :action => 'show', :id => version %></td>
-    <td align="center"><%= format_date(version.effective_date) %></td>
-    <td><%=h version.description %></td>
-    <td><%= l("version_status_#{version.status}") %></td>
-    <td><%=h format_version_sharing(version.sharing) %></td>
+<% for version in @project.shared_versions.sort %>
+    <tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %> <%= 'shared' if version.project != @project %>">
+    <td class="name"><%= link_to_version version %></td>
+    <td class="date"><%= format_date(version.effective_date) %></td>
+    <td class="description"><%=h version.description %></td>
+    <td class="status"><%= l("version_status_#{version.status}") %></td>
+    <td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
     <td><%= link_to(h(version.wiki_page_title), :controller => 'wiki', :page => Wiki.titleize(version.wiki_page_title)) unless version.wiki_page_title.blank? || @project.wiki.nil? %></td>
     <td class="buttons">
-       <%= link_to_if_authorized l(:button_edit),   {:controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %>
-       <%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
+       <% if version.project == @project %>
+               <%= link_to_if_authorized l(:button_edit),   {:controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %>
+               <%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
+       <% end %>
        </td>
     </tr>
 <% end; reset_cycle %>
diff --git a/public/images/link.png b/public/images/link.png
new file mode 100644 (file)
index 0000000..25eacb7
Binary files /dev/null and b/public/images/link.png differ
index 8f328a2daa4a2ddb6bcf91b9d12434f79af23840..afbee7638af404836334bdcf6e288bd0678ef37c 100644 (file)
@@ -125,6 +125,9 @@ tr.message.locked td.subject a { background-image: url(../images/locked.png); }
 tr.message.sticky td.subject a { background-image: url(../images/sticky.png); font-weight: bold; }
 
 tr.version.closed, tr.version.closed a { color: #999; }
+tr.version td.name { padding-left: 20px; }
+tr.version.shared td.name { background: url(../images/link.png) no-repeat 0% 70%; }
+tr.version td.date, tr.version td.status, tr.version td.sharing { text-align: center; }
 
 tr.user td { width:13%; }
 tr.user td.email { width:18%; }