From e76d4c5c4c3f2beb8be1f441148e4627a14d37d1 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Wed, 21 Oct 2009 22:34:28 +0000 Subject: Added an active field track if an Enumeration is active on the frontend view. * Changed TimelogHelper#activity_collection_for_select_options to only use active TimeEntryActivities. * Changed TimelogHelper#activity_collection_for_select_options to return a blank option if the time_entry's current activity is inactive. #4077 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2946 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/enumerations/_form.rhtml | 5 ++++- app/views/enumerations/list.rhtml | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'app/views/enumerations') diff --git a/app/views/enumerations/_form.rhtml b/app/views/enumerations/_form.rhtml index 741bbc5d9..21b948166 100644 --- a/app/views/enumerations/_form.rhtml +++ b/app/views/enumerations/_form.rhtml @@ -6,6 +6,9 @@

<%= text_field 'enumeration', 'name' %>

+

+<%= check_box 'enumeration', 'active' %>

+

<%= check_box 'enumeration', 'is_default' %>

@@ -13,4 +16,4 @@ <% @enumeration.custom_field_values.each do |value| %>

<%= custom_field_tag_with_label :enumeration, value %>

<% end %> - \ No newline at end of file + diff --git a/app/views/enumerations/list.rhtml b/app/views/enumerations/list.rhtml index 3ae144487..817751ab2 100644 --- a/app/views/enumerations/list.rhtml +++ b/app/views/enumerations/list.rhtml @@ -6,10 +6,18 @@ <% enumerations = klass.all %> <% if enumerations.any? %> + + + + + + + <% enumerations.each do |enumeration| %> +
<%= l(:field_name) %><%= l(:field_is_default) %><%= l(:field_active) %>
<%= link_to h(enumeration), :action => 'edit', :id => enumeration %> <%= image_tag('true.png') if enumeration.is_default? %><%= image_tag('true.png') if enumeration.active? %> <%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %> <%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration }, -- cgit v1.2.3