diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 760ac4f07..bbc1a9887 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -687,6 +687,12 @@ module ApplicationHelper content_tag('p', legend, :class => 'pourcent') end + def checked_image(checked=true) + if checked + image_tag 'toggle_check.png' + end + end + def context_menu(url) unless @context_menu_included content_for :header_tags do diff --git a/app/views/admin/projects.rhtml b/app/views/admin/projects.rhtml index f267c136e..62db29a32 100644 --- a/app/views/admin/projects.rhtml +++ b/app/views/admin/projects.rhtml @@ -29,7 +29,7 @@ <%= css_project_classes(project) %>"> <%= project.active? ? link_to(h(project.name), :controller => 'projects', :action => 'settings', :id => project) : h(project.name) %> <%= textilizable project.short_description, :project => project %> - <%= image_tag 'true.png' if project.is_public? %> + <%= checked_image project.is_public? %> <%= format_date(project.created_on) %> <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-lock') if project.active? %> diff --git a/app/views/custom_fields/_index.rhtml b/app/views/custom_fields/_index.rhtml index c70fbea48..8ef7dcba2 100644 --- a/app/views/custom_fields/_index.rhtml +++ b/app/views/custom_fields/_index.rhtml @@ -15,9 +15,9 @@ "> <%= link_to custom_field.name, :action => 'edit', :id => custom_field %> <%= l(CustomField::FIELD_FORMATS[custom_field.field_format][:name]) %> - <%= image_tag 'true.png' if custom_field.is_required? %> + <%= checked_image custom_field.is_required? %> <% if tab[:name] == 'IssueCustomField' %> - <%= image_tag 'true.png' if custom_field.is_for_all? %> + <%= checked_image custom_field.is_for_all? %> <%= l(:label_x_projects, :count => custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %> <% end %> <%= reorder_links('custom_field', {:action => 'edit', :id => custom_field}) %> diff --git a/app/views/enumerations/list.rhtml b/app/views/enumerations/list.rhtml index 0c45d9a32..29927e104 100644 --- a/app/views/enumerations/list.rhtml +++ b/app/views/enumerations/list.rhtml @@ -16,8 +16,8 @@ <% enumerations.each do |enumeration| %> <%= link_to h(enumeration), :action => 'edit', :id => enumeration %> - <%= image_tag('true.png') if enumeration.is_default? %> - <%= image_tag('true.png') if enumeration.active? %> + <%= checked_image enumeration.is_default? %> + <%= checked_image enumeration.active? %> <%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %> <%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration }, diff --git a/app/views/issue_statuses/index.html.erb b/app/views/issue_statuses/index.html.erb index a98ed0cd8..03f767252 100644 --- a/app/views/issue_statuses/index.html.erb +++ b/app/views/issue_statuses/index.html.erb @@ -23,8 +23,8 @@ <% if Issue.use_status_for_done_ratio? %> <%= h status.default_done_ratio %> <% end %> - <%= image_tag 'true.png' if status.is_default? %> - <%= image_tag 'true.png' if status.is_closed? %> + <%= checked_image status.is_default? %> + <%= checked_image status.is_closed? %> <%= reorder_links('issue_status', {:action => 'update', :id => status}) %> <%= link_to(l(:button_delete), { :action => 'destroy', :id => status }, diff --git a/app/views/projects/settings/_activities.rhtml b/app/views/projects/settings/_activities.rhtml index 019355833..d7b1f3a98 100644 --- a/app/views/projects/settings/_activities.rhtml +++ b/app/views/projects/settings/_activities.rhtml @@ -17,7 +17,7 @@ <%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %> <%= h(enumeration) %> - <%= image_tag('true.png') unless enumeration.project %> + <%= checked_image !enumeration.project %> <% enumeration.custom_field_values.each do |value| %> <%= custom_field_tag "enumerations[#{enumeration.id}]", value %> diff --git a/app/views/users/index.rhtml b/app/views/users/index.rhtml index 6222f0027..1b4702872 100644 --- a/app/views/users/index.rhtml +++ b/app/views/users/index.rhtml @@ -34,7 +34,7 @@ <%= h(user.firstname) %> <%= h(user.lastname) %> <%= mail_to(h(user.mail)) %> - <%= image_tag('true.png') if user.admin? %> + <%= checked_image user.admin? %> <%= format_time(user.created_on) %> <%= format_time(user.last_login_on) unless user.last_login_on.nil? %> <%= change_status_link(user) %>