use new form styles in plugin

Signed-off-by: Florian Kraft <f.kraft@finn.de>
pull/6827/head
Florian Kraft 10 years ago
parent 480cf2d7f5
commit 77dc0e8088
No known key found for this signature in database
GPG Key ID: 786CD08D94605A9E
  1. 8
      app/views/projects/settings/_backlogs_settings.html.erb
  2. 34
      app/views/shared/_settings.html.erb
  3. 16
      app/views/shared/_view_my_account.html.erb
  4. 2
      app/views/version_settings/_form.html.erb
  5. 35
      app/views/versions/_form.html.erb

@ -31,7 +31,7 @@ See doc/COPYRIGHT.rdoc for more details.
<% statuses_done_for_project = @project.done_statuses.select(:id).map(&:id) %>
<%= form_tag(:controller => '/projects', :action => "project_done_statuses", :id => @project) do %>
<%= styled_form_tag(:controller => '/projects', :action => "project_done_statuses", :id => @project) do %>
<table class="list">
<thead>
@ -48,8 +48,8 @@ See doc/COPYRIGHT.rdoc for more details.
</td>
<td style="text-align:center">
<% checkbox_id = status.name.parameterize.underscore %>
<%= label_tag checkbox_id, l('backlogs.label_is_done_status', status_name: status.name), class: 'hidden-for-sighted' %>
<%= (check_box_tag 'statuses[][status_id]', status.id.to_s, statuses_done_for_project.include?(status.id), id: checkbox_id) %>
<%= styled_label_tag checkbox_id, l('backlogs.label_is_done_status', status_name: status.name), class: 'hidden-for-sighted' %>
<%= (styled_check_box_tag 'statuses[][status_id]', status.id.to_s, statuses_done_for_project.include?(status.id), id: checkbox_id) %>
</td>
</tr>
<% end %>
@ -61,6 +61,6 @@ See doc/COPYRIGHT.rdoc for more details.
<h2><%=l('backlogs.rebuild_positions')%></h2>
<%= form_tag(:controller => '/projects', :action => "rebuild_positions", :id => @project) do %>
<%= styled_form_tag(:controller => '/projects', :action => "rebuild_positions", :id => @project) do %>
<p><%= submit_tag l('backlogs.rebuild'), class: 'button' %></p>
<% end %>

@ -60,31 +60,31 @@ See doc/COPYRIGHT.rdoc for more details.
};
$("#settings_task_type").change(enable_apply);
$("#settings_story_types").change(enable_apply);
$("#settings_story_types").changes(enable_apply);
enable_apply();
});
</script>
<% end %>
<p>
<%= label_tag("settings[story_types]", l(:backlogs_story_type)) %>
<%= select_tag("settings[story_types]",
<div class="form--field">
<%= styled_label_tag("settings[story_types]", l(:backlogs_story_type)) %>
<%= styled_select_tag("settings[story_types]",
options_from_collection_for_select(Type.all, :id, :name, Story.types), :multiple => true) %>
</p>
<p>
<%= label_tag("settings[task_type]", l(:backlogs_task_type)) %>
<%= select_tag("settings[task_type]",
</div>
<div class="form--field">
<%= styled_label_tag("settings[task_type]", l(:backlogs_task_type)) %>
<%= styled_select_tag("settings[task_type]",
options_from_collection_for_select(Type.all, :id, :name, Task.type)) %>
</p>
<p>
<%= label_tag("settings[points_burn_direction]", l(:backlogs_points_burn_direction)) %>
<%= select_tag("settings[points_burn_direction]",
</div>
<div class="form--field">
<%= styled_label_tag("settings[points_burn_direction]", l(:backlogs_points_burn_direction)) %>
<%= styled_select_tag("settings[points_burn_direction]",
options_for_select([[l(:label_points_burn_up), 'up'], [l(:label_points_burn_down), 'down']],
Setting.plugin_openproject_backlogs["points_burn_direction"])) %>
</p>
<p>
<%= label_tag("settings[wiki_template]", l(:backlogs_wiki_template)) %>
<%= text_field_tag("settings[wiki_template]",
</div>
<div class="form--field">
<%= styled_label_tag("settings[wiki_template]", l(:backlogs_wiki_template)) %>
<%= styled_text_field_tag("settings[wiki_template]",
Setting.plugin_openproject_backlogs["wiki_template"]) %>
</p>
</div>

@ -35,13 +35,11 @@ See doc/COPYRIGHT.rdoc for more details.
++#%>
<h3><%=l(:label_backlogs)%></h3>
<div class="box tabular">
<p>
<%= label :backlogs, :task_color %>
<%= text_field :backlogs, :task_color, :value => color %>
</p>
<p>
<label for="backlogs_versions_default_fold_state"><%= I18n.t('backlogs.label_versions_default_fold_state') %></label>
<%= check_box_tag :"backlogs[versions_default_fold_state]", "closed", versions_default_fold_state == "closed" %>
</p>
<div class="form--field">
<%= styled_label :backlogs, :task_color %>
<%= styled_text_field :backlogs, :task_color, :value => color %>
</div>
<div class="form--field">
<%= styled_label_tag :backlogs_versions_default_fold_state, I18n.t('backlogs.label_versions_default_fold_state') %>
<%= styled_check_box_tag :"backlogs[versions_default_fold_state]", "closed", versions_default_fold_state == "closed" %>
</div>

@ -36,8 +36,6 @@ See doc/COPYRIGHT.rdoc for more details.
<%= error_messages_for 'version' %>
<div class="box">
<% if @project.enabled_modules.collect(&:name).include?("backlogs") %>
<%= version_settings_fields @version, @project %>
<% end %>
</div>

@ -37,26 +37,37 @@ See doc/COPYRIGHT.rdoc for more details.
<%= error_messages_for 'version' %>
<%= back_url_hidden_field_tag %>
<div class="box">
<% if @version.project == @project %>
<p><%= f.text_field :name, :size => 60, :required => true %></p>
<p><%= f.text_field :description, :size => 60 %></p>
<p><%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %></p>
<p><%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %></p>
<p><%= f.text_field :start_date, :size => 10 %><%= calendar_for('version_start_date') %></p>
<p><%= f.text_field :effective_date, :size => 10 %><%= calendar_for('version_effective_date') %></p>
<p><%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %></p>
<div class="form--field">
<%= f.text_field :name, required: true %>
</div>
<div class="form--field">
<%= f.text_field :description %>
</div>
<div class="form--field">
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
</div>
<div class="form--field">
<%= f.text_field :wiki_page_title, label: :label_wiki_page, disabled: @project.wiki.nil? %>
</div>
<div class="form--field">
<%= f.text_field :start_date %><%= calendar_for('version_start_date') %>
</div>
<div class="form--field">
<%= f.text_field :effective_date %><%= calendar_for('version_effective_date') %>
</div>
<div class="form--field">
<%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>
</div>
<% end %>
<% if @project.enabled_modules.collect(&:name).include?("backlogs") %>
<%= version_settings_fields @version, @project %>
<% end %>
<% if @version.project == @project %>
<% @version.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :version, value %></p>
<div class="form--field"><%= custom_field_tag_with_label :version, value %></div>
<% end %>
<% end %>
</div>

Loading…
Cancel
Save