Project

General

Profile

Feature #22090 » 0001-Adds-Settings-icon-to-contextual-area-for-project-vi.patch

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

View differences:

app/views/boards/index.html.erb
<div class="contextual">
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_boards, @project) %>
</div>
<h2><%= l(:label_board_plural) %></h2>
<table class="list boards">
app/views/boards/show.html.erb
:class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.allowed_to?(:add_messages, @board.project) %>
<%= watcher_link(@board, User.current) %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_boards, @project) %>
</div>
<div id="add-message" style="display:none;">
app/views/issues/index.html.erb
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
<%= delete_link query_path(@query) %>
<% end %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_categories, @project) %>
</div>
<h2><%= @query.new_record? ? l(:label_issue_plural) : @query.name %></h2>
......
<% end %>
<div id="csv-export-options" style="display:none;">
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
<%= form_tag(params.merge({:format => 'csv',:page=>nil}), :method => :get, :id => 'csv-export-form') do %>
<p>
<label><%= radio_button_tag 'csv[columns]', '', true %> <%= l(:description_selected_columns) %></label><br />
app/views/projects/show.html.erb
<%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %>
<% end %>
<% end %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project},
:class => 'icon icon-settings' if User.current.allowed_to?(:edit_project, @project) %>
</div>
<h2><%=l(:label_overview)%></h2>
app/views/repositories/_navigation.html.erb
{:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
:class => 'icon icon-stats' if @repository.supports_all_revisions? %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'repositories'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_repository, @project) %>
<%= form_tag({:action => controller.action_name,
:id => @project,
:repository_id => @repository.identifier_param,
app/views/timelog/index.html.erb
<%= link_to l(:button_log_time),
_new_time_entry_path(@project, @issue),
:class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project, :global => true) %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'activities'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_project_activities, @project) %>
</div>
<%= render_timelog_breadcrumb %>
app/views/timelog/new.html.erb
<div class="contextual">
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'activities'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_project_activities, @project) %>
</div>
<h2><%= l(:label_spent_time) %></h2>
<%= labelled_form_for @time_entry, :url => time_entries_path do |f| %>
app/views/timelog/report.html.erb
<%= link_to l(:button_log_time),
_new_time_entry_path(@project, @issue),
:class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project, :global => true) %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'activities'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_project_activities, @project) %>
</div>
<%= render_timelog_breadcrumb %>
app/views/versions/index.html.erb
<div class="contextual">
<%= link_to(l(:label_version_new), new_project_version_path(@project),
:class => 'icon icon-add') if User.current.allowed_to?(:manage_versions, @project) %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'versions'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_versions, @project) %>
</div>
<h2><%=l(:label_roadmap)%></h2>
app/views/wiki/index.html.erb
<div class="contextual">
<%= watcher_link(@wiki, User.current) %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'wiki'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_wiki, @project) %>
</div>
<h2><%= l(:label_index_by_title) %></h2>
app/views/wiki/show.html.erb
<% end %>
<% end %>
<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'wiki'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_wiki, @project) %>
</div>
<%= wiki_page_breadcrumb(@page) %>
public/stylesheets/application.css
.icon-ok { background-image: url(../images/true.png); }
.icon-not-ok { background-image: url(../images/false.png); }
.icon-link-break { background-image: url(../images/link_break.png); }
.icon-settings { background-image: url(../images/changeset.png); }
.icon-file { background-image: url(../images/files/default.png); }
.icon-file.text-plain { background-image: url(../images/files/text.png); }
(2-2/3)