diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-02-07 07:57:59 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-02-07 07:57:59 +0000 |
commit | 7b127ee489a134436ab457467c2da42e32aa652d (patch) | |
tree | 3b0437c386393ba8690998debd616a76a7f4b312 /app/views/custom_fields | |
parent | 09b95905dc2df3476ac46d2266bb6c9fd4bc2c93 (diff) | |
download | redmine-7b127ee489a134436ab457467c2da42e32aa652d.tar.gz redmine-7b127ee489a134436ab457467c2da42e32aa652d.zip |
Show tabs for existing custom field types only and adds a view for choosing the type when adding a new custom field.
git-svn-id: http://svn.redmine.org/redmine/trunk@12849 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/custom_fields')
-rw-r--r-- | app/views/custom_fields/_index.html.erb | 2 | ||||
-rw-r--r-- | app/views/custom_fields/index.html.erb | 10 | ||||
-rw-r--r-- | app/views/custom_fields/select_type.html.erb | 15 |
3 files changed, 24 insertions, 3 deletions
diff --git a/app/views/custom_fields/_index.html.erb b/app/views/custom_fields/_index.html.erb index 4752c2519..0b578d6ee 100644 --- a/app/views/custom_fields/_index.html.erb +++ b/app/views/custom_fields/_index.html.erb @@ -28,5 +28,3 @@ <% end; reset_cycle %> </tbody> </table> - -<p><%= link_to l(:label_custom_field_new), new_custom_field_path(:type => tab[:name]), :class => 'icon icon-add' %></p> diff --git a/app/views/custom_fields/index.html.erb b/app/views/custom_fields/index.html.erb index b4e87f066..e4464132f 100644 --- a/app/views/custom_fields/index.html.erb +++ b/app/views/custom_fields/index.html.erb @@ -1,3 +1,11 @@ +<div class="contextual"> +<%= link_to l(:label_custom_field_new), new_custom_field_path, :class => 'icon icon-add' %> +</div> + <%= title l(:label_custom_field_plural) %> -<%= render_tabs custom_fields_tabs %> +<% if @custom_fields_by_type.present? %> + <%= render_custom_fields_tabs(@custom_fields_by_type.keys) %> +<% else %> + <p class="nodata"><%= l(:label_no_data) %></p> +<% end %> diff --git a/app/views/custom_fields/select_type.html.erb b/app/views/custom_fields/select_type.html.erb new file mode 100644 index 000000000..fd9c5a210 --- /dev/null +++ b/app/views/custom_fields/select_type.html.erb @@ -0,0 +1,15 @@ +<%= title [l(:label_custom_field_plural), custom_fields_path], + l(:label_custom_field_new) %> + +<% selected = 0 %> +<%= form_tag new_custom_field_path, :method => 'get' do %> + <div class="box"> + <p><%= l(:label_custom_field_select_type) %>:</p> + <p> + <% custom_field_type_options.each do |name, type| %> + <label style="display:block;"><%= radio_button_tag 'type', type, 1==selected+=1 %> <%= name %></label> + <% end %> + </p> + </div> + <p><%= submit_tag l(:label_next).html_safe + " »".html_safe, :name => nil %></p> +<% end %> |