5920_git.diff

Jean-Baptiste Barth, 2010-07-21 05:24

Download (5.75 KB)

View differences:

app/views/calendars/show.html.erb
50 50
<% end %>
51 51

  
52 52
<% content_for :sidebar do %>
53
    <%= render :partial => 'issues/sidebar' %>
54
<% end %>
53
  <%= render (@project ? 'issues/sidebar' : 'common/cross_sidebar') %>
54
<% end -%>
55 55

  
56 56
<% html_title(l(:label_calendar)) -%>
app/views/common/_cross_sidebar.html.erb
1
<h3><%=l(:label_project_plural) %></h3>
2
<%= link_to(l(:label_project_all), {:controller => 'projects'}) %><br />
3
<%= call_hook(:view_cross_sidebar_projects_bottom) %>
4

  
5
<h3><%=l(:label_issue_plural)%></h3>
6
<% if User.current.allowed_to?(:view_issues, nil, :global => true) -%>
7
  <%= link_to(l(:label_issue_view_all), {:controller => 'issues', :set_filter => 1}) %><br />
8
<% end -%>
9
<% if User.current.allowed_to?(:view_calendar, nil, :global => true) %>
10
  <%= link_to(l(:label_calendar), :controller => 'issues', :action => 'calendar') %><br />
11
<% end -%>
12
<% if User.current.allowed_to?(:view_gantt, nil, :global => true) %>
13
  <%= link_to(l(:label_gantt), :controller => 'gantts', :action => 'show') %><br />
14
<% end -%>
15
<%= call_hook(:view_cross_sidebar_issues_bottom) %>
16

  
17
<% unless sidebar_queries.empty? -%>
18
  <h3><%= l(:label_query_plural) %></h3>
19
  <% sidebar_queries.each do |query| -%>
20
    <%= link_to(h(query.name), :controller => 'issues', :action => 'index', :query_id => query) %><br />
21
  <% end -%>
22
<% end -%>
23

  
24
<% if User.current.allowed_to?(:view_time_entries, nil, :global => true) \
25
  && EnabledModule.first(:conditions => {:name => "time_tracking"}) %>
26
<h3><%=l(:label_time_entry_plural)%></h3>
27
<%= link_to(l(:label_overall_spent_time), {:controller => 'time_entries'}) %><br />
28
<% end -%>
29
<%= call_hook(:view_cross_sidebar_time_entries_bottom) %>
30

  
31
<h3><%=l(:label_activity) %></h3>
32
<%= link_to l(:label_overall_activity), {:controller => 'projects', :action => 'activity'} %><br />
app/views/gantts/show.html.erb
238 238
<% end # query.valid? %>
239 239

  
240 240
<% content_for :sidebar do %>
241
    <%= render :partial => 'issues/sidebar' %>
242
<% end %>
241
  <%= render (@project ? 'issues/sidebar' : 'common/cross_sidebar') %>
242
<% end -%>
243 243

  
244 244
<% html_title(l(:label_gantt)) -%>
app/views/issues/index.rhtml
73 73
<%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %>
74 74

  
75 75
<% content_for :sidebar do %>
76
    <%= render :partial => 'issues/sidebar' %>
77
<% end %>
76
  <%= render (@project ? 'issues/sidebar' : 'common/cross_sidebar') %>
77
<% end -%>
78 78

  
79 79
<% content_for :header_tags do %>
80 80
    <%= auto_discovery_link_tag(:atom, {:query_id => @query, :format => 'atom', :page => nil, :key => User.current.rss_key}, :title => l(:label_issue_plural)) %>
app/views/projects/activity.rhtml
43 43

  
44 44
<% content_for :sidebar do %>
45 45
<% form_tag({}, :method => :get) do %>
46
<h3><%= l(:label_activity) %></h3>
46
<% if @project -%>
47
  <h3><%= l(:label_activity) %></h3>
48
<% else -%>
49
  <%= render 'common/cross_sidebar' if @project.nil? %>
50
<% end -%>
47 51
<p><% @activity.event_types.each do |t| %>
48 52
<%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %>
49 53
<%= link_to(l("label_#{t.singularize}_plural"), {"show_#{t}" => 1, :user_id => params[:user_id]})%>
app/views/projects/index.rhtml
3 3
<% end %>
4 4

  
5 5
<div class="contextual">
6
    <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'add'}, :class => 'icon icon-add') + ' |' if User.current.allowed_to?(:add_project, nil, :global => true) %>
7
    <%= link_to(l(:label_issue_view_all), { :controller => 'issues' }) + ' |' if User.current.allowed_to?(:view_issues, nil, :global => true) %>
8
    <%= link_to(l(:label_overall_spent_time), { :controller => 'time_entries' }) + ' |' if User.current.allowed_to?(:view_time_entries, nil, :global => true) %>
9
    <%= link_to l(:label_overall_activity), { :controller => 'projects', :action => 'activity' }%>
6
    <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'add'}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
10 7
</div>
11 8

  
12 9
<h2><%=l(:label_project_plural)%></h2>
......
23 20
	<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
24 21
<% end %>
25 22

  
23
<% content_for :sidebar do -%>
24
  <%= render 'common/cross_sidebar' %>
25
<% end -%>
26 26
<% html_title(l(:label_project_plural)) -%>
app/views/timelog/details.rhtml
33 33
<% content_for :header_tags do %>
34 34
    <%= auto_discovery_link_tag(:atom, {:issue_id => @issue, :format => 'atom', :key => User.current.rss_key}, :title => l(:label_spent_time)) %>
35 35
<% end %>
36

  
37
<% if @project.nil? && @issue.nil? -%>
38
<% content_for :sidebar do -%>
39
  <%= render 'common/cross_sidebar' %>
40
<% end -%>
41
<% end -%>