Mercurial > hg > soundsoftware-site
changeset 1486:234d18ea18e9 redmine-2.4-integration
Semi-automatic merge of changes from upstream view files into plugin view files
author | Chris Cannam |
---|---|
date | Wed, 15 Jan 2014 13:46:51 +0000 |
parents | c8d3ad483bea |
children | e6d8c818a49d |
files | plugins/redmine_bibliography/app/views/activities/index.html.erb plugins/redmine_bibliography/app/views/projects/show.html.erb plugins/redmine_bibliography/app/views/users/show.html.erb |
diffstat | 3 files changed, 28 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/redmine_bibliography/app/views/activities/index.html.erb Wed Jan 15 13:34:12 2014 +0000 +++ b/plugins/redmine_bibliography/app/views/activities/index.html.erb Wed Jan 15 13:46:51 2014 +0000 @@ -15,15 +15,15 @@ <% @events_by_day.keys.sort.reverse.each do |day| %> <h3><%= format_activity_day(day) %></h3> <dl> -<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> +<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%> <%- if e.class != Publication -%> - <dt class="<%= e.event_type %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>"> + <dt class="<%= e.event_type %> <%= "grouped" if in_group %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>"> <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %> <span class="time"><%= format_time(e.event_datetime, false) %></span> <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %> <%= link_to format_activity_title(e.event_title), e.event_url %> </dt> - <dd> + <dd class="<%= "grouped" if in_group %>"> <span class="description"><%= format_activity_description(e.event_description) %></span> <span class="author"><%= link_to_user(e.event_author) if e.respond_to?(:event_author) %></span> </dd> @@ -74,11 +74,19 @@ <% content_for :sidebar do %> <% form_tag({}, :method => :get) do %> <h3><%= l(:label_activity) %></h3> -<p><% @activity.event_types.each do |t| %> -<%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %> -<label for="show_<%=t%>"><%= link_to(l("label_#{t.singularize}_plural"), {"show_#{t}" => 1, :user_id => params[:user_id]})%></label> -<br /> -<% end %></p> + +<ul> +<% @activity.event_types.each do |t| %> + <li> + <%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %> + <label for="show_<%=t%>"> + <%= link_to(l("label_#{t.singularize}_plural"), + {"show_#{t}" => 1, :user_id => params[:user_id], :from => params[:from]})%> + </label> + </li> +<% end %> +</ul> + <% if @project && @project.descendants.active.any? %> <%= hidden_field_tag 'with_subprojects', 0 %> <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p>
--- a/plugins/redmine_bibliography/app/views/projects/show.html.erb Wed Jan 15 13:34:12 2014 +0000 +++ b/plugins/redmine_bibliography/app/views/projects/show.html.erb Wed Jan 15 13:46:51 2014 +0000 @@ -1,6 +1,6 @@ <div class="contextual"> <% if User.current.allowed_to?(:add_subprojects, @project) %> - <%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'new', :parent_id => @project}, :class => 'icon icon-add' %> + <%= link_to l(:label_subproject_new), new_project_path(:parent_id => @project), :class => 'icon icon-add' %> <% end %> <% if User.current.allowed_to?(:close_project, @project) %> @@ -37,7 +37,7 @@ <% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= link_to h(@project.homepage), @project.homepage %></li><% end %> <% if @subprojects.any? %> <li><%=l(:label_subproject_plural)%>: - <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ").html_safe %></li> + <%= @subprojects.collect{|p| link_to p, project_path(p)}.join(", ").html_safe %></li> <% end %> </ul> </div> @@ -77,23 +77,21 @@ <h3><%=l(:label_issue_tracking)%></h3> <ul> <% for tracker in @trackers %> - <li><%= link_to h(tracker.name), :controller => 'issues', :action => 'index', :project_id => @project, - :set_filter => 1, - "tracker_id" => tracker.id %>: + <li><%= link_to h(tracker.name), project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>: <%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i, :total => @total_issues_by_tracker[tracker].to_i) %> </li> <% end %> </ul> <p> - <%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 %> + <%= link_to l(:label_issue_view_all), project_issues_path(@project, :set_filter => 1) %> <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %> - | <%= link_to(l(:label_calendar), :controller => 'calendars', :action => 'show', :project_id => @project) %> - <% end %> - <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %> - | <%= link_to(l(:label_gantt), :controller => 'gantts', :action => 'show', :project_id => @project) %> - <% end %> - </p> + | <%= link_to l(:label_calendar), project_calendar_path(@project) %> + <% end %> + <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %> + | <%= link_to l(:label_gantt), project_gantt_path(@project) %> + <% end %> + </p> </div> <% end %> <%= call_hook(:view_projects_show_left, :project => @project) %> @@ -109,7 +107,7 @@ <div class="news box"> <h3><%=l(:label_news_latest)%></h3> <%= render :partial => 'news/news', :collection => @news %> - <p><%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %></p> + <p><%= link_to l(:label_news_view_all), project_news_index_path(@project) %></p> </div> <% end %>
--- a/plugins/redmine_bibliography/app/views/users/show.html.erb Wed Jan 15 13:34:12 2014 +0000 +++ b/plugins/redmine_bibliography/app/views/users/show.html.erb Wed Jan 15 13:46:51 2014 +0000 @@ -72,7 +72,7 @@ <h3><%= link_to l(:label_activity), :controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :from => @events_by_day.keys.first %></h3> <p> -<%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %> +<%=l(:label_reported_issues)%>: <%= Issue.where(:author_id => @user.id).count %> </p> <div id="activity">