Commit 3d1e7d493cdaf39bd2b927d765620a74fad97260
Committed by
Paulo Meireles
1 parent
bc84b9cc
Exists in
master
and in
28 other branches
[Mezuro] Changed order of configurations to clone in configuration cms
view.
Showing
2 changed files
with
5 additions
and
5 deletions
Show diff stats
plugins/mezuro/lib/mezuro_plugin/configuration_content.rb
| @@ -43,7 +43,6 @@ class MezuroPlugin::ConfigurationContent < Article | @@ -43,7 +43,6 @@ class MezuroPlugin::ConfigurationContent < Article | ||
| 43 | rescue Exception => exception | 43 | rescue Exception => exception |
| 44 | errors.add_to_base(exception.message) | 44 | errors.add_to_base(exception.message) |
| 45 | end | 45 | end |
| 46 | - all_names_and_ids[-1] = "None" | ||
| 47 | all_names_and_ids | 46 | all_names_and_ids |
| 48 | end | 47 | end |
| 49 | 48 |
plugins/mezuro/views/cms/mezuro_plugin/_configuration_content.html.erb
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | <% | 3 | <% |
| 4 | kalibro_configuration = @article.title.nil? ? nil : @article.kalibro_configuration | 4 | kalibro_configuration = @article.title.nil? ? nil : @article.kalibro_configuration |
| 5 | - kalibro_configuration_names = @article.configuration_names_and_ids.values | 5 | + kalibro_configuration_names = ["None"] + @article.configuration_names_and_ids.values.sort |
| 6 | %> | 6 | %> |
| 7 | 7 | ||
| 8 | <%= error_messages_for 'kalibro_configuration' %> | 8 | <%= error_messages_for 'kalibro_configuration' %> |
| @@ -14,12 +14,13 @@ | @@ -14,12 +14,13 @@ | ||
| 14 | 14 | ||
| 15 | <%= required_fields_message %> | 15 | <%= required_fields_message %> |
| 16 | 16 | ||
| 17 | +<%= required f.text_field(:name) %> | ||
| 18 | + | ||
| 19 | +<%= f.text_field :description %><br/> | ||
| 20 | + | ||
| 17 | <%= if kalibro_configuration.nil? | 21 | <%= if kalibro_configuration.nil? |
| 18 | required labelled_form_field _('Clone Configuration'), | 22 | required labelled_form_field _('Clone Configuration'), |
| 19 | f.select(:configuration_to_clone_name, kalibro_configuration_names) | 23 | f.select(:configuration_to_clone_name, kalibro_configuration_names) |
| 20 | end %> | 24 | end %> |
| 21 | <br/> | 25 | <br/> |
| 22 | 26 | ||
| 23 | -<%= required f.text_field(:name) %> | ||
| 24 | - | ||
| 25 | -<%= f.text_field :description %><br/> |