summaryrefslogtreecommitdiffstats
path: root/app/views/enumerations
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2006-12-05 20:45:04 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2006-12-05 20:45:04 +0000
commit96f83cc8f0f032554f771a59da22303cd473b878 (patch)
tree355a0d2ed653a5426c59ebf6a1fe65eba024b4d0 /app/views/enumerations
parenteabc04d8368824965d3ac8de3fa84502e9c05d38 (diff)
downloadredmine-96f83cc8f0f032554f771a59da22303cd473b878.tar.gz
redmine-96f83cc8f0f032554f771a59da22303cd473b878.zip
trunk moved from /trunk/redmine to /trunk
git-svn-id: http://redmine.rubyforge.org/svn/trunk@67 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/enumerations')
-rw-r--r--app/views/enumerations/_form.rhtml9
-rw-r--r--app/views/enumerations/edit.rhtml10
-rw-r--r--app/views/enumerations/list.rhtml21
-rw-r--r--app/views/enumerations/new.rhtml6
4 files changed, 46 insertions, 0 deletions
diff --git a/app/views/enumerations/_form.rhtml b/app/views/enumerations/_form.rhtml
new file mode 100644
index 000000000..637605939
--- /dev/null
+++ b/app/views/enumerations/_form.rhtml
@@ -0,0 +1,9 @@
+<%= error_messages_for 'enumeration' %>
+<div class="box">
+<!--[form:optvalue]-->
+<%= hidden_field 'enumeration', 'opt' %>
+
+<p><label for="enumeration_name"><%=l(:field_name)%></label>
+<%= text_field 'enumeration', 'name' %></p>
+<!--[eoform:optvalue]-->
+</div> \ No newline at end of file
diff --git a/app/views/enumerations/edit.rhtml b/app/views/enumerations/edit.rhtml
new file mode 100644
index 000000000..3002b5936
--- /dev/null
+++ b/app/views/enumerations/edit.rhtml
@@ -0,0 +1,10 @@
+<h2><%=l(:label_enumerations)%></h2>
+
+<%= start_form_tag({:action => 'update', :id => @enumeration}, :class => "tabular") %>
+ <%= render :partial => 'form' %>
+ <%= submit_tag l(:button_save) %>
+<%= end_form_tag %>
+
+<%= start_form_tag :action => 'destroy', :id => @enumeration %>
+ <%= submit_tag l(:button_delete) %>
+<%= end_form_tag %> \ No newline at end of file
diff --git a/app/views/enumerations/list.rhtml b/app/views/enumerations/list.rhtml
new file mode 100644
index 000000000..15b91c1ac
--- /dev/null
+++ b/app/views/enumerations/list.rhtml
@@ -0,0 +1,21 @@
+<h2><%=l(:label_enumerations)%></h2>
+
+<% Enumeration::OPTIONS.each do |option, name| %>
+
+ <% if @params[:opt]==option %>
+
+ <p><%= image_tag 'dir_open' %> <b><%= l(name) %></b></p>
+ <ul>
+ <% for value in Enumeration.find(:all, :conditions => ["opt = ?", option]) %>
+ <li><%= link_to value.name, :action => 'edit', :id => value %></li>
+ <% end %>
+ </ul>
+ <ul>
+ <li><%= link_to ('&#187; ' + l(:label_new)), :action => 'new', :opt => option %></li>
+ </ul>
+
+ <% else %>
+ <p><%= image_tag 'dir' %> <%= link_to l(name), :opt => option %></p>
+ <% end %>
+
+<% end %> \ No newline at end of file
diff --git a/app/views/enumerations/new.rhtml b/app/views/enumerations/new.rhtml
new file mode 100644
index 000000000..0a773519d
--- /dev/null
+++ b/app/views/enumerations/new.rhtml
@@ -0,0 +1,6 @@
+<h2><%= l(@enumeration.option_name) %>: <%=l(:label_enumeration_new)%></h2>
+
+<%= start_form_tag({:action => 'create'}, :class => "tabular") %>
+ <%= render :partial => 'form' %>
+ <%= submit_tag l(:button_create) %>
+<%= end_form_tag %>