mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-03 23:53:23 +00:00
Renames and improves methods provided by @IconsHelper@ (#23980).
git-svn-id: https://svn.redmine.org/redmine/trunk@23145 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ffb78c12c3
commit
d1008280d8
@ -143,7 +143,7 @@ module ApplicationHelper
|
||||
options[:only_path] = true unless options.key?(:only_path)
|
||||
url = send(route_method, attachment, options)
|
||||
|
||||
label = icon ? icon_with_label(icon, text) : text
|
||||
label = icon ? sprite_icon(icon, text) : text
|
||||
link_to label, url, html_options
|
||||
end
|
||||
|
||||
@ -657,7 +657,7 @@ module ApplicationHelper
|
||||
check_box_tag(name, principal.id, false, :id => nil) +
|
||||
(avatar(principal, :size => 16).presence ||
|
||||
content_tag(
|
||||
'span', icon_for_principal(principal.class.name.downcase),
|
||||
'span', principal_icon(principal.class.name.downcase),
|
||||
:class => "name icon icon-#{principal.class.name.downcase}"
|
||||
)
|
||||
) + principal.to_s
|
||||
@ -769,7 +769,7 @@ module ApplicationHelper
|
||||
:reorder_url => options[:url] || url_for(object),
|
||||
:reorder_param => options[:param] || object.class.name.underscore
|
||||
}
|
||||
content_tag('span', icon_with_label('reorder', ''),
|
||||
content_tag('span', sprite_icon('reorder', ''),
|
||||
:class => "icon-only icon-sort-handle sort-handle",
|
||||
:data => data,
|
||||
:title => l(:button_sort))
|
||||
@ -849,7 +849,7 @@ module ApplicationHelper
|
||||
content = capture(&)
|
||||
if content.present?
|
||||
trigger =
|
||||
content_tag('span', icon_with_label('3-bullets', l(:button_actions)), :class => 'icon-only icon-actions',
|
||||
content_tag('span', sprite_icon('3-bullets', l(:button_actions)), :class => 'icon-only icon-actions',
|
||||
:title => l(:button_actions))
|
||||
trigger = content_tag('span', trigger, :class => 'drdn-trigger')
|
||||
content = content_tag('div', content, :class => 'drdn-items')
|
||||
@ -1390,7 +1390,7 @@ module ApplicationHelper
|
||||
content_tag(
|
||||
'div',
|
||||
link_to(
|
||||
icon_with_label('edit', l(:button_edit_section)),
|
||||
sprite_icon('edit', l(:button_edit_section)),
|
||||
options[:edit_section_links].merge(
|
||||
:section => @current_section),
|
||||
:class => 'icon-only icon-edit'),
|
||||
@ -1584,7 +1584,7 @@ module ApplicationHelper
|
||||
:class => 'icon icon-del'
|
||||
}.merge(options)
|
||||
|
||||
link_to icon_with_label('del', button_name), url, options
|
||||
link_to sprite_icon('del', button_name), url, options
|
||||
end
|
||||
|
||||
def link_to_function(name, function, html_options={})
|
||||
@ -1592,7 +1592,7 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def link_to_context_menu
|
||||
link_to icon_with_label('3-bullets', l(:button_actions)), '#', title: l(:button_actions), class: 'icon-only icon-actions js-contextmenu '
|
||||
link_to sprite_icon('3-bullets', l(:button_actions)), '#', title: l(:button_actions), class: 'icon-only icon-actions js-contextmenu '
|
||||
end
|
||||
|
||||
# Helper to render JSON in views
|
||||
@ -1619,7 +1619,7 @@ module ApplicationHelper
|
||||
def toggle_checkboxes_link(selector, options={})
|
||||
css_classes = 'icon icon-checked'
|
||||
css_classes += ' ' + options[:class] if options[:class]
|
||||
link_to_function icon_with_label('checked', ''),
|
||||
link_to_function sprite_icon('checked', ''),
|
||||
"toggleCheckboxesBySelector('#{selector}')",
|
||||
:title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
|
||||
:class => css_classes
|
||||
@ -1924,7 +1924,7 @@ module ApplicationHelper
|
||||
|
||||
def copy_object_url_link(url)
|
||||
link_to_function(
|
||||
icon_with_label('copy-link', l(:button_copy_link)), 'copyTextToClipboard(this);',
|
||||
sprite_icon('copy-link', l(:button_copy_link)), 'copyTextToClipboard(this);',
|
||||
class: 'icon icon-copy-link',
|
||||
data: {'clipboard-text' => url}
|
||||
)
|
||||
|
||||
@ -22,14 +22,14 @@ module EmailAddressesHelper
|
||||
def toggle_email_address_notify_link(address)
|
||||
if address.notify?
|
||||
link_to(
|
||||
icon_with_label('email', l(:label_disable_notifications)),
|
||||
sprite_icon('email', l(:label_disable_notifications)),
|
||||
user_email_address_path(address.user, address, :notify => '0'),
|
||||
:method => :put, :remote => true,
|
||||
:title => l(:label_disable_notifications),
|
||||
:class => 'icon-only icon-email')
|
||||
else
|
||||
link_to(
|
||||
icon_with_label('email-disabled', l(:label_enable_notifications)),
|
||||
sprite_icon('email-disabled', l(:label_enable_notifications)),
|
||||
user_email_address_path(address.user, address, :notify => '1'),
|
||||
:method => :put, :remote => true,
|
||||
:title => l(:label_enable_notifications),
|
||||
|
||||
@ -23,21 +23,21 @@ module GanttHelper
|
||||
when :in
|
||||
if gantt.zoom < 4
|
||||
link_to(
|
||||
icon_with_label('zoom-in', l(:text_zoom_in)),
|
||||
sprite_icon('zoom-in', l(:text_zoom_in)),
|
||||
{:params => request.query_parameters.merge(gantt.params.merge(:zoom => (gantt.zoom + 1)))},
|
||||
:class => 'icon icon-zoom-in')
|
||||
else
|
||||
content_tag(:span, icon_with_label('zoom-in', l(:text_zoom_in)), :class => 'icon icon-zoom-in').html_safe
|
||||
content_tag(:span, sprite_icon('zoom-in', l(:text_zoom_in)), :class => 'icon icon-zoom-in').html_safe
|
||||
end
|
||||
|
||||
when :out
|
||||
if gantt.zoom > 1
|
||||
link_to(
|
||||
icon_with_label('zoom-out', l(:text_zoom_out)),
|
||||
sprite_icon('zoom-out', l(:text_zoom_out)),
|
||||
{:params => request.query_parameters.merge(gantt.params.merge(:zoom => (gantt.zoom - 1)))},
|
||||
:class => 'icon icon-zoom-out')
|
||||
else
|
||||
content_tag(:span, icon_with_label('zoom-out', l(:text_zoom_out)), :class => 'icon icon-zoom-out').html_safe
|
||||
content_tag(:span, sprite_icon('zoom-out', l(:text_zoom_out)), :class => 'icon icon-zoom-out').html_safe
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -20,28 +20,36 @@
|
||||
module IconsHelper
|
||||
DEFAULT_ICON_SIZE = "18"
|
||||
DEFAULT_SPRITE = "icons"
|
||||
|
||||
def sprite_icon(icon_name, label = nil, icon_only: false, size: DEFAULT_ICON_SIZE, css_class: nil)
|
||||
svg_icon = svg_sprite_icon(icon_name, size: size, css_class: css_class)
|
||||
|
||||
def icon_with_label(icon_name, label_text, icon_only: false, size: DEFAULT_ICON_SIZE, css_class: nil)
|
||||
label_classes = ["icon-label"]
|
||||
label_classes << "hidden" if icon_only
|
||||
sprite_icon(icon_name, size: size, css_class: css_class) + content_tag(:span, label_text, class: label_classes.join(' '))
|
||||
end
|
||||
if label
|
||||
label_classes = ["icon-label"]
|
||||
label_classes << "hidden" if icon_only
|
||||
|
||||
def icon_for_file(entry, name, size: DEFAULT_ICON_SIZE, css_class: nil)
|
||||
if entry.is_dir?
|
||||
icon_with_label("folder", name, size: size, css_class: css_class)
|
||||
svg_icon + content_tag(:span, label, class: label_classes.join(' '))
|
||||
else
|
||||
icon = icon_for_mime_type(Redmine::MimeType.css_class_of(name))
|
||||
icon_with_label(icon, name, size: size, css_class: css_class)
|
||||
svg_icon
|
||||
end
|
||||
end
|
||||
|
||||
def icon_for_principal(principal_class, size: DEFAULT_ICON_SIZE, css_class: nil)
|
||||
sprite_icon('group', size: size, css_class: css_class) if ['groupanonymous', 'groupnonmember', 'group'].include?(principal_class)
|
||||
#
|
||||
def file_icon(entry, name, size: DEFAULT_ICON_SIZE, css_class: nil)
|
||||
if entry.is_dir?
|
||||
sprite_icon("folder", name, size: size, css_class: css_class)
|
||||
else
|
||||
icon_name = icon_for_mime_type(Redmine::MimeType.css_class_of(name))
|
||||
sprite_icon(icon_name, name, size: size, css_class: css_class)
|
||||
end
|
||||
end
|
||||
|
||||
def icon_for_event_type(event_type, size: DEFAULT_ICON_SIZE, css_class: nil)
|
||||
icon = case event_type
|
||||
def principal_icon(principal_class, size: DEFAULT_ICON_SIZE, css_class: nil)
|
||||
svg_sprite_icon('group', size: size, css_class: css_class) if ['groupanonymous', 'groupnonmember', 'group'].include?(principal_class)
|
||||
end
|
||||
|
||||
def activity_event_type_icon(event_type, size: DEFAULT_ICON_SIZE, css_class: nil)
|
||||
icon_name = case event_type
|
||||
when 'reply'
|
||||
'comments'
|
||||
when 'time-entry'
|
||||
@ -52,10 +60,12 @@ module IconsHelper
|
||||
event_type
|
||||
end
|
||||
|
||||
sprite_icon(icon, size: size, css_class: css_class)
|
||||
svg_sprite_icon(icon_name, size: size, css_class: css_class)
|
||||
end
|
||||
|
||||
def sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, sprite: DEFAULT_SPRITE, css_class: nil)
|
||||
private
|
||||
|
||||
def svg_sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, sprite: DEFAULT_SPRITE, css_class: nil)
|
||||
sprite_path = "#{sprite}.svg"
|
||||
css_classes = "s#{size} icon-svg"
|
||||
css_classes += " #{css_class}" unless css_class.nil?
|
||||
@ -70,8 +80,6 @@ module IconsHelper
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def icon_for_mime_type(mime)
|
||||
if %w(text-plain text-x-c text-x-csharp text-x-java text-x-php
|
||||
text-x-ruby text-xml text-css text-html text-css text-html
|
||||
|
||||
@ -101,7 +101,7 @@ module IssuesHelper
|
||||
buttons =
|
||||
if manage_relations
|
||||
link_to(
|
||||
icon_with_label('link-break', l(:label_delete_link_to_subtask)),
|
||||
sprite_icon('link-break', l(:label_delete_link_to_subtask)),
|
||||
issue_path(
|
||||
{:id => child.id, :issue => {:parent_issue_id => ''},
|
||||
:back_url => issue_path(issue.id), :no_flash => '1'}
|
||||
@ -207,7 +207,7 @@ module IssuesHelper
|
||||
buttons =
|
||||
if manage_relations
|
||||
link_to(
|
||||
icon_with_label('link-break', l(:label_relation_delete)),
|
||||
sprite_icon('link-break', l(:label_relation_delete)),
|
||||
relation_path(relation, issue_id: issue.id),
|
||||
:remote => true,
|
||||
:method => :delete,
|
||||
|
||||
@ -33,7 +33,7 @@ module JournalsHelper
|
||||
|
||||
dropbown_links << copy_object_url_link(issue_url(issue, anchor: "note-#{indice}", only_path: false))
|
||||
if journal.attachments.size > 1
|
||||
dropbown_links << link_to(icon_with_label('download', l(:label_download_all_attachments)),
|
||||
dropbown_links << link_to(sprite_icon('download', l(:label_download_all_attachments)),
|
||||
container_attachments_download_path(journal),
|
||||
:title => l(:label_download_all_attachments),
|
||||
:class => 'icon icon-download'
|
||||
@ -46,14 +46,14 @@ module JournalsHelper
|
||||
links << quote_reply(url, "#journal-#{journal.id}-notes", icon_only: true)
|
||||
end
|
||||
if journal.editable_by?(User.current)
|
||||
links << link_to(icon_with_label('edit', l(:button_edit)),
|
||||
links << link_to(sprite_icon('edit', l(:button_edit)),
|
||||
edit_journal_path(journal),
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_edit),
|
||||
:class => 'icon-only icon-edit'
|
||||
)
|
||||
dropbown_links << link_to(icon_with_label('del', l(:button_delete)),
|
||||
dropbown_links << link_to(sprite_icon('del', l(:button_delete)),
|
||||
journal_path(journal, :journal => {:notes => ""}),
|
||||
:remote => true,
|
||||
:method => 'put',
|
||||
|
||||
@ -34,8 +34,8 @@ module MyHelper
|
||||
def render_block(block, user)
|
||||
content = render_block_content(block, user)
|
||||
if content.present?
|
||||
handle = content_tag('span', icon_with_label('reorder', ''), :class => 'icon-only icon-sort-handle sort-handle', :title => l(:button_move))
|
||||
close = link_to(icon_with_label('close', l(:button_delete)),
|
||||
handle = content_tag('span', sprite_icon('reorder', ''), :class => 'icon-only icon-sort-handle sort-handle', :title => l(:button_move))
|
||||
close = link_to(sprite_icon('close', l(:button_delete)),
|
||||
{:action => "remove_block", :block => block},
|
||||
:remote => true, :method => 'post',
|
||||
:class => "icon-only icon-close", :title => l(:button_delete))
|
||||
|
||||
@ -63,10 +63,10 @@ module ProjectsHelper
|
||||
def render_project_action_links
|
||||
links = (+"").html_safe
|
||||
if User.current.allowed_to?(:add_project, nil, :global => true)
|
||||
links << link_to(icon_with_label('add', l(:label_project_new)), new_project_path, :class => 'icon icon-add')
|
||||
links << link_to(sprite_icon('add', l(:label_project_new)), new_project_path, :class => 'icon icon-add')
|
||||
end
|
||||
if User.current.admin?
|
||||
links << link_to(icon_with_label('settings', l(:label_administration)), admin_projects_path, :class => 'icon icon-settings')
|
||||
links << link_to(sprite_icon('settings', l(:label_administration)), admin_projects_path, :class => 'icon icon-settings')
|
||||
end
|
||||
links
|
||||
end
|
||||
@ -80,8 +80,8 @@ module ProjectsHelper
|
||||
classes += %w(icon icon-bookmarked-project) if bookmarked_project_ids.include?(project.id)
|
||||
|
||||
s = link_to_project(project, {}, :class => classes.uniq.join(' '))
|
||||
s << icon_with_label('user', l(:label_my_projects), icon_only: true) if User.current.member_of?(project)
|
||||
s << icon_with_label('bookmarked', l(:label_my_bookmarks), icon_only: true) if bookmarked_project_ids.include?(project.id)
|
||||
s << sprite_icon('user', l(:label_my_projects), icon_only: true) if User.current.member_of?(project)
|
||||
s << sprite_icon('bookmarked', l(:label_my_bookmarks), icon_only: true) if bookmarked_project_ids.include?(project.id)
|
||||
if project.description.present?
|
||||
s << content_tag('div', textilizable(project.short_description, :project => project), :class => 'wiki description')
|
||||
end
|
||||
@ -187,12 +187,12 @@ module ProjectsHelper
|
||||
css << "icon-bookmark"
|
||||
icon = "bookmark-delete"
|
||||
method = "delete"
|
||||
text = icon_with_label(icon, l(:button_project_bookmark_delete))
|
||||
text = sprite_icon(icon, l(:button_project_bookmark_delete))
|
||||
else
|
||||
css << "icon-bookmark-off"
|
||||
icon = "bookmark-add"
|
||||
method = "post"
|
||||
text = icon_with_label(icon, l(:button_project_bookmark))
|
||||
text = sprite_icon(icon, l(:button_project_bookmark))
|
||||
end
|
||||
|
||||
url = bookmark_project_path(project)
|
||||
|
||||
@ -24,8 +24,8 @@ module ProjectsQueriesHelper
|
||||
case column.name
|
||||
when :name
|
||||
link_to_project(item) +
|
||||
(tag.span(icon_with_label('user', l(:label_my_projects), icon_only: true), class: 'icon-only icon-user my-project') if User.current.member_of?(item)) +
|
||||
(tag.span(icon_with_label('bookmarked', l(:label_my_bookmarks), icon_only: true), class: 'icon-only icon-bookmarked-project') if User.current.bookmarked_project_ids.include?(item.id))
|
||||
(tag.span(sprite_icon('user', l(:label_my_projects), icon_only: true), class: 'icon-only icon-user my-project') if User.current.member_of?(item)) +
|
||||
(tag.span(sprite_icon('bookmarked', l(:label_my_bookmarks), icon_only: true), class: 'icon-only icon-bookmarked-project') if User.current.bookmarked_project_ids.include?(item.id))
|
||||
when :short_description
|
||||
if item.description?
|
||||
# Sets :inline_attachments to false to avoid performance issues
|
||||
|
||||
@ -225,7 +225,7 @@ module QueriesHelper
|
||||
end
|
||||
content =
|
||||
link_to(
|
||||
icon_with_label(icon, column.caption),
|
||||
sprite_icon(icon, column.caption),
|
||||
{:params => request.query_parameters.deep_merge(sort_param)},
|
||||
link_options
|
||||
)
|
||||
@ -519,7 +519,7 @@ module QueriesHelper
|
||||
|
||||
def link_to_clear_query(params = {:set_filter => 1, :sort => '', :project_id => @project})
|
||||
link_to(
|
||||
icon_with_label('clear-query', l(:button_clear)),
|
||||
sprite_icon('clear-query', l(:button_clear)),
|
||||
params,
|
||||
:class => 'icon-only icon-clear-query',
|
||||
:title => l(:button_clear)
|
||||
|
||||
@ -127,7 +127,7 @@ module SortHelper
|
||||
caption = column.to_s.humanize unless caption
|
||||
|
||||
sort_options = {:sort => @sort_criteria.add(column.to_s, order).to_param}
|
||||
link_to(icon_with_label(icon, caption), {:params => request.query_parameters.merge(sort_options)}, :class => css)
|
||||
link_to(sprite_icon(icon, caption), { :params => request.query_parameters.merge(sort_options)}, :class => css)
|
||||
end
|
||||
|
||||
# Returns a table header <th> tag with a sort link for the named column
|
||||
|
||||
@ -69,17 +69,17 @@ module UsersHelper
|
||||
url = {:controller => 'users', :action => 'update', :id => user, :page => params[:page], :status => params[:status], :tab => nil}
|
||||
|
||||
if user.locked?
|
||||
link_to icon_with_label('unlock', l(:button_unlock)), url.merge(:user => {:status => User::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock'
|
||||
link_to sprite_icon('unlock', l(:button_unlock)), url.merge(:user => { :status => User::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock'
|
||||
elsif user.registered?
|
||||
link_to icon_with_label('unlock', l(:button_activate)), url.merge(:user => {:status => User::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock'
|
||||
link_to sprite_icon('unlock', l(:button_activate)), url.merge(:user => { :status => User::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock'
|
||||
elsif user != User.current
|
||||
link_to icon_with_label('lock', l(:button_lock)), url.merge(:user => {:status => User::STATUS_LOCKED}), :method => :put, :class => 'icon icon-lock'
|
||||
link_to sprite_icon('lock', l(:button_lock)), url.merge(:user => { :status => User::STATUS_LOCKED}), :method => :put, :class => 'icon icon-lock'
|
||||
end
|
||||
end
|
||||
|
||||
def additional_emails_link(user)
|
||||
if user.email_addresses.count > 1 || Setting.max_additional_emails.to_i > 0
|
||||
link_to icon_with_label('email', l(:label_email_address_plural)), user_email_addresses_path(@user), :class => 'icon icon-email-add', :remote => true
|
||||
link_to sprite_icon('email', l(:label_email_address_plural)), user_email_addresses_path(@user), :class => 'icon icon-email-add', :remote => true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ module VersionsHelper
|
||||
:tracker_id => new_issue_tracker,
|
||||
:fixed_version_id => version.id
|
||||
}
|
||||
link_to icon_with_label('add', l(:label_issue_new)), new_project_issue_path(project, :issue => attrs, :back_url => version_path(version)), :class => 'icon icon-add'
|
||||
link_to sprite_icon('add', l(:label_issue_new)), new_project_issue_path(project, :issue => attrs, :back_url => version_path(version)), :class => 'icon icon-add'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -33,7 +33,7 @@ module WatchersHelper
|
||||
)
|
||||
method = watched ? 'delete' : 'post'
|
||||
|
||||
link_to icon_with_label('fav', text), url, :remote => true, :method => method, :class => css
|
||||
link_to sprite_icon('fav', text), url, :remote => true, :method => method, :class => css
|
||||
end
|
||||
|
||||
# Returns the css class used to identify watch links for a given +object+
|
||||
@ -61,7 +61,7 @@ module WatchersHelper
|
||||
:object_id => object.id,
|
||||
:user_id => user}
|
||||
s << ' '
|
||||
s << link_to(icon_with_label('del', l(:button_delete)), url,
|
||||
s << link_to(sprite_icon('del', l(:button_delete)), url,
|
||||
:remote => true, :method => 'delete',
|
||||
:class => "delete icon-only icon-del",
|
||||
:title => l(:button_delete))
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<dl>
|
||||
<% sort_activity_events(events_by_day[day]).each do |e, in_group| -%>
|
||||
<dt class="<%= e.event_type %> icon icon-<%= e.event_type %> <%= "grouped" if in_group %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
|
||||
<%= icon_for_event_type e.event_type %>
|
||||
<%= activity_event_type_icon e.event_type %>
|
||||
<%= avatar(e.event_author) if e.respond_to?(:event_author) %>
|
||||
<span class="time"><%= format_time(e.event_datetime, false) %></span>
|
||||
<%= content_tag('span', e.project, :class => 'project') if @project.nil? || @project != e.project %>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('add', l(:label_project_new)), new_project_path, :class => 'icon icon-add' %>
|
||||
<%= link_to sprite_icon('add', l(:label_project_new)), new_project_path, :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<h2><%= @query.new_record? ? l(:label_project_plural) : @query.name %></h2>
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<div class="attachments">
|
||||
<div class="contextual">
|
||||
<%= link_to(icon_with_label('edit', l(:label_edit_attachments)),
|
||||
<%= link_to(sprite_icon('edit', l(:label_edit_attachments)),
|
||||
container_attachments_edit_path(container),
|
||||
:title => l(:label_edit_attachments),
|
||||
:class => 'icon-only icon-edit '
|
||||
) if options[:editable] %>
|
||||
<%= link_to(icon_with_label('download', l(:label_download_all_attachments)),
|
||||
<%= link_to(sprite_icon('download', l(:label_download_all_attachments)),
|
||||
container_attachments_download_path(container),
|
||||
:title => l(:label_download_all_attachments),
|
||||
:class => 'icon-only icon-download '
|
||||
@ -15,9 +15,9 @@
|
||||
<% for attachment in attachments %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= link_to_attachment attachment, class: 'icon icon-attachment ', icon: 'attachment' -%>
|
||||
<%= link_to_attachment attachment, class: 'icon icon-attachment ', sprite_icon: 'attachment' -%>
|
||||
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
|
||||
<%= link_to_attachment attachment, class: 'icon-only icon-download ', title: l(:button_download), download: true, icon: 'download' -%>
|
||||
<%= link_to_attachment attachment, class: 'icon-only icon-download ', title: l(:button_download), download: true, sprite_icon: 'download' -%>
|
||||
</td>
|
||||
<td><%= attachment.description unless attachment.description.blank? %></td>
|
||||
<td>
|
||||
@ -27,7 +27,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<% if options[:deletable] %>
|
||||
<%= link_to icon_with_label('del', l(:button_delete)), attachment_path(attachment),
|
||||
<%= link_to sprite_icon('del', l(:button_delete)), attachment_path(attachment),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => :delete,
|
||||
:class => 'delete icon-only icon-del ',
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<% @attachments.each do |attachment| %>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<span class="icon icon-attachment"><%= icon_with_label('attachment', attachment.filename_was) %></span>
|
||||
<span class="icon icon-attachment"><%= sprite_icon('attachment', attachment.filename_was) %></span>
|
||||
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
|
||||
<span class="author"><%= attachment.author %>, <%= format_time(attachment.created_on) %></span>
|
||||
</td>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('add', l(:label_auth_source_new)), {:action => 'new'}, :class => 'icon icon-add' %>
|
||||
<%= link_to sprite_icon('add', l(:label_auth_source_new)), { :action => 'new'}, :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<%= title l(:label_auth_source_plural) %>
|
||||
@ -20,7 +20,7 @@
|
||||
<td><%= source.host %></td>
|
||||
<td><%= source.users.count %></td>
|
||||
<td class="buttons">
|
||||
<%= link_to icon_with_label('arrow-right', l(:button_test)), try_connection_auth_source_path(source), :class => 'icon icon-test' %>
|
||||
<%= link_to sprite_icon('arrow-right', l(:button_test)), try_connection_auth_source_path(source), :class => 'icon icon-test' %>
|
||||
<%= delete_link auth_source_path(source) %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized icon_with_label('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_boards, @project) %>
|
||||
<%= link_to_if_authorized sprite_icon('settings', 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>
|
||||
@ -21,7 +21,7 @@
|
||||
<tr class="board">
|
||||
<% end %>
|
||||
<td class="name">
|
||||
<%= link_to icon_with_label('comment', board.name), project_board_path(board.project, board), :class => "board icon icon-comment" %>
|
||||
<%= link_to sprite_icon('comment', board.name), project_board_path(board.project, board), :class => "board icon icon-comment" %>
|
||||
<p class="description"><%= board.description %></p>
|
||||
</td>
|
||||
<td class="topic-count"><%= board.topics_count %></td>
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<%= board_breadcrumb(@board) %>
|
||||
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('add', l(:label_message_new)),
|
||||
<%= link_to sprite_icon('add', l(:label_message_new)),
|
||||
new_board_message_path(@board),
|
||||
: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 icon_with_label('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_boards, @project) %>
|
||||
<%= link_to_if_authorized sprite_icon('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_boards, @project) %>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -35,15 +35,15 @@
|
||||
<%= label_tag('year', l(:label_year)) %>
|
||||
<%= select_year(@year, :prefix => "year", :discard_type => true) %>
|
||||
|
||||
<%= link_to_function icon_with_label('checked', l(:button_apply)), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to icon_with_label('reload', l(:button_clear)), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
|
||||
<%= link_to_function sprite_icon('checked', l(:button_apply)), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to sprite_icon('reload', l(:button_clear)), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
|
||||
<% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
|
||||
<%= link_to_function icon_with_label('save', l(:button_save_object, object_name: l(:label_query).downcase)),
|
||||
<%= link_to_function sprite_icon('save', l(:button_save_object, object_name: l(:label_query).downcase)),
|
||||
"$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
|
||||
:class => 'icon icon-save' %>
|
||||
<% end %>
|
||||
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
||||
<%= link_to icon_with_label('edit', l(:button_edit_object, object_name: l(:label_query).downcase)), edit_query_path(@query, :calendar => 1), :class => 'icon icon-edit' %>
|
||||
<%= link_to sprite_icon('edit', l(:button_edit_object, object_name: l(:label_query).downcase)), edit_query_path(@query, :calendar => 1), :class => 'icon icon-edit' %>
|
||||
<%= delete_link query_path(@query, :calendar => 1), {}, l(:button_delete_object, object_name: l(:label_query).downcase) %>
|
||||
<% end %>
|
||||
</p>
|
||||
@ -57,9 +57,9 @@
|
||||
<%= call_hook(:view_calendars_show_bottom, :year => @year, :month => @month, :project => @project, :query => @query) %>
|
||||
|
||||
<p class="legend cal">
|
||||
<span class="starting"><%= icon_with_label('bullet-go', l(:text_tip_issue_begin_day)) %></span>
|
||||
<span class="ending"><%= icon_with_label('bullet-end', l(:text_tip_issue_end_day)) %></span>
|
||||
<span class="starting ending"><%= icon_with_label('bullet-go-end', l(:text_tip_issue_begin_end_day)) %></span>
|
||||
<span class="starting"><%= sprite_icon('bullet-go', l(:text_tip_issue_begin_day)) %></span>
|
||||
<span class="ending"><%= sprite_icon('bullet-end', l(:text_tip_issue_end_day)) %></span>
|
||||
<span class="starting ending"><%= sprite_icon('bullet-go-end', l(:text_tip_issue_begin_end_day)) %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<% end %>
|
||||
|
||||
<% if @archived_project && User.current.admin? %>
|
||||
<p><%= link_to icon_with_label('unlock', l(:button_unarchive)), unarchive_project_path(@archived_project), :method => :post, :class => 'icon icon-unlock' %></p>
|
||||
<p><%= link_to sprite_icon('unlock', l(:button_unarchive)), unarchive_project_path(@archived_project), :method => :post, :class => 'icon icon-unlock' %></p>
|
||||
<% end %>
|
||||
|
||||
<p><a href="javascript:history.back()"><%= l(:button_back) %></a></p>
|
||||
|
||||
@ -6,7 +6,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
||||
xml.link "rel" => "self", "href" => url_for(:params => request.query_parameters, :only_path => false, :format => 'atom')
|
||||
xml.link "rel" => "alternate", "href" => url_for(:params => request.query_parameters.merge(:format => nil, :key => nil), :only_path => false)
|
||||
xml.id home_url
|
||||
xml.icon favicon_url
|
||||
xml.icon favicon_url
|
||||
xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
|
||||
xml.author {xml.name "#{Setting.app_title}"}
|
||||
xml.generator(:uri => Redmine::Info.url) {xml.text! Redmine::Info.app_name}
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
<%= call_hook(:view_issues_context_menu_start, {:issues => @issues, :can => @can, :back => @back }) %>
|
||||
|
||||
<% if @issue -%>
|
||||
<li><%= context_menu_link icon_with_label('edit', l(:button_edit)), edit_issue_path(@issue),
|
||||
:class => 'icon icon-edit', :disabled => !@can[:edit] %></li>
|
||||
<li><%= context_menu_link sprite_icon('edit', l(:button_edit)), edit_issue_path(@issue),
|
||||
:class => 'icon icon-edit', :disabled => !@can[:edit] %></li>
|
||||
<% else %>
|
||||
<li><%= context_menu_link icon_with_label('edit', l(:label_bulk_edit)), bulk_edit_issues_path(:ids => @issue_ids),
|
||||
:class => 'icon icon-edit', :disabled => !@can[:edit] %></li>
|
||||
<li><%= context_menu_link sprite_icon('edit', l(:label_bulk_edit)), bulk_edit_issues_path(:ids => @issue_ids),
|
||||
:class => 'icon icon-edit', :disabled => !@can[:edit] %></li>
|
||||
<% end %>
|
||||
|
||||
<% if @allowed_statuses.present? %>
|
||||
@ -130,10 +130,10 @@
|
||||
<li class="folder">
|
||||
<a href="#" class="submenu"><%= l(:label_issue_watchers) %></a>
|
||||
<ul>
|
||||
<li><%= context_menu_link icon_with_label('add', l(:button_add)),
|
||||
new_watchers_path(:object_type => 'issue', :object_id => @issue_ids),
|
||||
:remote => true,
|
||||
:class => 'icon icon-add' %></li>
|
||||
<li><%= context_menu_link sprite_icon('add', l(:button_add)),
|
||||
new_watchers_path(:object_type => 'issue', :object_id => @issue_ids),
|
||||
:remote => true,
|
||||
:class => 'icon icon-add' %></li>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
@ -143,28 +143,28 @@
|
||||
<% end %>
|
||||
|
||||
<% unless @issue %>
|
||||
<li><%= context_menu_link icon_with_label('list', l(:button_filter)), _project_issues_path(@project, :set_filter => 1, :status_id => "*", :issue_id => @issue_ids.join(","), :c => @columns),
|
||||
:class => 'icon icon-list' %></li>
|
||||
<li><%= context_menu_link sprite_icon('list', l(:button_filter)), _project_issues_path(@project, :set_filter => 1, :status_id => "*", :issue_id => @issue_ids.join(","), :c => @columns),
|
||||
:class => 'icon icon-list' %></li>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.present? %>
|
||||
<% if @can[:log_time] -%>
|
||||
<li><%= context_menu_link icon_with_label('time-add', l(:button_log_time)), new_issue_time_entry_path(@issue),
|
||||
:class => 'icon icon-time-add' %></li>
|
||||
<li><%= context_menu_link sprite_icon('time-add', l(:button_log_time)), new_issue_time_entry_path(@issue),
|
||||
:class => 'icon icon-time-add' %></li>
|
||||
<% end %>
|
||||
<% if @can[:add_subtask] -%>
|
||||
<li><%= context_menu_link icon_with_label('add', l(:button_add_subtask)), url_for_new_subtask(@issue),
|
||||
:class => 'icon icon-add' %></li>
|
||||
<li><%= context_menu_link sprite_icon('add', l(:button_add_subtask)), url_for_new_subtask(@issue),
|
||||
:class => 'icon icon-add' %></li>
|
||||
<% end %>
|
||||
<li><%= copy_object_url_link(issue_url(@issue)) %></li>
|
||||
<li><%= context_menu_link icon_with_label('copy', l(:button_copy)), project_copy_issue_path(@project, @issue),
|
||||
:class => 'icon icon-copy', :disabled => !@can[:copy] %></li>
|
||||
<li><%= context_menu_link sprite_icon('copy', l(:button_copy)), project_copy_issue_path(@project, @issue),
|
||||
:class => 'icon icon-copy', :disabled => !@can[:copy] %></li>
|
||||
<% else %>
|
||||
<li><%= copy_object_url_link(_project_issues_url(@project, set_filter: 1, status_id: '*', issue_id: @issue_ids.join(','))) %></li>
|
||||
<li><%= context_menu_link icon_with_label('copy', l(:button_copy)), bulk_edit_issues_path(:ids => @issue_ids, :copy => '1'),
|
||||
:class => 'icon icon-copy', :disabled => !@can[:copy] %></li>
|
||||
<li><%= context_menu_link sprite_icon('copy', l(:button_copy)), bulk_edit_issues_path(:ids => @issue_ids, :copy => '1'),
|
||||
:class => 'icon icon-copy', :disabled => !@can[:copy] %></li>
|
||||
<% end %>
|
||||
<li><%= context_menu_link icon_with_label('del', l(:button_delete_object, object_name: (@issue_ids.size > 1 ? l(:label_issue_plural) : l(:label_issue)).downcase)), issues_path(:ids => @issue_ids, :back_url => @back),
|
||||
<li><%= context_menu_link sprite_icon('del', l(:button_delete_object, object_name: (@issue_ids.size > 1 ? l(:label_issue_plural) : l(:label_issue)).downcase)), issues_path(:ids => @issue_ids, :back_url => @back),
|
||||
:method => :delete, :data => {:confirm => issues_destroy_confirmation_message(@issues)}, :class => 'icon icon-del', :disabled => !@can[:delete] %></li>
|
||||
|
||||
<%= call_hook(:view_issues_context_menu_end, {:issues => @issues, :can => @can, :back => @back }) %>
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
<ul>
|
||||
<% if @project && !@project.scheduled_for_deletion? %>
|
||||
<% if @project.archived? %>
|
||||
<li><%= context_menu_link icon_with_label('unlock', l(:button_unarchive)), unarchive_project_path(@project), method: :post, class: 'icon icon-unlock' %></li>
|
||||
<li><%= context_menu_link sprite_icon('unlock', l(:button_unarchive)), unarchive_project_path(@project), method: :post, class: 'icon icon-unlock' %></li>
|
||||
<% else %>
|
||||
<li><%= context_menu_link icon_with_label('lock', l(:button_archive)), archive_project_path(@project), data: {confirm: l(:text_project_archive_confirmation, @project.to_s)}, method: :post, class: 'icon icon-lock' %></li>
|
||||
<li><%= context_menu_link sprite_icon('lock', l(:button_archive)), archive_project_path(@project), data: { confirm: l(:text_project_archive_confirmation, @project.to_s)}, method: :post, class: 'icon icon-lock' %></li>
|
||||
<% end %>
|
||||
<li>
|
||||
<%= context_menu_link icon_with_label('copy', l(:button_copy)), copy_project_path(@projects), class: 'icon icon-copy' %>
|
||||
<%= context_menu_link sprite_icon('copy', l(:button_copy)), copy_project_path(@projects), class: 'icon icon-copy' %>
|
||||
</li>
|
||||
<li>
|
||||
<%= context_menu_link icon_with_label('del', l(:button_delete)), project_path(@project, back_url: @back), method: :delete, class: 'icon icon-del' %>
|
||||
<%= context_menu_link sprite_icon('del', l(:button_delete)), project_path(@project, back_url: @back), method: :delete, class: 'icon icon-del' %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<%= context_menu_link icon_with_label('del', l(:button_delete)),
|
||||
{controller: 'projects', action: 'bulk_destroy', ids: @projects.map(&:id), back_url: @back},
|
||||
method: :delete, data: {confirm: l(:text_projects_bulk_destroy_confirmation)}, class: 'icon icon-del' %>
|
||||
<%= context_menu_link sprite_icon('del', l(:button_delete)),
|
||||
{controller: 'projects', action: 'bulk_destroy', ids: @projects.map(&:id), back_url: @back},
|
||||
method: :delete, data: {confirm: l(:text_projects_bulk_destroy_confirmation)}, class: 'icon icon-del' %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<ul>
|
||||
<% if !@time_entry.nil? -%>
|
||||
<li><%= context_menu_link icon_with_label('edit', l(:button_edit)), {:controller => 'timelog', :action => 'edit', :id => @time_entry},
|
||||
:class => 'icon icon-edit', :disabled => !@can[:edit] %></li>
|
||||
<li><%= context_menu_link sprite_icon('edit', l(:button_edit)), { :controller => 'timelog', :action => 'edit', :id => @time_entry},
|
||||
:class => 'icon icon-edit', :disabled => !@can[:edit] %></li>
|
||||
<% else %>
|
||||
<li><%= context_menu_link icon_with_label('edit', l(:label_bulk_edit)), {:controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id)},
|
||||
:class => 'icon icon-edit', :disabled => !@can[:edit] %></li>
|
||||
<li><%= context_menu_link sprite_icon('edit', l(:label_bulk_edit)), { :controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id)},
|
||||
:class => 'icon icon-edit', :disabled => !@can[:edit] %></li>
|
||||
<% end %>
|
||||
|
||||
<%= call_hook(:view_time_entries_context_menu_start, {:time_entries => @time_entries, :can => @can, :back => @back }) %>
|
||||
@ -38,8 +38,8 @@
|
||||
<%= call_hook(:view_time_entries_context_menu_end, {:time_entries => @time_entries, :can => @can, :back => @back }) %>
|
||||
|
||||
<li>
|
||||
<%= context_menu_link icon_with_label('del', l(:button_delete)),
|
||||
{:controller => 'timelog', :action => 'destroy', :ids => @time_entries.collect(&:id), :back_url => @back},
|
||||
:method => :delete, :data => {:confirm => l(:text_time_entries_destroy_confirmation)}, :class => 'icon icon-del', :disabled => !@can[:delete] %>
|
||||
<%= context_menu_link sprite_icon('del', l(:button_delete)),
|
||||
{:controller => 'timelog', :action => 'destroy', :ids => @time_entries.collect(&:id), :back_url => @back},
|
||||
:method => :delete, :data => {:confirm => l(:text_time_entries_destroy_confirmation)}, :class => 'icon icon-del', :disabled => !@can[:delete] %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -2,38 +2,38 @@
|
||||
<% if @user %>
|
||||
<% if @user.locked? %>
|
||||
<li>
|
||||
<%= context_menu_link icon_with_label('unlock', l(:button_unlock)), user_path(@user, user: { status: User::STATUS_ACTIVE }, back_url: @back), method: :put, class: 'icon icon-unlock' %>
|
||||
<%= context_menu_link sprite_icon('unlock', l(:button_unlock)), user_path(@user, user: { status: User::STATUS_ACTIVE }, back_url: @back), method: :put, class: 'icon icon-unlock' %>
|
||||
</li>
|
||||
<% elsif User.current != @user %>
|
||||
<li>
|
||||
<%= context_menu_link icon_with_label('lock', l(:button_lock)), user_path(@user, user: { status: User::STATUS_LOCKED }, back_url: @back), method: :put, class: 'icon icon-lock' %>
|
||||
<%= context_menu_link sprite_icon('lock', l(:button_lock)), user_path(@user, user: { status: User::STATUS_LOCKED }, back_url: @back), method: :put, class: 'icon icon-lock' %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<li>
|
||||
<%= context_menu_link icon_with_label('edit', l(:button_edit)), edit_user_path(@user, back_url: @back), class: 'icon icon-edit' %>
|
||||
<%= context_menu_link sprite_icon('edit', l(:button_edit)), edit_user_path(@user, back_url: @back), class: 'icon icon-edit' %>
|
||||
</li>
|
||||
|
||||
<% unless User.current == @user %>
|
||||
<li>
|
||||
<%= context_menu_link icon_with_label('del', l(:button_delete)), user_path(@user, back_url: @back),
|
||||
method: :delete, class: 'icon icon-del' %>
|
||||
<%= context_menu_link sprite_icon('del', l(:button_delete)), user_path(@user, back_url: @back),
|
||||
method: :delete, class: 'icon icon-del' %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% unless @users.all?(&:locked?) %>
|
||||
<li>
|
||||
<%= context_menu_link icon_with_label('lock', l(:button_lock)), bulk_lock_users_path(ids: @users.map(&:id)), method: :post, class: 'icon icon-lock' %>
|
||||
<%= context_menu_link sprite_icon('lock', l(:button_lock)), bulk_lock_users_path(ids: @users.map(&:id)), method: :post, class: 'icon icon-lock' %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<%= context_menu_link icon_with_label('unlock', l(:button_unlock)), bulk_unlock_users_path(ids: @users.map(&:id)), method: :post, class: 'icon icon-unlock' %>
|
||||
<%= context_menu_link sprite_icon('unlock', l(:button_unlock)), bulk_unlock_users_path(ids: @users.map(&:id)), method: :post, class: 'icon icon-unlock' %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<%= context_menu_link icon_with_label('del', l(:button_delete)),
|
||||
{controller: 'users', action: 'bulk_destroy', ids: @users.map(&:id)},
|
||||
method: :delete, class: 'icon icon-del' %>
|
||||
<%= context_menu_link sprite_icon('del', l(:button_delete)),
|
||||
{controller: 'users', action: 'bulk_destroy', ids: @users.map(&:id)},
|
||||
method: :delete, class: 'icon icon-del' %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<% end %>
|
||||
<td class="buttons">
|
||||
<%= reorder_handle(custom_field, :url => custom_field_path(custom_field), :param => 'custom_field') %>
|
||||
<%= link_to_function icon_with_label('copy', l(:button_copy)), "location.href = '#{new_custom_field_path(:copy => custom_field)}&type=' + encodeURIComponent(($('.tabs a.selected').attr('id')||'').split('tab-').pop())", :class => 'icon icon-copy' %>
|
||||
<%= link_to_function sprite_icon('copy', l(:button_copy)), "location.href = '#{new_custom_field_path(:copy => custom_field)}&type=' + encodeURIComponent(($('.tabs a.selected').attr('id')||'').split('tab-').pop())", :class => 'icon icon-copy' %>
|
||||
<%= delete_link custom_field_path(custom_field) %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<% unless @custom_field.new_record? %>
|
||||
<p>
|
||||
<label><%= l(:field_possible_values) %></label>
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)), custom_field_enumerations_path(@custom_field), :class => 'icon icon-edit' %>
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), custom_field_enumerations_path(@custom_field), :class => 'icon icon-edit' %>
|
||||
</p>
|
||||
<% if @custom_field.enumerations.active.any? %>
|
||||
<p><%= f.select :default_value, @custom_field.enumerations.active.map{|v| [v.name, v.id.to_s]}, :include_blank => true %></p>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to_function icon_with_label('add', l(:label_custom_field_new)), "location.href = '#{new_custom_field_path}?tab=' + encodeURIComponent(($('.tabs a.selected').attr('id')||'').split('tab-').pop())", :class => 'icon icon-add' %>
|
||||
<%= link_to_function sprite_icon('add', l(:label_custom_field_new)), "location.href = '#{new_custom_field_path}?tab=' + encodeURIComponent(($('.tabs a.selected').attr('id')||'').split('tab-').pop())", :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<%= title l(:label_custom_field_plural) %>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('add', l(:label_document_new)), new_project_document_path(@project), :class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:add_documents, @project) %>
|
||||
<%= link_to sprite_icon('add', l(:label_document_new)), new_project_document_path(@project), :class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:add_documents, @project) %>
|
||||
</div>
|
||||
|
||||
<div id="add-document" style="display:none;">
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div class="contextual">
|
||||
<% if User.current.allowed_to?(:edit_documents, @project) %>
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
|
||||
<% end %>
|
||||
<% if User.current.allowed_to?(:delete_documents, @project) %>
|
||||
<%= delete_link document_path(@document) %>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
<% enumerations = klass.shared %>
|
||||
|
||||
<p><%= link_to icon_with_label('add', l(:label_enumeration_new)), new_enumeration_path(:type => klass.name), :class => 'icon icon-add' %></p>
|
||||
<p><%= link_to sprite_icon('add', l(:label_enumeration_new)), new_enumeration_path(:type => klass.name), :class => 'icon icon-add' %></p>
|
||||
|
||||
<% if enumerations.any? %>
|
||||
<table class="list enumerations"><thead>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(icon_with_label('add', l(:label_attachment_new)), new_project_file_path(@project), :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
|
||||
<%= link_to(sprite_icon('add', l(:label_attachment_new)), new_project_file_path(@project), :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_attachment_plural)%></h2>
|
||||
@ -22,7 +22,7 @@
|
||||
<% if container.is_a?(Version) -%>
|
||||
<tr>
|
||||
<th colspan="6">
|
||||
<%= link_to(icon_with_label('package', container), {:controller => 'versions', :action => 'show', :id => container}, :class => "icon icon-package") %>
|
||||
<%= link_to(sprite_icon('package', container), { :controller => 'versions', :action => 'show', :id => container}, :class => "icon icon-package") %>
|
||||
</th>
|
||||
</tr>
|
||||
<% end -%>
|
||||
@ -34,9 +34,9 @@
|
||||
<td class="downloads"><%= file.downloads %></td>
|
||||
<td class="digest"><%= file.digest_type %>: <%= file.digest %></td>
|
||||
<td class="buttons">
|
||||
<%= link_to_attachment file, class: 'icon-only icon-download', title: l(:button_download), download: true, icon: 'download' %>
|
||||
<%= link_to(icon_with_label('del', l(:button_delete)), attachment_path(file), :class => 'icon-only icon-del',
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
|
||||
<%= link_to_attachment file, class: 'icon-only icon-download', title: l(:button_download), download: true, sprite_icon: 'download' %>
|
||||
<%= link_to(sprite_icon('del', l(:button_delete)), attachment_path(file), :class => 'icon-only icon-del',
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@ -89,17 +89,17 @@
|
||||
<%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %>
|
||||
<%= hidden_field_tag 'zoom', @gantt.zoom %>
|
||||
|
||||
<%= link_to_function icon_with_label('checked', l(:button_apply)), '$("#query_form").submit()',
|
||||
<%= link_to_function sprite_icon('checked', l(:button_apply)), '$("#query_form").submit()',
|
||||
:class => 'icon icon-checked' %>
|
||||
<%= link_to icon_with_label('reload', l(:button_clear)), { :project_id => @project, :set_filter => 1 },
|
||||
<%= link_to sprite_icon('reload', l(:button_clear)), { :project_id => @project, :set_filter => 1 },
|
||||
:class => 'icon icon-reload' %>
|
||||
<% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
|
||||
<%= link_to_function icon_with_label('save', l(:button_save_object, object_name: l(:label_query).downcase)),
|
||||
<%= link_to_function sprite_icon('save', l(:button_save_object, object_name: l(:label_query).downcase)),
|
||||
"$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
|
||||
:class => 'icon icon-save' %>
|
||||
<% end %>
|
||||
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
||||
<%= link_to icon_with_label('edit', l(:button_edit_object, object_name: l(:label_query).downcase)), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
|
||||
<%= link_to sprite_icon('edit', l(:button_edit_object, object_name: l(:label_query).downcase)), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
|
||||
<%= delete_link query_path(@query, :gantt => 1), {}, l(:button_delete_object, object_name: l(:label_query).downcase) %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<p><%= link_to icon_with_label('add', l(:label_user_new)), new_group_users_path(@group), :remote => true, :class => "icon icon-add" %></p>
|
||||
<p><%= link_to sprite_icon('add', l(:label_user_new)), new_group_users_path(@group), :remote => true, :class => "icon icon-add" %></p>
|
||||
|
||||
<% if @group.users.any? %>
|
||||
<table class="list users">
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('add', l(:label_group_new)), new_group_path, :class => 'icon icon-add' %>
|
||||
<%= link_to sprite_icon('add', l(:label_group_new)), new_group_path, :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<%= title l(:label_group_plural) %>
|
||||
@ -9,7 +9,7 @@
|
||||
<label for='name'><%= l(:label_group) %>:</label>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
||||
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||||
<%= link_to icon_with_label('reload', l(:button_clear)), groups_path, :class => 'icon icon-reload' %>
|
||||
<%= link_to sprite_icon('reload', l(:button_clear)), groups_path, :class => 'icon icon-reload' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(icon_with_label('edit', l(:button_edit)), edit_group_path(@group), :class => 'icon icon-edit') if User.current.admin? %>
|
||||
<%= link_to(sprite_icon('edit', l(:button_edit)), edit_group_path(@group), :class => 'icon icon-edit') if User.current.admin? %>
|
||||
</div>
|
||||
|
||||
<h2><%= @group.name %></h2>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(icon_with_label('add', l(:label_issue_status_new)), new_issue_status_path, :class => 'icon icon-add') %>
|
||||
<%= link_to(icon_with_label('table-multiple', l(:label_update_issue_done_ratios)), update_issue_done_ratio_issue_statuses_path, :class => 'icon icon-multiple', :method => 'post', :data => {:confirm => l(:text_are_you_sure)}) if Issue.use_status_for_done_ratio? %>
|
||||
<%= link_to(sprite_icon('add', l(:label_issue_status_new)), new_issue_status_path, :class => 'icon icon-add') %>
|
||||
<%= link_to(sprite_icon('table-multiple', l(:label_update_issue_done_ratios)), update_issue_done_ratio_issue_statuses_path, :class => 'icon icon-multiple', :method => 'post', :data => { :confirm => l(:text_are_you_sure)}) if Issue.use_status_for_done_ratio? %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_issue_status_plural)%></h2>
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)), edit_issue_path(@issue),
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_issue_path(@issue),
|
||||
:onclick => 'showAndScrollTo("update", "issue_notes"); return false;',
|
||||
:class => 'icon icon-edit ', :accesskey => accesskey(:edit) if @issue.editable? %>
|
||||
<%= link_to icon_with_label('time-add', l(:button_log_time)), new_issue_time_entry_path(@issue),
|
||||
<%= link_to sprite_icon('time-add', l(:button_log_time)), new_issue_time_entry_path(@issue),
|
||||
:class => 'icon icon-time-add ' if User.current.allowed_to?(:log_time, @project) %>
|
||||
<%= watcher_link(@issue, User.current) %>
|
||||
<%= link_to icon_with_label('copy', l(:button_copy)), project_copy_issue_path(@project, @issue),
|
||||
<%= link_to sprite_icon('copy', l(:button_copy)), project_copy_issue_path(@project, @issue),
|
||||
:class => 'icon icon-copy ' if User.current.allowed_to?(:copy_issues, @project) && Issue.allowed_target_projects.any? %>
|
||||
<%= actions_dropdown do %>
|
||||
<%= copy_object_url_link(issue_url(@issue, only_path: false)) %>
|
||||
<%= link_to icon_with_label('del', l(:button_delete_object, object_name: l(:label_issue).downcase)), issue_path(@issue),
|
||||
<%= link_to sprite_icon('del', l(:button_delete_object, object_name: l(:label_issue).downcase)), issue_path(@issue),
|
||||
:data => {:confirm => issues_destroy_confirmation_message(@issue)},
|
||||
:method => :delete, :class => 'icon icon-del ' if @issue.deletable? %>
|
||||
<% end %>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true},
|
||||
:onchange => "updateIssueFrom('#{escape_javascript(update_issue_form_path(@project, @issue))}', this)",
|
||||
:title => @issue.status.description %>
|
||||
<%= content_tag 'a', icon_with_label('help', l(:label_open_issue_statuses_description)), :class => 'icon-only icon-help', :title => l(:label_open_issue_statuses_description), :onclick => "showModal('issue_statuses_description', '500px'); return false;", :href => '#' if @allowed_statuses.any? {|s| s.description.present? } %>
|
||||
<%= content_tag 'a', sprite_icon('help', l(:label_open_issue_statuses_description)), :class => 'icon-only icon-help', :title => l(:label_open_issue_statuses_description), :onclick => "showModal('issue_statuses_description', '500px'); return false;", :href => '#' if @allowed_statuses.any? {|s| s.description.present? } %>
|
||||
<% if @issue.transition_warning %>
|
||||
<span class="icon-only icon-warning" title="<%= @issue.transition_warning %>"><%= @issue.transition_warning %></span>
|
||||
<% end %>
|
||||
@ -36,7 +36,7 @@
|
||||
<p><%= f.select :category_id, category_options,
|
||||
{:include_blank => true, :required => @issue.required_attribute?('category_id')},
|
||||
:onchange => ("updateIssueFrom('#{escape_javascript(update_issue_form_path(@project, @issue))}', this)" if @issue.new_record?) %>
|
||||
<%= link_to(icon_with_label('add', l(:label_issue_category_new)),
|
||||
<%= link_to(sprite_icon('add', l(:label_issue_category_new)),
|
||||
new_project_issue_category_path(@issue.project),
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
@ -49,7 +49,7 @@
|
||||
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
|
||||
<p><%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version),
|
||||
:include_blank => true, :required => @issue.required_attribute?('fixed_version_id') %>
|
||||
<%= link_to(icon_with_label('add', l(:label_version_new)),
|
||||
<%= link_to(sprite_icon('add', l(:label_version_new)),
|
||||
new_project_version_path(@issue.project),
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<%= f.select :tracker_id, trackers_options_for_select(@issue), {:required => true},
|
||||
:onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)",
|
||||
:title => @issue.tracker.description %>
|
||||
<%= content_tag 'a', icon_with_label('help', l(:label_open_trackers_description)), :class => 'icon-only icon-help', :title => l(:label_open_trackers_description), :onclick => "showModal('trackers_description', '500px'); return false;", :href => '#' if trackers_for_select(@issue).any? {|t| t.description.present? } %>
|
||||
<%= content_tag 'a', sprite_icon('help', l(:label_open_trackers_description)), :class => 'icon-only icon-help', :title => l(:label_open_trackers_description), :onclick => "showModal('trackers_description', '500px'); return false;", :href => '#' if trackers_for_select(@issue).any? {|t| t.description.present? } %>
|
||||
</p>
|
||||
<%= render partial: 'issues/trackers_description', locals: {trackers: trackers_for_select(@issue)} %>
|
||||
<% end %>
|
||||
@ -40,7 +40,7 @@
|
||||
},
|
||||
:no_label => true %>
|
||||
<% end %>
|
||||
<%= link_to_function content_tag(:span, icon_with_label('edit', l(:button_edit)), :class => 'icon icon-edit'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
|
||||
<%= link_to_function content_tag(:span, sprite_icon('edit', l(:button_edit)), :class => 'icon icon-edit'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
|
||||
</p>
|
||||
<%= wikitoolbar_for 'issue_description', preview_issue_path(:project_id => @issue.project, :issue_id => @issue.id) %>
|
||||
<% end %>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<%= watchers_checkboxes(@issue, users_for_new_issue_watchers(@issue)) %>
|
||||
</span>
|
||||
<span class="search_for_watchers">
|
||||
<%= link_to icon_with_label('add', l(:label_search_for_watchers), size: 12),
|
||||
<%= link_to sprite_icon('add', l(:label_search_for_watchers), size: 12),
|
||||
{:controller => 'watchers', :action => 'new', :project_id => @issue.project},
|
||||
:class => 'icon icon-add-bullet',
|
||||
:remote => true,
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
<div class="contextual">
|
||||
<% if User.current.allowed_to?(:add_issues, @project, :global => true) && (@project.nil? || Issue.allowed_target_trackers(@project).any?) %>
|
||||
<%= link_to icon_with_label('add', l(:label_issue_new)), _new_project_issue_path(@project), :class => 'icon icon-add new-issue' %>
|
||||
<%= link_to sprite_icon('add', l(:label_issue_new)), _new_project_issue_path(@project), :class => 'icon icon-add new-issue' %>
|
||||
<% end %>
|
||||
<%= actions_dropdown do %>
|
||||
<% if @project %>
|
||||
<%= link_to icon_with_label('summary', l(:field_summary)), project_issues_report_path(@project), :class => 'icon icon-stats' %>
|
||||
<%= link_to sprite_icon('summary', l(:field_summary)), project_issues_report_path(@project), :class => 'icon icon-stats' %>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.allowed_to?(:import_issues, @project, :global => true) %>
|
||||
<%= link_to icon_with_label('import', l(:button_import)), new_issues_import_path(:project_id => @project), :class => 'icon icon-import' %>
|
||||
<%= link_to sprite_icon('import', l(:button_import)), new_issues_import_path(:project_id => @project), :class => 'icon icon-import' %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to_if_authorized icon_with_label('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'issues'},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:edit_project, @project) %>
|
||||
<%= link_to_if_authorized sprite_icon('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'issues'},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:edit_project, @project) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
<%= export_csv_separator_select_tag %>
|
||||
<% if @issue_count > Setting.issues_export_limit.to_i %>
|
||||
<p class="icon icon-warning">
|
||||
<%= icon_with_label('warning', l(:setting_issues_export_limit)) %>: <%= Setting.issues_export_limit.to_i %>
|
||||
<%= sprite_icon('warning', l(:setting_issues_export_limit)) %>: <%= Setting.issues_export_limit.to_i %>
|
||||
</p>
|
||||
<% end %>
|
||||
<p class="buttons">
|
||||
|
||||
@ -4,10 +4,10 @@
|
||||
<% if time_entry.editable_by?(User.current) -%>
|
||||
<div class="contextual">
|
||||
<span class="journal-actions">
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)), edit_time_entry_path(time_entry),
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_time_entry_path(time_entry),
|
||||
:title => l(:button_edit),
|
||||
:class => 'icon-only icon-edit ' %>
|
||||
<%= link_to icon_with_label('del', l(:button_delete)), time_entry_path(time_entry),
|
||||
<%= link_to sprite_icon('del', l(:button_delete)), time_entry_path(time_entry),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => :delete,
|
||||
:title => l(:button_delete),
|
||||
|
||||
@ -6,7 +6,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
||||
xml.link "rel" => "self", "href" => url_for(:format => 'atom', :key => User.current.atom_key, :only_path => false)
|
||||
xml.link "rel" => "alternate", "href" => home_url
|
||||
xml.id home_url
|
||||
xml.icon favicon_url
|
||||
xml.sprite_icon favicon_url
|
||||
xml.updated((@journals.first ? @journals.first.event_datetime : Time.now).xmlschema)
|
||||
xml.author {xml.name "#{Setting.app_title}"}
|
||||
@journals.each do |change|
|
||||
|
||||
@ -11,12 +11,12 @@
|
||||
'#message_topic_wiki'
|
||||
) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<%= link_to(
|
||||
icon_with_label('edit', l(:button_edit)),
|
||||
sprite_icon('edit', l(:button_edit)),
|
||||
{:action => 'edit', :id => @topic},
|
||||
:class => 'icon icon-edit'
|
||||
) if @message.editable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
icon_with_label('del', l(:button_delete)),
|
||||
sprite_icon('del', l(:button_delete)),
|
||||
{:action => 'destroy', :id => @topic},
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
<% unless @replies.empty? %>
|
||||
<div id="replies">
|
||||
<h3 class="comments icon icon-comments"><%= icon_with_label('comments', l(:label_reply_plural)) %> (<%= @reply_count %>)</h3>
|
||||
<h3 class="comments icon icon-comments"><%= sprite_icon('comments', l(:label_reply_plural)) %> (<%= @reply_count %>)</h3>
|
||||
<% if !@topic.locked? && authorize_for('messages', 'reply') && @replies.size >= 3 %>
|
||||
<p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content', :scroll => "message_content" %></p>
|
||||
<% end %>
|
||||
@ -50,13 +50,13 @@
|
||||
icon_only: true
|
||||
) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<%= link_to(
|
||||
icon_with_label('edit', l(:button_edit), icon_only: true),
|
||||
sprite_icon('edit', l(:button_edit), icon_only: true),
|
||||
{:action => 'edit', :id => message},
|
||||
:title => l(:button_edit),
|
||||
:class => 'icon icon-edit'
|
||||
) if message.editable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
icon_with_label('del', l(:button_delete), icon_only: true),
|
||||
sprite_icon('del', l(:button_delete), icon_only: true),
|
||||
{:action => 'destroy', :id => message},
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
|
||||
|
||||
<% if @user.own_account_deletable? %>
|
||||
<p><%= link_to(icon_with_label('del', l(:button_delete_my_account)), delete_my_account_path, :class => 'icon icon-del') %></p>
|
||||
<p><%= link_to(sprite_icon('del', l(:button_delete_my_account)), delete_my_account_path, :class => 'icon icon-del') %></p>
|
||||
<% end %>
|
||||
|
||||
<h4><%= l(:label_feeds_access_key) %></h4>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div class="contextual">
|
||||
<%= additional_emails_link(@user) %>
|
||||
<%= link_to(icon_with_label('key', l(:button_change_password)), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
|
||||
<%= link_to(sprite_icon('key', l(:button_change_password)), { :action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
|
||||
<%= call_hook(:view_my_account_contextual, :user => @user)%>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to_function icon_with_label('settings', l(:label_options)), "$('##{block}-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>
|
||||
<%= link_to_function sprite_icon('settings', l(:label_options)), "$('##{block}-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>
|
||||
</div>
|
||||
|
||||
<h3>
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<div class="contextual">
|
||||
<%= link_to_function icon_with_label('settings', l(:label_options)), "$('#timelog-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>
|
||||
<%= link_to_function sprite_icon('settings', l(:label_options)), "$('#timelog-settings').toggle();", :class => 'icon-only icon-settings', :title => l(:label_options) %>
|
||||
</div>
|
||||
|
||||
<h3>
|
||||
<%= link_to l(:label_spent_time), time_entries_path(:user_id => 'me') %>
|
||||
(<%= l(:label_last_n_days, days) %>: <%= l_hours_short entries.sum(&:hours) %>)
|
||||
<%= link_to icon_with_label('time-add', l(:button_log_time)), new_time_entry_path, :class => "icon-only icon-add", :title => l(:button_log_time) if User.current.allowed_to?(:log_time, nil, :global => true) %>
|
||||
<%= link_to sprite_icon('time-add', l(:button_log_time)), new_time_entry_path, :class => "icon-only icon-add", :title => l(:button_log_time) if User.current.allowed_to?(:log_time, nil, :global => true) %>
|
||||
</h3>
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(icon_with_label('add', l(:label_news_new)),
|
||||
<%= link_to(sprite_icon('add', l(:label_news_new)),
|
||||
(@project ? project_news_index_path(@project) : news_index_path),
|
||||
:class => 'icon icon-add add-news-link',
|
||||
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if User.current.allowed_to?(:manage_news, @project, global: true) %>
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<%= breadcrumb link_to(l(:label_news_plural), project_news_index_path(@project)) %>
|
||||
<div class="contextual">
|
||||
<%= watcher_link(@news, User.current) %>
|
||||
<%= link_to(icon_with_label('edit', l(:button_edit)),
|
||||
edit_news_path(@news),
|
||||
:class => 'icon icon-edit',
|
||||
:accesskey => accesskey(:edit),
|
||||
:onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %>
|
||||
<%= link_to(sprite_icon('edit', l(:button_edit)),
|
||||
edit_news_path(@news),
|
||||
:class => 'icon icon-edit',
|
||||
:accesskey => accesskey(:edit),
|
||||
:onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %>
|
||||
<%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
|
||||
</div>
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
<% @comments.each do |comment| %>
|
||||
<% next if comment.new_record? %>
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized icon_with_label('del', l(:button_delete)), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
|
||||
<%= link_to_if_authorized sprite_icon('del', l(:button_delete)), { :controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,
|
||||
:title => l(:button_delete),
|
||||
:class => 'icon-only icon-del' %>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<% memberships = principal.memberships.preload(:member_roles, :roles).sorted_by_project.to_a %>
|
||||
|
||||
<p><%= link_to icon_with_label('add', l(:label_add_projects)), new_principal_membership_path(principal), :remote => true, :class => "icon icon-add" %></p>
|
||||
<p><%= link_to sprite_icon('add', l(:label_add_projects)), new_principal_membership_path(principal), :remote => true, :class => "icon icon-add" %></p>
|
||||
|
||||
<% if memberships.any? %>
|
||||
<table class="list memberships">
|
||||
@ -22,7 +22,7 @@
|
||||
<div id="member-<%= membership.id %>-form"></div>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)),
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)),
|
||||
edit_principal_membership_path(principal, membership),
|
||||
:remote => true,
|
||||
:class => 'icon icon-edit'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<% if @principals_by_role.any? %>
|
||||
<div class="members box">
|
||||
<h3 class="icon icon-group"><%= icon_with_label('group', l(:label_member_plural)) %></h3>
|
||||
<h3 class="icon icon-group"><%= sprite_icon('group', l(:label_member_plural)) %></h3>
|
||||
<% @principals_by_role.keys.sort.each do |role| %>
|
||||
<p><span class="label"><%= role %>:</span> <%= @principals_by_role[role].sort.collect{|p| link_to_principal(p, :class => p.is_a?(Group) ? 'icon icon-group' : nil)}.join(", ").html_safe %></p>
|
||||
<% end %>
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
|
||||
<% if User.current.logged? %>
|
||||
<p style="text-align:right;">
|
||||
<span class="icon icon-user my-project"><%= icon_with_label('user', l(:label_my_projects)) %></span>
|
||||
<span class="icon icon-bookmarked-project"><%= icon_with_label('bookmarked', l(:label_my_bookmarks)) %></span>
|
||||
<span class="icon icon-user my-project"><%= sprite_icon('user', l(:label_my_projects)) %></span>
|
||||
<span class="icon icon-bookmarked-project"><%= sprite_icon('bookmarked', l(:label_my_bookmarks)) %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(icon_with_label('del', l(:button_reset)), project_enumerations_path(@project),
|
||||
<%= link_to(sprite_icon('del', l(:button_reset)), project_enumerations_path(@project),
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'icon icon-del') %>
|
||||
<% if User.current.admin? %>
|
||||
<%= link_to icon_with_label('settings', l(:label_administration)), enumerations_path, :class => "icon icon-settings" %>
|
||||
<%= link_to sprite_icon('settings', l(:label_administration)), enumerations_path, :class => "icon icon-settings" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<% if User.current.allowed_to?(:manage_boards, @project) %>
|
||||
<p><%= link_to icon_with_label('add', l(:label_board_new)), new_project_board_path(@project), :class => 'icon icon-add' %></p>
|
||||
<p><%= link_to sprite_icon('add', l(:label_board_new)), new_project_board_path(@project), :class => 'icon icon-add' %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @project.boards.any? %>
|
||||
@ -16,7 +16,7 @@
|
||||
<div class="table-list-cell buttons">
|
||||
<% if User.current.allowed_to?(:manage_boards, @project) %>
|
||||
<%= reorder_handle(board) %>
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)), edit_project_board_path(@project, board), :class => 'icon icon-edit' %>
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_project_board_path(@project, board), :class => 'icon icon-edit' %>
|
||||
<%= delete_link project_board_path(@project, board) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<p><%= link_to icon_with_label('add', l(:label_issue_category_new)), new_project_issue_category_path(@project), :class => 'icon icon-add' if User.current.allowed_to?(:manage_categories, @project) %></p>
|
||||
<p><%= link_to sprite_icon('add', l(:label_issue_category_new)), new_project_issue_category_path(@project), :class => 'icon icon-add' if User.current.allowed_to?(:manage_categories, @project) %></p>
|
||||
|
||||
<% if @project.issue_categories.any? %>
|
||||
<table class="list">
|
||||
@ -15,7 +15,7 @@
|
||||
<td><%= category.assigned_to.name if category.assigned_to %></td>
|
||||
<td class="buttons">
|
||||
<% if User.current.allowed_to?(:manage_categories, @project) %>
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)), edit_issue_category_path(category), :class => 'icon icon-edit' %>
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_issue_category_path(category), :class => 'icon icon-edit' %>
|
||||
<%= delete_link issue_category_path(category) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<% unless @trackers.empty? %>
|
||||
<fieldset class="box tabular" id="project_trackers"><legend><%= toggle_checkboxes_link('#project_trackers input[type=checkbox]') %><%= l(:label_tracker_plural)%></legend>
|
||||
<% if User.current.admin? %>
|
||||
<div class="contextual"><%= link_to icon_with_label('settings', l(:label_administration)), trackers_path, :class => "icon icon-settings" %></div>
|
||||
<div class="contextual"><%= link_to sprite_icon('settings', l(:label_administration)), trackers_path, :class => "icon icon-settings" %></div>
|
||||
<% end %>
|
||||
<% @trackers.each do |tracker| %>
|
||||
<label class="floating">
|
||||
@ -19,7 +19,7 @@
|
||||
<% unless @issue_custom_fields.empty? %>
|
||||
<fieldset class="box tabular" id="project_issue_custom_fields"><legend><%= toggle_checkboxes_link('#project_issue_custom_fields input[type=checkbox]:enabled') %><%=l(:label_custom_field_plural)%></legend>
|
||||
<% if User.current.admin? %>
|
||||
<div class="contextual"><%= link_to icon_with_label('settings', l(:label_administration)), custom_fields_path, :class => "icon icon-settings" %></div>
|
||||
<div class="contextual"><%= link_to sprite_icon('settings', l(:label_administration)), custom_fields_path, :class => "icon icon-settings" %></div>
|
||||
<% end %>
|
||||
<% all_issue_custom_field_ids = @project.all_issue_custom_fields.ids %>
|
||||
<% @issue_custom_fields.each do |custom_field| %>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<% members = @project.memberships.preload(:project).sorted.to_a %>
|
||||
|
||||
<% if User.current.admin? %>
|
||||
<div class="contextual"><%= link_to icon_with_label('settings', l(:label_administration)), users_path, :class => "icon icon-settings" %></div>
|
||||
<div class="contextual"><%= link_to sprite_icon('settings', l(:label_administration)), users_path, :class => "icon icon-settings" %></div>
|
||||
<% end %>
|
||||
<p><%= link_to icon_with_label('add', l(:label_member_new)), new_project_membership_path(@project), :remote => true, :class => "icon icon-add" %></p>
|
||||
<p><%= link_to sprite_icon('add', l(:label_member_new)), new_project_membership_path(@project), :remote => true, :class => "icon icon-add" %></p>
|
||||
|
||||
<% if members.any? %>
|
||||
<table class="list members">
|
||||
@ -20,7 +20,7 @@
|
||||
<% next if member.new_record? %>
|
||||
<tr id="member-<%= member.id %>" class="member">
|
||||
<td class="name icon icon-<%= member.principal.class.name.downcase %>">
|
||||
<%= icon_for_principal(member.principal.class.name.downcase) %>
|
||||
<%= principal_icon(member.principal.class.name.downcase) %>
|
||||
<%= link_to_user member.principal %>
|
||||
</td>
|
||||
<td class="roles">
|
||||
@ -28,7 +28,7 @@
|
||||
<div id="member-<%= member.id %>-form"></div>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)),
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)),
|
||||
edit_membership_path(member),
|
||||
:remote => true,
|
||||
:class => 'icon icon-edit' %>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
||||
<p><%= link_to icon_with_label('add', l(:label_repository_new)), new_project_repository_path(@project), :class => 'icon icon-add' %></p>
|
||||
<p><%= link_to sprite_icon('add', l(:label_repository_new)), new_project_repository_path(@project), :class => 'icon icon-add' %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @project.repositories.any? %>
|
||||
@ -26,10 +26,10 @@
|
||||
<td><%= repository.url %></td>
|
||||
<td class="buttons">
|
||||
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
||||
<%= link_to(icon_with_label('user', l(:label_user_plural)), committers_repository_path(repository),
|
||||
:class => 'icon icon-user') %>
|
||||
<%= link_to(icon_with_label('edit', l(:button_edit)), edit_repository_path(repository),
|
||||
:class => 'icon icon-edit') %>
|
||||
<%= link_to(sprite_icon('user', l(:label_user_plural)), committers_repository_path(repository),
|
||||
:class => 'icon icon-user') %>
|
||||
<%= link_to(sprite_icon('edit', l(:button_edit)), edit_repository_path(repository),
|
||||
:class => 'icon icon-edit') %>
|
||||
<%= delete_link repository_path(repository) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<% if @versions.any? %>
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('lock', l(:label_close_versions)), close_completed_project_versions_path(@project), :class => 'icon icon-locked', :method => :put %>
|
||||
<%= link_to sprite_icon('lock', l(:label_close_versions)), close_completed_project_versions_path(@project), :class => 'icon icon-locked', :method => :put %>
|
||||
</div>
|
||||
<% end %>
|
||||
<p>
|
||||
<%= link_to icon_with_label('add', l(:label_version_new)), new_project_version_path(@project, :back_url => ''), :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %>
|
||||
<%= link_to sprite_icon('add', l(:label_version_new)), new_project_version_path(@project, :back_url => ''), :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %>
|
||||
</p>
|
||||
|
||||
<%= form_tag(settings_project_path(@project, :tab => 'versions'), :method => :get) do %>
|
||||
@ -14,7 +14,7 @@
|
||||
<label for='name'><%= l(:label_version) %>:</label>
|
||||
<%= text_field_tag 'version_name', @version_name, :size => 30 %>
|
||||
<%= submit_tag l(:button_apply), :name => nil %>
|
||||
<%= link_to icon_with_label('reload', l(:button_clear)), settings_project_path(@project, :tab => 'versions'), :class => 'icon icon-reload' %>
|
||||
<%= link_to sprite_icon('reload', l(:button_clear)), settings_project_path(@project, :tab => 'versions'), :class => 'icon icon-reload' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
<td><%= link_to_if_authorized(version.wiki_page_title, {:controller => 'wiki', :action => 'show', :project_id => version.project, :id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %></td>
|
||||
<td class="buttons">
|
||||
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)), edit_version_path(version), :class => 'icon icon-edit' %>
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_version_path(version), :class => 'icon icon-edit' %>
|
||||
<%= delete_link version_path(version) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
@ -3,28 +3,28 @@
|
||||
|
||||
<%= actions_dropdown do %>
|
||||
<% if User.current.allowed_to?(:add_subprojects, @project) %>
|
||||
<%= link_to icon_with_label('add', l(:label_subproject_new)), new_project_path(:parent_id => @project), :class => 'icon icon-add' %>
|
||||
<%= link_to sprite_icon('add', l(:label_subproject_new)), new_project_path(:parent_id => @project), :class => 'icon icon-add' %>
|
||||
<% end %>
|
||||
<% if User.current.allowed_to?(:close_project, @project) %>
|
||||
<% if @project.active? %>
|
||||
<%= link_to icon_with_label('lock', l(:button_close)), close_project_path(@project), :data => {:confirm => l(:text_project_close_confirmation, @project.to_s)}, :method => :post, :class => 'icon icon-lock' %>
|
||||
<%= link_to sprite_icon('lock', l(:button_close)), close_project_path(@project), :data => { :confirm => l(:text_project_close_confirmation, @project.to_s)}, :method => :post, :class => 'icon icon-lock' %>
|
||||
<% else %>
|
||||
<%= link_to icon_with_label('unlock', l(:button_reopen)), reopen_project_path(@project), :data => {:confirm => l(:text_project_reopen_confirmation, @project.to_s)}, :method => :post, :class => 'icon icon-unlock' %>
|
||||
<%= link_to sprite_icon('unlock', l(:button_reopen)), reopen_project_path(@project), :data => { :confirm => l(:text_project_reopen_confirmation, @project.to_s)}, :method => :post, :class => 'icon icon-unlock' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @project.deletable? %>
|
||||
<%= link_to icon_with_label('del', l(:button_delete)), project_path(@project), :method => :delete, :class => 'icon icon-del' %>
|
||||
<%= link_to sprite_icon('del', l(:button_delete)), project_path(@project), :method => :delete, :class => 'icon icon-del' %>
|
||||
<% end %>
|
||||
<%= link_to_if_authorized icon_with_label('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:edit_project, @project) %>
|
||||
<%= link_to_if_authorized sprite_icon('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:edit_project, @project) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_overview)%></h2>
|
||||
|
||||
<% unless @project.active? %>
|
||||
<p class="warning"><span class="icon icon-lock"><%= icon_with_label('lock', l(:text_project_closed)) %></span></p>
|
||||
<p class="warning"><span class="icon icon-lock"><%= sprite_icon('lock', l(:text_project_closed)) %></span></p>
|
||||
<% end %>
|
||||
|
||||
<div class="splitcontent">
|
||||
@ -48,11 +48,11 @@
|
||||
<% if User.current.allowed_to?(:view_issues, @project) %>
|
||||
<div class="issues box">
|
||||
<h3 class="icon icon-issue">
|
||||
<%= icon_with_label('issue', l(:label_issue_tracking)) %>
|
||||
<%= link_to icon_with_label('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'tracker'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
<%= sprite_icon('issue', l(:label_issue_tracking)) %>
|
||||
<%= link_to sprite_icon('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'tracker'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
</h3>
|
||||
<% if @trackers.present? %>
|
||||
<table class="list issue-report">
|
||||
@ -99,7 +99,7 @@
|
||||
|
||||
<% if User.current.allowed_to?(:view_time_entries, @project) %>
|
||||
<div class="spent_time box">
|
||||
<h3 class="icon icon-time"><%= icon_with_label('time', l(:label_time_tracking)) %></h3>
|
||||
<h3 class="icon icon-time"><%= sprite_icon('time', l(:label_time_tracking)) %></h3>
|
||||
<ul>
|
||||
<% if @total_estimated_hours.present? %>
|
||||
<li><%= l(:field_estimated_hours) %>: <%= l_hours(@total_estimated_hours) %>
|
||||
@ -123,7 +123,7 @@
|
||||
<div class="splitcontentright">
|
||||
<% if @news.any? && authorize_for('news', 'index') %>
|
||||
<div class="news box">
|
||||
<h3 class="icon icon-news"><%= icon_with_label('news', l(:label_news_latest))%></h3>
|
||||
<h3 class="icon icon-news"><%= sprite_icon('news', l(:label_news_latest))%></h3>
|
||||
<%= render :partial => 'news/news', :collection => @news %>
|
||||
<p><%= link_to l(:label_news_view_all), project_news_index_path(@project) %></p>
|
||||
</div>
|
||||
@ -133,7 +133,7 @@
|
||||
|
||||
<% if @subprojects.any? %>
|
||||
<div class="projects box">
|
||||
<h3 class="icon icon-projects"><%= icon_with_label('projects', l(:label_subproject_plural)) %></h3>
|
||||
<h3 class="icon icon-projects"><%= sprite_icon('projects', l(:label_subproject_plural)) %></h3>
|
||||
<div>
|
||||
<ul class="subprojects">
|
||||
<% @subprojects.each do |project| %>
|
||||
|
||||
@ -59,18 +59,18 @@
|
||||
</div>
|
||||
|
||||
<p class="buttons">
|
||||
<%= link_to_function icon_with_label('checked', l(:button_apply)), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to icon_with_label('reload', l(:button_clear)), { :set_filter => 1, :sort => '', :project_id => @project }, :class => 'icon icon-reload' %>
|
||||
<%= link_to_function sprite_icon('checked', l(:button_apply)), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to sprite_icon('reload', l(:button_clear)), { :set_filter => 1, :sort => '', :project_id => @project }, :class => 'icon icon-reload' %>
|
||||
<% if @query.new_record? %>
|
||||
<% if User.current.allowed_to?(:save_queries, @project, :global => true) %>
|
||||
<%= link_to_function icon_with_label('save', l(:button_save_object, object_name: l(:label_query).downcase)),
|
||||
<%= link_to_function sprite_icon('save', l(:button_save_object, object_name: l(:label_query).downcase)),
|
||||
"$('#query_type').prop('disabled',false);$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit()",
|
||||
:class => 'icon icon-save' %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if @query.editable_by?(User.current) %>
|
||||
<% redirect_params = (controller_name == 'admin' && action_name == 'projects') ? {:admin_projects => 1} : {} %>
|
||||
<%= link_to icon_with_label('edit', l(:button_edit_object, object_name: l(:label_query).downcase)), edit_query_path(@query, redirect_params), :class => 'icon icon-edit' %>
|
||||
<%= link_to sprite_icon('edit', l(:button_edit_object, object_name: l(:label_query).downcase)), edit_query_path(@query, redirect_params), :class => 'icon icon-edit' %>
|
||||
<%= delete_link query_path(@query, redirect_params), {}, l(:button_delete_object, object_name: l(:label_query).downcase) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<% if query.editable_by?(User.current) %>
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)), edit_query_path(query), :class => 'icon icon-edit' %>
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_query_path(query), :class => 'icon icon-edit' %>
|
||||
<%= delete_link query_path(query) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
@ -4,37 +4,37 @@
|
||||
<div class="splitcontentleft">
|
||||
<h3>
|
||||
<%=l(:field_tracker)%>
|
||||
<%= link_to icon_with_label('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'tracker'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
<%= link_to sprite_icon('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'tracker'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
</h3>
|
||||
<%= render :partial => 'simple', :locals => { :data => @issues_by_tracker, :field_name => "tracker_id", :rows => @trackers } %>
|
||||
<br />
|
||||
<h3>
|
||||
<%=l(:field_priority)%>
|
||||
<%= link_to icon_with_label('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'priority'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
<%= link_to sprite_icon('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'priority'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
</h3>
|
||||
<%= render :partial => 'simple', :locals => { :data => @issues_by_priority, :field_name => "priority_id", :rows => @priorities } %>
|
||||
<br />
|
||||
<h3>
|
||||
<%=l(:field_assigned_to)%>
|
||||
<%= link_to icon_with_label('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'assigned_to'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
<%= link_to sprite_icon('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'assigned_to'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
</h3>
|
||||
<%= render :partial => 'simple', :locals => { :data => @issues_by_assigned_to, :field_name => "assigned_to_id", :rows => @assignees } %>
|
||||
<br />
|
||||
<h3>
|
||||
<%=l(:field_author)%>
|
||||
<%= link_to icon_with_label('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'author'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
<%= link_to sprite_icon('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'author'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
</h3>
|
||||
<%= render :partial => 'simple', :locals => { :data => @issues_by_author, :field_name => "author_id", :rows => @authors } %>
|
||||
<br />
|
||||
@ -44,30 +44,30 @@
|
||||
<div class="splitcontentright">
|
||||
<h3>
|
||||
<%=l(:field_version)%>
|
||||
<%= link_to icon_with_label('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'version'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
<%= link_to sprite_icon('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'version'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
</h3>
|
||||
<%= render :partial => 'simple', :locals => { :data => @issues_by_version, :field_name => "fixed_version_id", :rows => @versions } %>
|
||||
<br />
|
||||
<% if @project.children.any? %>
|
||||
<h3>
|
||||
<%=l(:field_subproject)%>
|
||||
<%= link_to icon_with_label('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'subproject'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
<%= link_to sprite_icon('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'subproject'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
</h3>
|
||||
<%= render :partial => 'simple', :locals => { :data => @issues_by_subproject, :field_name => "project_id", :rows => @subprojects } %>
|
||||
<br />
|
||||
<% end %>
|
||||
<h3>
|
||||
<%=l(:field_category)%>
|
||||
<%= link_to icon_with_label('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'category'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
<%= link_to sprite_icon('zoom-in', l(:label_details)),
|
||||
project_issues_report_details_path(@project, :detail => 'category'),
|
||||
:class => 'icon-only icon-zoom-in',
|
||||
:title => l(:label_details) %>
|
||||
</h3>
|
||||
<%= render :partial => 'simple', :locals => { :data => @issues_by_category, :field_name => "category_id", :rows => @categories } %>
|
||||
<br />
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
:depth => (depth + 1),
|
||||
:parent_id => tr_id)) %>');"><%= sprite_icon('angle-right') %></span>
|
||||
<% end %>
|
||||
<%= link_to icon_for_file(entry, ent_name),
|
||||
{:action => (entry.is_dir? ? 'show' : 'entry'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev},
|
||||
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
|
||||
<%= link_to file_icon(entry, ent_name),
|
||||
{:action => (entry.is_dir? ? 'show' : 'entry'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev},
|
||||
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
|
||||
</td>
|
||||
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
|
||||
<% if @repository.report_last_commit %>
|
||||
|
||||
@ -4,22 +4,22 @@
|
||||
|
||||
<% if @entry && !@entry.is_dir? && @repository.supports_cat? %>
|
||||
<% download_label = @entry.size ? "#{l :button_download} (#{number_to_human_size @entry.size})" : l(:button_download) %>
|
||||
<%= link_to(icon_with_label('download', download_label),
|
||||
<%= link_to(sprite_icon('download', download_label),
|
||||
{:action => 'raw', :id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => to_path_param(@path),
|
||||
:rev => @rev}, class: 'icon icon-download') %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to icon_with_label('stats', l(:label_statistics)),
|
||||
<%= link_to sprite_icon('stats', l(:label_statistics)),
|
||||
{:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
|
||||
:class => 'icon icon-stats' if @repository.supports_history? %>
|
||||
|
||||
<%= actions_dropdown do %>
|
||||
<%= link_to_if_authorized icon_with_label('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'repositories'},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_repository, @project) %>
|
||||
<%= link_to icon_with_label('reload', l(:button_fetch_changesets)),
|
||||
<%= link_to_if_authorized sprite_icon('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'repositories'},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_repository, @project) %>
|
||||
<%= link_to sprite_icon('reload', l(:button_fetch_changesets)),
|
||||
{:action => :fetch_changesets, :id => @project, :repository_id => @repository.identifier_param},
|
||||
:class => 'icon icon-reload', :method => :post if User.current.allowed_to?(:manage_repository, @project) && !Setting.autofetch_changesets? %>
|
||||
<% end %>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<ul>
|
||||
<% @changeset.issues.visible.each do |issue| %>
|
||||
<li id="<%= "related-issue-#{issue.id}" %>"><%= link_to_issue issue %>
|
||||
<%= link_to(icon_with_label('link-break', l(:label_relation_delete)),
|
||||
<%= link_to(sprite_icon('link-break', l(:label_relation_delete)),
|
||||
{:controller => 'repositories', :action => 'remove_related_issue',
|
||||
:id => @project, :repository_id => @repository.identifier_param,
|
||||
:rev => @changeset.identifier, :issue_id => issue},
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('add', l(:label_role_new)), new_role_path, :class => 'icon icon-add' %>
|
||||
<%= link_to icon_with_label('summary', l(:label_permissions_report)), permissions_roles_path, :class => 'icon icon-summary' %>
|
||||
<%= link_to sprite_icon('add', l(:label_role_new)), new_role_path, :class => 'icon icon-add' %>
|
||||
<%= link_to sprite_icon('summary', l(:label_permissions_report)), permissions_roles_path, :class => 'icon icon-summary' %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_role_plural)%></h2>
|
||||
@ -18,13 +18,13 @@
|
||||
<td>
|
||||
<% unless role.builtin? || role.workflow_rules.exists? %>
|
||||
<span class="icon icon-warning">
|
||||
<%= icon_with_label('warning', l(:text_role_no_workflow)) %> (<%= link_to l(:button_edit), edit_workflows_path(:role_id => role) %>)
|
||||
<%= sprite_icon('warning', l(:text_role_no_workflow)) %> (<%= link_to l(:button_edit), edit_workflows_path(:role_id => role) %>)
|
||||
</span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= reorder_handle(role) unless role.builtin? %>
|
||||
<%= link_to icon_with_label('copy', l(:button_copy)), new_role_path(:copy => role), :class => 'icon icon-copy' %>
|
||||
<%= link_to sprite_icon('copy', l(:button_copy)), new_role_path(:copy => role), :class => 'icon icon-copy' %>
|
||||
<%= delete_link role_path(role) unless role.builtin? %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -120,7 +120,7 @@
|
||||
) %>
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= link_to(icon_with_label('del', l(:button_delete)), '#',
|
||||
<%= link_to(sprite_icon('del', l(:button_delete)), '#',
|
||||
:class => 'delete-commit-keywords icon-only icon-del',
|
||||
:title => l(:button_delete)) %>
|
||||
</td>
|
||||
@ -132,7 +132,7 @@
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="buttons">
|
||||
<%= link_to(icon_with_label('add', l(:button_add)), '#',
|
||||
<%= link_to(sprite_icon('add', l(:button_add)), '#',
|
||||
:class => 'add-commit-keywords icon-only icon-add',
|
||||
:title => l(:button_add)) %>
|
||||
</td>
|
||||
|
||||
@ -38,10 +38,10 @@
|
||||
<% end %>
|
||||
<td class="buttons">
|
||||
<% if entry.editable_by?(User.current) -%>
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)), edit_time_entry_path(entry),
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_time_entry_path(entry),
|
||||
:title => l(:button_edit),
|
||||
:class => 'icon-only icon-edit' %>
|
||||
<%= link_to icon_with_label('del', l(:button_delete)), time_entry_path(entry),
|
||||
<%= link_to sprite_icon('del', l(:button_delete)), time_entry_path(entry),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => :delete,
|
||||
:title => l(:button_delete),
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('time-add', l(:button_log_time)),
|
||||
<%= link_to sprite_icon('time-add', l(:button_log_time)),
|
||||
_new_time_entry_path(@project, @query.filtered_issue_id),
|
||||
:class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project, :global => true) %>
|
||||
<%= actions_dropdown do %>
|
||||
<% if User.current.allowed_to?(:import_time_entries, @project, :global => true) %>
|
||||
<%= link_to icon_with_label('import', l(:button_import)), new_time_entries_import_path(:project_id => @project), :class => 'icon icon-import' %>
|
||||
<%= link_to sprite_icon('import', l(:button_import)), new_time_entries_import_path(:project_id => @project), :class => 'icon icon-import' %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to_if_authorized icon_with_label('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'activities'},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_project_activities, @project) %>
|
||||
<%= link_to_if_authorized sprite_icon('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'activities'},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_project_activities, @project) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('add', l(:label_tracker_new)), new_tracker_path, :class => 'icon icon-add' %>
|
||||
<%= link_to icon_with_label('summary', l(:field_summary)), fields_trackers_path, :class => 'icon icon-summary' %>
|
||||
<%= link_to sprite_icon('add', l(:label_tracker_new)), new_tracker_path, :class => 'icon icon-add' %>
|
||||
<%= link_to sprite_icon('summary', l(:field_summary)), fields_trackers_path, :class => 'icon icon-summary' %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_tracker_plural)%></h2>
|
||||
@ -28,7 +28,7 @@
|
||||
</td>
|
||||
<td class="buttons">
|
||||
<%= reorder_handle(tracker) %>
|
||||
<%= link_to icon_with_label('copy', l(:button_copy)), new_tracker_path(:copy => tracker), :class => 'icon icon-copy' %>
|
||||
<%= link_to sprite_icon('copy', l(:button_copy)), new_tracker_path(:copy => tracker), :class => 'icon icon-copy' %>
|
||||
<%= delete_link tracker_path(tracker) %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('user', l(:label_profile)), user_path(@user), :class => 'icon icon-user' %>
|
||||
<%= link_to sprite_icon('user', l(:label_profile)), user_path(@user), :class => 'icon icon-user' %>
|
||||
<%= additional_emails_link(@user) %>
|
||||
<%= change_status_link(@user) %>
|
||||
<%= delete_link user_path(@user) if User.current != @user %>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('add', l(:label_user_new)), new_user_path, :class => 'icon icon-add' %>
|
||||
<%= link_to sprite_icon('add', l(:label_user_new)), new_user_path, :class => 'icon icon-add' %>
|
||||
<%= actions_dropdown do %>
|
||||
<% if User.current.allowed_to?(:import_users, nil, :global => true) %>
|
||||
<%= link_to icon_with_label('import', l(:button_import)), new_users_import_path, :class => 'icon icon-import' %>
|
||||
<%= link_to sprite_icon('import', l(:button_import)), new_users_import_path, :class => 'icon icon-import' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(icon_with_label('edit', l(:button_edit)), edit_user_path(@user), :class => 'icon icon-edit') if User.current.admin? && @user.logged? %>
|
||||
<%= link_to(sprite_icon('edit', l(:button_edit)), edit_user_path(@user), :class => 'icon icon-edit') if User.current.admin? && @user.logged? %>
|
||||
</div>
|
||||
|
||||
<h2><%= avatar @user, :size => "50" %> <%= @user.name %></h2>
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
</ul>
|
||||
<% if @completed_versions.present? %>
|
||||
<p>
|
||||
<%= link_to_function icon_with_label('angle-right', l(:label_completed_versions)),
|
||||
<%= link_to_function sprite_icon('angle-right', l(:label_completed_versions)),
|
||||
'$("#toggle-completed-versions").toggleClass("icon-collapsed icon-expanded"); $("#completed-versions").toggle()',
|
||||
:id => 'toggle-completed-versions', :class => 'icon icon-collapsed collapsible' %>
|
||||
<ul id = "completed-versions" style = "display:none;">
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(icon_with_label('add', l(:label_version_new)), new_project_version_path(@project),
|
||||
<%= link_to(sprite_icon('add', l(:label_version_new)), new_project_version_path(@project),
|
||||
:class => 'icon icon-add') if User.current.allowed_to?(:manage_versions, @project) %>
|
||||
<%= actions_dropdown do %>
|
||||
<%= link_to_if_authorized icon_with_label('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'versions'},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_versions, @project) %>
|
||||
<%= link_to_if_authorized sprite_icon('settings', l(:label_settings)),
|
||||
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'versions'},
|
||||
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_versions, @project) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<article class="version-article <%= version.css_classes %>">
|
||||
<% if User.current.allowed_to?(:manage_versions, version.project) %>
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)), edit_version_path(version), :title => l(:button_edit), :class => 'icon-only icon-edit' %>
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_version_path(version), :title => l(:button_edit), :class => 'icon-only icon-edit' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<header>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(icon_with_label('edit', l(:button_edit)), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
|
||||
<%= link_to_if_authorized(icon_with_label('edit', l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title)), {:controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %>
|
||||
<%= link_to(sprite_icon('edit', l(:button_edit)), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
|
||||
<%= link_to_if_authorized(sprite_icon('edit', l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title)), { :controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %>
|
||||
<%= delete_link version_path(@version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)) if User.current.allowed_to?(:manage_versions, @version.project) %>
|
||||
<%= link_to_new_issue(@version, @project) %>
|
||||
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<% if User.current.allowed_to?(:edit_wiki_pages, @project) &&
|
||||
(@wiki && @wiki.find_or_new_page('Sidebar').editable_by?(User.current)) %>
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('edit', l(:button_edit)), edit_project_wiki_page_path(@project, 'sidebar'),
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_project_wiki_page_path(@project, 'sidebar'),
|
||||
:class => 'icon icon-edit' %>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(icon_with_label('edit', l(:button_edit)), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit') %>
|
||||
<%= link_to(icon_with_label('history', l(:label_history)),
|
||||
<%= link_to(sprite_icon('edit', l(:button_edit)), { :action => 'edit', :id => @page.title}, :class => 'icon icon-edit') %>
|
||||
<%= link_to(sprite_icon('history', l(:label_history)),
|
||||
{:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<div class="contextual">
|
||||
<% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
|
||||
<%= link_to icon_with_label('add', l(:label_wiki_page_new)), new_project_wiki_page_path(@project), :remote => true, :class => 'icon icon-add' %>
|
||||
<%= link_to sprite_icon('add', l(:label_wiki_page_new)), new_project_wiki_page_path(@project), :remote => true, :class => 'icon icon-add' %>
|
||||
<% end %>
|
||||
<%= watcher_link(@wiki, User.current) %>
|
||||
<% if User.current.allowed_to?(:manage_wiki, @project) %>
|
||||
<%= link_to icon_with_label('del', l(:button_delete)), {:controller => 'wikis', :action => 'destroy', :id => @project}, :class => 'icon icon-del' %>
|
||||
<%= link_to sprite_icon('del', l(:button_delete)), { :controller => 'wikis', :action => 'destroy', :id => @project}, :class => 'icon icon-del' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="contextual">
|
||||
<%= link_to(icon_with_label('history', l(:label_history)), {:action => 'history', :id => @page.title},
|
||||
<%= link_to(sprite_icon('history', l(:label_history)), { :action => 'history', :id => @page.title},
|
||||
:class => 'icon icon-history') %>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<div class="contextual">
|
||||
<% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
|
||||
<%= link_to icon_with_label('add', l(:label_wiki_page_new)), new_project_wiki_page_path(@project), :remote => true, :class => 'icon icon-add' %>
|
||||
<%= link_to sprite_icon('add', l(:label_wiki_page_new)), new_project_wiki_page_path(@project), :remote => true, :class => 'icon icon-add' %>
|
||||
<% end %>
|
||||
<%= watcher_link(@wiki, User.current) %>
|
||||
<% if User.current.allowed_to?(:manage_wiki, @project) %>
|
||||
<%= link_to icon_with_label('del', l(:button_delete)), {:controller => 'wikis', :action => 'destroy', :id => @project}, :class => 'icon icon-del' %>
|
||||
<%= link_to sprite_icon('del', l(:button_delete)), { :controller => 'wikis', :action => 'destroy', :id => @project}, :class => 'icon icon-del' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@ -2,27 +2,27 @@
|
||||
|
||||
<% if @editable %>
|
||||
<% if @content.current_version? %>
|
||||
<%= link_to_if_authorized(icon_with_label('edit', l(:button_edit)), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
|
||||
<%= link_to_if_authorized(sprite_icon('edit', l(:button_edit)), { :action => 'edit', :id => @page.title}, :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
|
||||
<%= watcher_link(@page, User.current) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= actions_dropdown do %>
|
||||
<%= link_to_if_authorized(icon_with_label('history', l(:label_history)), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
|
||||
<%= link_to_if_authorized(sprite_icon('history', l(:label_history)), { :action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
|
||||
|
||||
<% if @editable %>
|
||||
<% if @content.current_version? %>
|
||||
<%= link_to_if_authorized(icon_with_label('lock', l(:button_lock)), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
|
||||
<%= link_to_if_authorized(icon_with_label('unlock', l(:button_unlock)), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
|
||||
<%= link_to_if_authorized(icon_with_label('move', l(:button_rename)), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') %>
|
||||
<%= link_to_if_authorized(icon_with_label('del', l(:button_delete)), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %>
|
||||
<%= link_to_if_authorized(sprite_icon('lock', l(:button_lock)), { :action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
|
||||
<%= link_to_if_authorized(sprite_icon('unlock', l(:button_unlock)), { :action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
|
||||
<%= link_to_if_authorized(sprite_icon('move', l(:button_rename)), { :action => 'rename', :id => @page.title}, :class => 'icon icon-move') %>
|
||||
<%= link_to_if_authorized(sprite_icon('del', l(:button_delete)), { :action => 'destroy', :id => @page.title}, :method => :delete, :data => { :confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %>
|
||||
<% else %>
|
||||
<%= link_to_if_authorized(icon_with_label('cancel', l(:button_rollback)), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %>
|
||||
<%= link_to_if_authorized(sprite_icon('cancel', l(:button_rollback)), { :action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
|
||||
<%= link_to icon_with_label('add', l(:label_wiki_page_new)), new_project_wiki_page_path(@project, :parent => @page.title), :remote => true, :class => 'icon icon-add' %>
|
||||
<%= link_to sprite_icon('add', l(:label_wiki_page_new)), new_project_wiki_page_path(@project, :parent => @page.title), :remote => true, :class => 'icon icon-add' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="contextual">
|
||||
<%= link_to icon_with_label('copy', l(:button_copy)), {:action => 'copy'}, :class => 'icon icon-copy' %>
|
||||
<%= link_to icon_with_label('summary', l(:field_summary)), {:action => 'index'}, :class => 'icon icon-summary' %>
|
||||
<%= link_to sprite_icon('copy', l(:button_copy)), { :action => 'copy'}, :class => 'icon icon-copy' %>
|
||||
<%= link_to sprite_icon('summary', l(:field_summary)), { :action => 'index'}, :class => 'icon icon-summary' %>
|
||||
</div>
|
||||
|
||||
@ -182,7 +182,7 @@ module Redmine
|
||||
end
|
||||
|
||||
label = if item.icon.present?
|
||||
icon_with_label(item.icon, h(caption))
|
||||
sprite_icon(item.icon, h(caption))
|
||||
else
|
||||
h(caption)
|
||||
end
|
||||
|
||||
@ -31,7 +31,7 @@ module Redmine
|
||||
html_options[:title] = l(:button_quote) if icon_only
|
||||
|
||||
link_to_function(
|
||||
icon_with_label('comment', l(:button_quote), icon_only: icon_only),
|
||||
sprite_icon('comment', l(:button_quote), icon_only: icon_only),
|
||||
quote_reply_function,
|
||||
html_options
|
||||
)
|
||||
|
||||
@ -248,10 +248,10 @@ module Redmine
|
||||
hide_label = args[1] || args[0] || l(:button_hide)
|
||||
js = "$('##{html_id}-show, ##{html_id}-hide').toggle(); $('##{html_id}').fadeToggle(150);"
|
||||
out = ''.html_safe
|
||||
out << link_to_function(icon_with_label('angle-right', show_label), js, :id => "#{html_id}-show", :class => 'icon icon-collapsed collapsible')
|
||||
out << link_to_function(sprite_icon('angle-right', show_label), js, :id => "#{html_id}-show", :class => 'icon icon-collapsed collapsible')
|
||||
out <<
|
||||
link_to_function(
|
||||
icon_with_label('angle-down', hide_label), js,
|
||||
sprite_icon('angle-down', hide_label), js,
|
||||
:id => "#{html_id}-hide",
|
||||
:class => 'icon icon-expanded collapsible',
|
||||
:style => 'display:none;'
|
||||
|
||||
@ -2027,7 +2027,7 @@ class ApplicationHelperTest < Redmine::HelperTest
|
||||
tags = principals_check_box_tags(name, principals)
|
||||
principals.each_with_index do |principal, i|
|
||||
assert_not_include avatar_tags[i], tags
|
||||
assert_include content_tag('span', icon_for_principal(principal.class.name.downcase), :class => "name icon icon-#{principal.class.name.downcase}"), tags
|
||||
assert_include content_tag('span', principal_icon(principal.class.name.downcase), :class => "name icon icon-#{principal.class.name.downcase}"), tags
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -28,7 +28,7 @@ class WatchersHelperTest < Redmine::HelperTest
|
||||
|
||||
test '#watcher_link with a non-watched object' do
|
||||
expected = link_to(
|
||||
icon_with_label("fav", "Watch"),
|
||||
sprite_icon("fav", "Watch"),
|
||||
"/watchers/watch?object_id=1&object_type=issue",
|
||||
:remote => true, :method => 'post', :class => "issue-1-watcher icon icon-fav-off"
|
||||
)
|
||||
@ -37,7 +37,7 @@ class WatchersHelperTest < Redmine::HelperTest
|
||||
|
||||
test '#watcher_link with a single object array' do
|
||||
expected = link_to(
|
||||
icon_with_label("fav", "Watch"),
|
||||
sprite_icon("fav", "Watch"),
|
||||
"/watchers/watch?object_id=1&object_type=issue",
|
||||
:remote => true, :method => 'post', :class => "issue-1-watcher icon icon-fav-off"
|
||||
)
|
||||
@ -46,7 +46,7 @@ class WatchersHelperTest < Redmine::HelperTest
|
||||
|
||||
test '#watcher_link with a multiple objects array' do
|
||||
expected = link_to(
|
||||
icon_with_label("fav", "Watch"),
|
||||
sprite_icon("fav", "Watch"),
|
||||
"/watchers/watch?object_id%5B%5D=1&object_id%5B%5D=3&object_type=issue",
|
||||
:remote => true, :method => 'post', :class => "issue-bulk-watcher icon icon-fav-off"
|
||||
)
|
||||
@ -61,7 +61,7 @@ class WatchersHelperTest < Redmine::HelperTest
|
||||
Watcher.create!(:watchable => Issue.find(1), :user => User.find(1))
|
||||
|
||||
expected = link_to(
|
||||
icon_with_label("fav", "Unwatch"),
|
||||
sprite_icon("fav", "Unwatch"),
|
||||
"/watchers/watch?object_id=1&object_type=issue",
|
||||
:remote => true, :method => 'delete', :class => "issue-1-watcher icon icon-fav"
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user