diff --git a/plugins/mezuro/lib/mezuro_plugin/helpers/content_viewer_helper.rb b/plugins/mezuro/lib/mezuro_plugin/helpers/content_viewer_helper.rb index c828423..ca6282c 100644 --- a/plugins/mezuro/lib/mezuro_plugin/helpers/content_viewer_helper.rb +++ b/plugins/mezuro/lib/mezuro_plugin/helpers/content_viewer_helper.rb @@ -6,8 +6,8 @@ class MezuroPlugin::Helpers::ContentViewerHelper sprintf("%.2f", grade.to_f) end - def self.create_periodicity_options - [["Not Periodically", 0], ["1 day", 1], ["2 days", 2], ["Weekly", 7], ["Biweeky", 15], ["Monthly", 30]] + def self.periodicity_options + [["Not Periodically", 0], ["1 day", 1], ["2 days", 2], ["Weekly", 7], ["Biweeky", 15], ["Monthly", 30]] end def self.create_license_options @@ -39,11 +39,6 @@ class MezuroPlugin::Helpers::ContentViewerHelper ) end - def self.get_periodicity_option(index) - options = [["Not Periodically", 0], ["1 day", 1], ["2 days", 2], ["Weekly", 7], ["Biweeky", 15], ["Monthly", 30]] - selected_option = options.find { |option| option.last == index.to_i } - selected_option.first - end def self.format_name(metric_configuration_snapshot) metric_configuration_snapshot.metric.name.delete("() ") diff --git a/plugins/mezuro/views/mezuro_plugin_repository/edit.html.erb b/plugins/mezuro/views/mezuro_plugin_repository/edit.html.erb index 2b9031e..f27f850 100644 --- a/plugins/mezuro/views/mezuro_plugin_repository/edit.html.erb +++ b/plugins/mezuro/views/mezuro_plugin_repository/edit.html.erb @@ -8,19 +8,23 @@ <%= f.label :name, "Name:" %> <%= f.text_field :name %>

+

<%= f.label :description, "Description:" %> <%= f.text_field :description %>

- <%= required labelled_form_field _('License'), - f.select(:license, MezuroPlugin::Helpers::ContentViewerHelper.create_license_options) %>

+ <%= required labelled_form_field _('License'), + f.select(:license, MezuroPlugin::Helpers::ContentViewerHelper.create_license_options) %>
+

<%= f.label :process_period, "Process Period:" %> - <%= f.select(:process_period, MezuroPlugin::Helpers::ContentViewerHelper.create_periodicity_options) %> + <%= f.select(:process_period, MezuroPlugin::Helpers::ContentViewerHelper.periodicity_options, :selected => @repository.process_period.to_i) %>

+ +

<%= f.label :type, "Type:" %> <%= f.select :type, @repository_types%>

@@ -30,7 +34,7 @@ <%= f.text_field :address%>

-

+

<%= f.label :configuration_id, "Configuration:" %> <%= f.select :configuration_id, @configuration_select, :selected => @repository.configuration_id.to_i %>

-- libgit2 0.21.2