-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from mezuro/helpcontainer
Helpcontainer Form tooltips
- Loading branch information
Showing
16 changed files
with
475 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,68 @@ | ||
<%= render :partial => 'shared/form_errors', :locals => {:object => @compound_metric_configuration} %> | ||
<div class="row margin-left-none"> | ||
<div class="form-table span9"> | ||
|
||
<%= f.fields_for :metric do |metric| %> | ||
<%= render partial: "metric_options", :locals => {:f => metric, :metric => @compound_metric_configuration.metric} %> | ||
<% end %> | ||
<%= f.fields_for :metric do |metric| %> | ||
<%= render partial: "metric_options", :locals => {:f => metric, :metric => @compound_metric_configuration.metric} %> | ||
<% end %> | ||
|
||
<div class="form-group"> | ||
<%= f.label :code, class: 'control-label' %> | ||
<%= f.text_field :code, class: 'form-control' %> | ||
</div> | ||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :code, class: 'control-label' %> | ||
<%= f.text_field :code, class: 'text-field' %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
Code it is a variable that holds the value of a metric analysis. It's used inside a compound metric | ||
</p> | ||
<p> | ||
Example : | ||
Code foo := 10 | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :weight, class: 'control-label' %> | ||
<%= f.text_field :weight, class: 'form-control' %> | ||
</div> | ||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :weight, class: 'control-label' %> | ||
<%= f.text_field :weight, class: 'text-field' %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
It's the weight of the metric | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :aggregation_form, 'Aggregation Form', class: 'control-label' %> | ||
<%= f.select( :aggregation_form, aggregation_options, {class: 'form-control'} ) %> | ||
</div> | ||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :aggregation_form, 'Aggregation Form', class: 'control-label' %> | ||
<%= f.select( :aggregation_form, aggregation_options, {class: 'form-control'} ) %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
It's the aggregation form of the metric | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<% if @compound_metric_configuration.persisted? %> | ||
<%= hidden_field_tag(:reading_group_id, @compound_metric_configuration.reading_group_id) %> | ||
<% else %> | ||
<div class="form-group"> | ||
<%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %> | ||
<%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %> | ||
<% if @compound_metric_configuration.persisted? %> | ||
<%= hidden_field_tag(:reading_group_id, @metric_configuration.reading_group_id) %> | ||
<% else %> | ||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %> | ||
<%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
The reading group that is associated with this metric | ||
</p> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
|
||
</div> | ||
<br> | ||
<%= f.submit 'Save', class: 'btn btn-primary' %> | ||
<%= link_to 'Back', mezuro_configuration_path(@compound_metric_configuration.configuration_id), class: 'btn btn-default' %> |
63 changes: 45 additions & 18 deletions
63
app/views/compound_metric_configurations/_metric_options.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,48 @@ | ||
<div class="form-group"> | ||
<%= f.label :name, class: 'control-label' %> | ||
<%= f.text_field :name, class: 'form-control', value: (metric.name unless metric.nil?) %> | ||
</div> | ||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :name, class: 'control-label' %> | ||
<%= f.text_field :name, class: 'text-field', value: (metric.name unless metric.nil?) %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
A custom name for your compound metric. | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :description, class: 'control-label' %> | ||
<%= f.text_field :description, class: 'form-control', value: (metric.description unless metric.nil?) %> | ||
</div> | ||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :description, class: 'control-label' %> | ||
<%= f.text_field :description, class: 'text-field', value: (metric.description unless metric.nil?) %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
A short description about your compound metric. | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :script, class: 'control-label' %> | ||
<%= f.text_area :script, class: 'form-control', value: (metric.script unless metric.nil?) %> | ||
</div> | ||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :script, class: 'control-label' %> | ||
<%= f.text_area :script, class: 'text-area', value: (metric.script unless metric.nil?) %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
A mathematic expression to calculate your compound metric. | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :scope, 'Scope', class: 'control-label' %> | ||
<%= f.select( :scope, scope_options, {class: 'form-control', selected: (metric.scope unless metric.nil?)} ) %> | ||
</div> | ||
|
||
<%= f.hidden_field(:compound, { value: "true"}) %> | ||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :scope, 'Scope', class: 'control-label' %> | ||
<%= f.select( :scope, scope_options, {class: 'form-control', selected: (metric.scope unless metric.nil?)} ) %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
With which code type your metric is designed to work? | ||
</p> | ||
</div> | ||
</div> | ||
<%= f.hidden_field(:compound, { value: "true"}) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,66 @@ | ||
<%= render :partial => 'shared/form_errors', :locals => {:object => @metric_configuration} %> | ||
|
||
<div class="form-group"> | ||
<%= f.label :code, class: 'control-label' %> | ||
<%= f.text_field :code, class: 'form-control' %> | ||
</div> | ||
<div class="row margin-left-none"> | ||
<div class="form-table span9"> | ||
|
||
<div class="form-group"> | ||
<%= f.label :weight, class: 'control-label' %> | ||
<%= f.text_field :weight, class: 'form-control' %> | ||
</div> | ||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :code, class: 'control-label' %> | ||
<%= f.text_field :code, class: 'text-field' %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
Code it is a variable that holds the value of a metric analysis. It's used inside a compound metric | ||
</p> | ||
<p> | ||
Example : | ||
Code foo := 10 | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :aggregation_form, 'Aggregation Form', class: 'control-label' %> | ||
<%= f.select( :aggregation_form, aggregation_options, {class: 'form-control'} ) %> | ||
</div> | ||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :weight, class: 'control-label' %> | ||
<%= f.text_field :weight, class: 'text-field' %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
It's the weight of the metric | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :aggregation_form, 'Aggregation Form', class: 'control-label' %> | ||
<%= f.select( :aggregation_form, aggregation_options, {class: 'form-control'} ) %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
It's the aggregation form of the metric | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<% if @metric_configuration.persisted? %> | ||
<%= hidden_field_tag(:reading_group_id, @metric_configuration.reading_group_id) %> | ||
<% else %> | ||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %> | ||
<%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
The reading group that is associated with this metric | ||
</p> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
||
<% if @metric_configuration.persisted? %> | ||
<%= hidden_field_tag(:reading_group_id, @metric_configuration.reading_group_id) %> | ||
<% else %> | ||
<div class="form-group"> | ||
<%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %> | ||
<%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %> | ||
</div> | ||
<% end %> | ||
</div> | ||
|
||
<%= hidden_field_tag(:metric_name, @metric_configuration.metric.name) %> | ||
<%= hidden_field_tag(:base_tool_name, @metric_configuration.base_tool_name) %> | ||
|
||
<br> | ||
<%= f.submit 'Save', class: 'btn btn-primary' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,39 @@ | ||
<%= form_for(@mezuro_configuration, :html => { role: 'form' }) do |f| %> | ||
<%= render :partial => 'shared/form_errors', :locals => {:object => @mezuro_configuration} %> | ||
|
||
<div class="form-group"> | ||
<%= f.label :name, class: 'control-label' %><br> | ||
<%= f.text_field :name, class: 'form-control' %> | ||
</div> | ||
<div class="row margin-left-none"> | ||
<div class="form-table span9"> | ||
|
||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :name, class: 'control-label' %><br> | ||
<%= f.text_field :name, class: 'text-field' %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
Your configuration name! | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="form-row"> | ||
<div class="field-container"> | ||
<%= f.label :description, class: 'control-label' %><br> | ||
<%= f.text_area :description, class: 'text-area' %> | ||
</div> | ||
<div class="help-container"> | ||
<p> | ||
Your configuration description! | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :description, class: 'control-label' %><br> | ||
<%= f.text_area :description, class: 'form-control' %> | ||
</div> | ||
</div> | ||
|
||
<div class="row margin-left-none" style="margin-top: 20px"> | ||
<%= f.submit 'Save', class: 'btn btn-primary' %> | ||
|
||
<%= link_to 'Back', mezuro_configurations_path, class: 'btn btn-default' %> | ||
</div> | ||
|
||
<% end %> |
Oops, something went wrong.