private_issues.v.0.7-0.9.3_changes.diff

changes made to private_issues.v.0.7-0.9.3.patch - Wytze Keuning, 2010-04-28 23:15

Download (3.25 KB)

View differences:

/opt/bitnami/apps/redmine/app/controllers/projects_controller.rb 2010-04-28 17:01:39.000000000 +0000
137 137
    @open_issues_by_tracker = Issue.visible.count(:group => :tracker,
138 138
                                            :include => [:project, :status, :tracker],
139 139
                                            :conditions => ["(#{cond}) AND #{IssueStatus.table_name}.is_closed=?", false])
140
    @private_issues_by_tracker = Issue.count(:group => :tracker,
140
    @total_private_issues_by_tracker = Issue.count(:group => :tracker,
141
                                             :include => [:project, :status, :tracker],
142
                                             :conditions => ["(#{cond}) AND #{Issue.table_name}.is_private=?", true])
143
    @open_private_issues_by_tracker = Issue.count(:group => :tracker,
141 144
                                             :include => [:project, :status, :tracker],
142 145
                                             :conditions => ["(#{cond}) AND #{IssueStatus.table_name}.is_closed=? AND #{Issue.table_name}.is_private=?", false, true])
143 146
    @total_issues_by_tracker = Issue.visible.count(:group => :tracker,
/opt/bitnami/apps/redmine/app/views/projects/show.rhtml 2010-04-28 14:50:46.000000000 +0000
29 29
      <li><%= link_to tracker.name, :controller => 'issues', :action => 'index', :project_id => @project,
30 30
                                                :set_filter => 1,
31 31
                                                "tracker_id" => tracker.id %>:
32
           <% if User.current.allowed_to?(:view_private_issues, @project) %>
32 33
           <%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i,
33
                                                                                                                                       :total => @total_issues_by_tracker[tracker].to_i) %>
34
        (<%= @private_issues_by_tracker[tracker] || 0 %> <%= l(:label_private_issues, @private_issues_by_tracker[tracker] || 0) %>)
34
                                                                                                                                       :total => (@total_issues_by_tracker[tracker].to_i)) %>
35
        (<%= @total_private_issues_by_tracker[tracker] || 0 %> <%= l(:label_private_issues, @total_private_issues_by_tracker[tracker] || 0) %>)
36
              <% else %>
37
            <%= l(:label_x_open_issues_abbr_on_total, :count => (@open_issues_by_tracker[tracker].to_i)-(@open_private_issues_by_tracker[tracker] || 0),
38
                                                                                                                                       :total => (@total_issues_by_tracker[tracker].to_i)-(@total_private_issues_by_tracker[tracker] || 0)) %>
39
            <% end %>
35 40
     </li>
36 41
    <% end %>
37 42
    </ul>