diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-17 20:46:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-17 20:46:22 +0000 |
commit | f741ca726978cfc352a0387f4694d7e29fb72803 (patch) | |
tree | 8e0bee09680a21deb14f04eac25ff43ed1626931 /app | |
parent | 388805ad58381a95bec3da8204c0784f0483c1a0 (diff) | |
download | redmine-f741ca726978cfc352a0387f4694d7e29fb72803.tar.gz redmine-f741ca726978cfc352a0387f4694d7e29fb72803.zip |
Adds an helper for displaying the 'checked' image.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3600 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 6 | ||||
-rw-r--r-- | app/views/admin/projects.rhtml | 2 | ||||
-rw-r--r-- | app/views/custom_fields/_index.rhtml | 4 | ||||
-rw-r--r-- | app/views/enumerations/list.rhtml | 4 | ||||
-rw-r--r-- | app/views/issue_statuses/index.html.erb | 4 | ||||
-rw-r--r-- | app/views/projects/settings/_activities.rhtml | 2 | ||||
-rw-r--r-- | app/views/users/index.rhtml | 2 |
7 files changed, 15 insertions, 9 deletions
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 @@ <tr class="<%= cycle("odd", "even") %> <%= css_project_classes(project) %>"> <td class="name" style="padding-left: <%= level %>em;"><%= project.active? ? link_to(h(project.name), :controller => 'projects', :action => 'settings', :id => project) : h(project.name) %></td> <td><%= textilizable project.short_description, :project => project %></td> - <td align="center"><%= image_tag 'true.png' if project.is_public? %></td> + <td align="center"><%= checked_image project.is_public? %></td> <td align="center"><%= format_date(project.created_on) %></td> <td class="buttons"> <%= 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 @@ <tr class="<%= cycle("odd", "even") %>"> <td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td> <td align="center"><%= l(CustomField::FIELD_FORMATS[custom_field.field_format][:name]) %></td> - <td align="center"><%= image_tag 'true.png' if custom_field.is_required? %></td> + <td align="center"><%= checked_image custom_field.is_required? %></td> <% if tab[:name] == 'IssueCustomField' %> - <td align="center"><%= image_tag 'true.png' if custom_field.is_for_all? %></td> + <td align="center"><%= checked_image custom_field.is_for_all? %></td> <td align="center"><%= l(:label_x_projects, :count => custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %></td> <% end %> <td align="center" style="width:15%;"><%= reorder_links('custom_field', {:action => 'edit', :id => custom_field}) %></td> 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| %> <tr class="<%= cycle('odd', 'even') %>"> <td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td> - <td class="center" style="width:15%;"><%= image_tag('true.png') if enumeration.is_default? %></td> - <td class="center" style="width:15%;"><%= image_tag('true.png') if enumeration.active? %></td> + <td class="center" style="width:15%;"><%= checked_image enumeration.is_default? %></td> + <td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td> <td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %></td> <td class="buttons"> <%= 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? %> <td align="center"><%= h status.default_done_ratio %></td> <% end %> - <td align="center"><%= image_tag 'true.png' if status.is_default? %></td> - <td align="center"><%= image_tag 'true.png' if status.is_closed? %></td> + <td align="center"><%= checked_image status.is_default? %></td> + <td align="center"><%= checked_image status.is_closed? %></td> <td align="center" style="width:15%;"><%= reorder_links('issue_status', {:action => 'update', :id => status}) %></td> <td class="buttons"> <%= 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) %> </td> - <td align="center" style="width:15%;"><%= image_tag('true.png') unless enumeration.project %></td> + <td align="center" style="width:15%;"><%= checked_image !enumeration.project %></td> <% enumeration.custom_field_values.each do |value| %> <td align="center"> <%= 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 @@ <td class="firstname"><%= h(user.firstname) %></td> <td class="lastname"><%= h(user.lastname) %></td> <td class="email"><%= mail_to(h(user.mail)) %></td> - <td align="center"><%= image_tag('true.png') if user.admin? %></td> + <td align="center"><%= checked_image user.admin? %></td> <td class="created_on" align="center"><%= format_time(user.created_on) %></td> <td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td> <td><small><%= change_status_link(user) %></small></td> |