0001-Adds-Settings-icon-to-contextual-area-for-project-vi.patch

Jan from Planio www.plan.io, 2016-02-19 13:06

Download (9.38 KB)

View differences:

app/views/boards/index.html.erb
1
<div class="contextual">
2
  <%= link_to_if_authorized l(:label_settings),
3
              {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'},
4
              :class => 'icon icon-settings' if User.current.allowed_to?(:manage_boards, @project) %>
5
</div>
6

  
1 7
<h2><%= l(:label_board_plural) %></h2>
2 8

  
3 9
<table class="list boards">
app/views/boards/show.html.erb
6 6
            :class => 'icon icon-add',
7 7
            :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.allowed_to?(:add_messages, @board.project) %>
8 8
<%= watcher_link(@board, User.current) %>
9
<%= link_to_if_authorized l(:label_settings),
10
            {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'},
11
            :class => 'icon icon-settings' if User.current.allowed_to?(:manage_boards, @project) %>
12

  
9 13
</div>
10 14

  
11 15
<div id="add-message" style="display:none;">
app/views/issues/index.html.erb
3 3
  <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
4 4
  <%= delete_link query_path(@query) %>
5 5
<% end %>
6
<%= link_to_if_authorized l(:label_settings),
7
            {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories'},
8
            :class => 'icon icon-settings' if User.current.allowed_to?(:manage_categories, @project) %>
9

  
6 10
</div>
7 11

  
8 12
<h2><%= @query.new_record? ? l(:label_issue_plural) : @query.name %></h2>
......
76 80
<% end %>
77 81

  
78 82
<div id="csv-export-options" style="display:none;">
79
  <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>  
83
  <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
80 84
  <%= form_tag(params.merge({:format => 'csv',:page=>nil}), :method => :get, :id => 'csv-export-form') do %>
81 85
  <p>
82 86
    <label><%= radio_button_tag 'csv[columns]', '', true %> <%= l(:description_selected_columns) %></label><br />
app/views/projects/show.html.erb
9 9
      <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %>
10 10
    <% end %>
11 11
  <% end %>
12
  <%= link_to_if_authorized l(:label_settings),
13
              {:controller => 'projects', :action => 'settings', :id => @project},
14
              :class => 'icon icon-settings' if User.current.allowed_to?(:edit_project, @project) %>
15

  
12 16
</div>
13 17

  
14 18
<h2><%=l(:label_overview)%></h2>
app/views/repositories/_navigation.html.erb
6 6
            {:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
7 7
            :class => 'icon icon-stats' if @repository.supports_all_revisions? %>
8 8

  
9
<%= link_to_if_authorized l(:label_settings),
10
            {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'repositories'},
11
            :class => 'icon icon-settings' if User.current.allowed_to?(:manage_repository, @project) %>
12

  
9 13
<%= form_tag({:action => controller.action_name,
10 14
             :id => @project,
11 15
             :repository_id => @repository.identifier_param,
app/views/timelog/index.html.erb
2 2
<%= link_to l(:button_log_time), 
3 3
            _new_time_entry_path(@project, @issue),
4 4
            :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project, :global => true) %>
5
<%= link_to_if_authorized l(:label_settings),
6
            {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'activities'},
7
            :class => 'icon icon-settings' if User.current.allowed_to?(:manage_project_activities, @project) %>
5 8
</div>
6 9

  
7 10
<%= render_timelog_breadcrumb %>
app/views/timelog/new.html.erb
1
<div class="contextual">
2
  <%= link_to_if_authorized l(:label_settings),
3
              {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'activities'},
4
              :class => 'icon icon-settings' if User.current.allowed_to?(:manage_project_activities, @project) %>
5
</div>
6

  
1 7
<h2><%= l(:label_spent_time) %></h2>
2 8

  
3 9
<%= labelled_form_for @time_entry, :url => time_entries_path do |f| %>
app/views/timelog/report.html.erb
2 2
<%= link_to l(:button_log_time), 
3 3
            _new_time_entry_path(@project, @issue),
4 4
            :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project, :global => true) %>
5
<%= link_to_if_authorized l(:label_settings),
6
            {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'activities'},
7
            :class => 'icon icon-settings' if User.current.allowed_to?(:manage_project_activities, @project) %>
5 8
</div>
6 9

  
7 10
<%= render_timelog_breadcrumb %>
app/views/versions/index.html.erb
1 1
<div class="contextual">
2 2
  <%= link_to(l(:label_version_new), new_project_version_path(@project),
3 3
              :class => 'icon icon-add') if User.current.allowed_to?(:manage_versions, @project) %>
4
  <%= link_to_if_authorized l(:label_settings),
5
              {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'versions'},
6
              :class => 'icon icon-settings' if User.current.allowed_to?(:manage_versions, @project) %>
4 7
</div>
5 8

  
6 9
<h2><%=l(:label_roadmap)%></h2>
app/views/wiki/index.html.erb
1 1
<div class="contextual">
2 2
<%= watcher_link(@wiki, User.current) %>
3
<%= link_to_if_authorized l(:label_settings),
4
            {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'wiki'},
5
            :class => 'icon icon-settings' if User.current.allowed_to?(:manage_wiki, @project) %>
3 6
</div>
4 7

  
5 8
<h2><%= l(:label_index_by_title) %></h2>
app/views/wiki/show.html.erb
12 12
<% end %>
13 13
<% end %>
14 14
<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
15
<%= link_to_if_authorized l(:label_settings),
16
            {:controller => 'projects', :action => 'settings', :id => @project, :tab => 'wiki'},
17
            :class => 'icon icon-settings' if User.current.allowed_to?(:manage_wiki, @project) %>
15 18
</div>
16 19

  
17 20
<%= wiki_page_breadcrumb(@page) %>
public/stylesheets/application.css
1151 1151
.icon-ok { background-image: url(../images/true.png); }
1152 1152
.icon-not-ok { background-image: url(../images/false.png); }
1153 1153
.icon-link-break { background-image: url(../images/link_break.png); }
1154
.icon-settings { background-image: url(../images/changeset.png); }
1154 1155

  
1155 1156
.icon-file { background-image: url(../images/files/default.png); }
1156 1157
.icon-file.text-plain { background-image: url(../images/files/text.png); }
1157
-