Commit 748f28e8b010069fb41ac2189ca3f1da497890ab
1 parent
d7043019
Exists in
colab
and in
4 other branches
Tooltip messages for configurations, metric configurations and ranges.
Signed off by: Heitor Reis <marcheing@gmail.com>
Showing
4 changed files
with
96 additions
and
97 deletions
Show diff stats
app/views/compound_metric_configurations/_form.html.erb
| ... | ... | @@ -3,52 +3,52 @@ |
| 3 | 3 | <div class="form-table span9"> |
| 4 | 4 | |
| 5 | 5 | <%= f.fields_for :metric do |metric| %> |
| 6 | - <%= render partial: "metric_options", :locals => {:f => metric, :metric => @compound_metric_configuration.metric} %> | |
| 6 | + <%= render partial: "metric_options", :locals => {:f => metric, :metric => @compound_metric_configuration.metric} %> | |
| 7 | 7 | <% end %> |
| 8 | 8 | |
| 9 | - <div class="form-row"> | |
| 10 | - <div class="field-container"> | |
| 11 | - <%= f.label :code, class: 'control-label' %> | |
| 12 | - <%= f.text_field :code, class: 'text-field' %> | |
| 13 | - </div> | |
| 14 | - <div class="help-container"> | |
| 15 | - <p> | |
| 16 | - Code is a variable that keeps the value of a metric analysis. It is used inside a compound metric. | |
| 17 | - </p> | |
| 18 | - <p> | |
| 19 | - Example: | |
| 20 | - Code foo := 10 | |
| 21 | - </p> | |
| 22 | - </div> | |
| 9 | + <div class="form-row"> | |
| 10 | + <div class="field-container"> | |
| 11 | + <%= f.label :code, class: 'control-label' %> | |
| 12 | + <%= f.text_field :code, class: 'text-field' %> | |
| 23 | 13 | </div> |
| 14 | + <div class="help-container"> | |
| 15 | + <p> | |
| 16 | + A variable that holds the value of a metric calculation. It can be used in the script of another compound metric. | |
| 17 | + </p> | |
| 18 | + <p> | |
| 19 | + Example: | |
| 20 | + Code foo := 10 | |
| 21 | + </p> | |
| 22 | + </div> | |
| 23 | + </div> | |
| 24 | 24 | |
| 25 | - <div class="form-row"> | |
| 26 | - <div class="field-container"> | |
| 27 | - <%= f.label :weight, class: 'control-label' %> | |
| 28 | - <%= f.text_field :weight, class: 'text-field' %> | |
| 29 | - </div> | |
| 30 | - <div class="help-container"> | |
| 31 | - <p> | |
| 32 | - It is the weight of the metric. | |
| 33 | - </p> | |
| 34 | - </div> | |
| 25 | + <div class="form-row"> | |
| 26 | + <div class="field-container"> | |
| 27 | + <%= f.label :weight, class: 'control-label' %> | |
| 28 | + <%= f.text_field :weight, class: 'text-field' %> | |
| 29 | + </div> | |
| 30 | + <div class="help-container"> | |
| 31 | + <p> | |
| 32 | + It is used to calculate the weighted average of a <%= link_to 'module', tutorials_path("keywords", anchor: "module")%>'s grade. | |
| 33 | + </p> | |
| 35 | 34 | </div> |
| 35 | + </div> | |
| 36 | 36 | |
| 37 | - <% if @compound_metric_configuration.persisted? %> | |
| 38 | - <%= hidden_field_tag(:reading_group_id, @metric_configuration.reading_group_id) %> | |
| 39 | - <% else %> | |
| 40 | - <div class="form-row"> | |
| 41 | - <div class="field-container"> | |
| 42 | - <%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %> | |
| 43 | - <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %> | |
| 44 | - </div> | |
| 45 | - <div class="help-container"> | |
| 46 | - <p> | |
| 47 | - The Reading Group associated with this metric. | |
| 48 | - </p> | |
| 49 | - </div> | |
| 50 | - </div> | |
| 51 | - <% end %> | |
| 37 | + <% if @compound_metric_configuration.persisted? %> | |
| 38 | + <%= hidden_field_tag(:reading_group_id, @metric_configuration.reading_group_id) %> | |
| 39 | + <% else %> | |
| 40 | + <div class="form-row"> | |
| 41 | + <div class="field-container"> | |
| 42 | + <%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %> | |
| 43 | + <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %> | |
| 44 | + </div> | |
| 45 | + <div class="help-container"> | |
| 46 | + <p> | |
| 47 | + The <%= link_to 'Reading Group', tutorials_path('keywords', anchor: 'reading_group') %> associated with this metric. | |
| 48 | + </p> | |
| 49 | + </div> | |
| 50 | + </div> | |
| 51 | + <% end %> | |
| 52 | 52 | </div> |
| 53 | 53 | </div> |
| 54 | 54 | <br> | ... | ... |
app/views/compound_metric_configurations/_metric_options.html.erb
| ... | ... | @@ -29,7 +29,7 @@ |
| 29 | 29 | </div> |
| 30 | 30 | <div class="help-container"> |
| 31 | 31 | <p> |
| 32 | - A mathematical expression to calculate your compound metric. | |
| 32 | + A mathematical expression (in javascript) to calculate your compound metric. It needs a return statement. The codes of already created metrics can be used inside the script. | |
| 33 | 33 | </p> |
| 34 | 34 | </div> |
| 35 | 35 | </div> |
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | </div> |
| 42 | 42 | <div class="help-container"> |
| 43 | 43 | <p> |
| 44 | - The code type your metric is designed to work with. | |
| 44 | + The <%= link_to 'granularity', tutorials_path("keywords", anchor: "granularity")%> of the <%= link_to 'modules', tutorials_path("keywords", anchor: "module")%> measured by this metric. | |
| 45 | 45 | </p> |
| 46 | 46 | </div> |
| 47 | 47 | </div> | ... | ... |
app/views/metric_configurations/_form.html.erb
| ... | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | </div> |
| 11 | 11 | <div class="help-container"> |
| 12 | 12 | <p> |
| 13 | - It is used to calculate the weighted average of a <%= link_to 'module', tutorials_path("keywords", anchor: "module")%>. | |
| 13 | + It is used to calculate the weighted average of a <%= link_to 'module', tutorials_path("keywords", anchor: "module")%>'s grade. | |
| 14 | 14 | </p> |
| 15 | 15 | </div> |
| 16 | 16 | </div> | ... | ... |
app/views/mezuro_ranges/_form.html.erb
| 1 | 1 | <%= render :partial => 'shared/form_errors', :locals => {:object => @mezuro_range} %> |
| 2 | 2 | |
| 3 | -<div class="row margin-left-none"> | |
| 4 | - <div class="form-table span9"> | |
| 3 | + <div class="row margin-left-none"> | |
| 4 | + <div class="form-table span9"> | |
| 5 | 5 | |
| 6 | - <div class="form-row"> | |
| 7 | - <div class="field-container" > | |
| 8 | - <%= f.label :beginning, class: 'control-label' %> | |
| 9 | - <%= f.text_field :beginning, class: 'diminished-text-field' %> | |
| 10 | - <%= link_to '-∞'.html_safe, 'javascript:void(0)', :onClick => "jQuery( '#mezuro_range_beginning' ).val('-INF');", class: 'btn btn-default align-button' %> | |
| 11 | - </div> | |
| 12 | - <div class="help-container"> | |
| 13 | - <p> | |
| 14 | - Starting value for your Range. | |
| 15 | - </p> | |
| 6 | + <div class="form-row"> | |
| 7 | + <% if @readings.size == 0 %> | |
| 8 | + <%= render partial: 'no_readings' %> | |
| 9 | + <% else %> | |
| 10 | + <div class="field-container"> | |
| 11 | + <%= f.label :reading_id, 'Reading', class: 'control-label' %> | |
| 12 | + <%= f.select( :reading_id, readings_options(@readings), {class: 'form-control'} ) %> | |
| 13 | + </div> | |
| 14 | + <div class="help-container"> | |
| 15 | + <p> | |
| 16 | + The <%= link_to 'Reading', tutorials_path('keywords', anchor: 'reading')%> associated with this <%= link_to 'Range', tutorials_path('keywords', anchor: 'range')%>. | |
| 17 | + </p> | |
| 18 | + </div> | |
| 19 | + <% end %> | |
| 16 | 20 | </div> |
| 17 | - </div> | |
| 18 | 21 | |
| 19 | - <div class="form-row"> | |
| 20 | - <div class="field-container"> | |
| 21 | - <%= f.label :end, class: 'control-label' %> | |
| 22 | - <%= f.text_field :end, class: 'diminished-text-field' %> | |
| 23 | - <%= link_to '∞'.html_safe, 'javascript:void(0)', :onClick => "jQuery( '#mezuro_range_end' ).val('INF');", class: 'btn btn-default align-button' %> | |
| 22 | + <div class="form-row"> | |
| 23 | + <div class="field-container" > | |
| 24 | + <%= f.label :beginning, class: 'control-label' %> | |
| 25 | + <%= f.text_field :beginning, class: 'diminished-text-field' %> | |
| 26 | + <%= link_to '-∞'.html_safe, 'javascript:void(0)', :onClick => "jQuery( '#mezuro_range_beginning' ).val('-INF');", class: 'btn btn-default align-button' %> | |
| 27 | + </div> | |
| 28 | + <div class="help-container"> | |
| 29 | + <p> | |
| 30 | + This Range's lower limit. | |
| 31 | + </p> | |
| 32 | + </div> | |
| 24 | 33 | </div> |
| 25 | - <div class="help-container"> | |
| 26 | - <p> | |
| 27 | - Ending value for your Range. | |
| 28 | - </p> | |
| 29 | - </div> | |
| 30 | - </div> | |
| 31 | 34 | |
| 32 | - <div class="form-row"> | |
| 33 | - <div class="field-container"> | |
| 34 | - <%= f.label :comments, class: 'control-label' %> | |
| 35 | - <%= f.text_area :comments, class: 'text-area' %> | |
| 36 | - </div> | |
| 37 | - <div class="help-container"> | |
| 38 | - <p> | |
| 39 | - A short description of your Range. | |
| 40 | - </p> | |
| 35 | + <div class="form-row"> | |
| 36 | + <div class="field-container"> | |
| 37 | + <%= f.label :end, class: 'control-label' %> | |
| 38 | + <%= f.text_field :end, class: 'diminished-text-field' %> | |
| 39 | + <%= link_to '∞'.html_safe, 'javascript:void(0)', :onClick => "jQuery( '#mezuro_range_end' ).val('INF');", class: 'btn btn-default align-button' %> | |
| 40 | + </div> | |
| 41 | + <div class="help-container"> | |
| 42 | + <p> | |
| 43 | + This Range's upper limit. | |
| 44 | + </p> | |
| 45 | + </div> | |
| 41 | 46 | </div> |
| 42 | - </div> | |
| 43 | 47 | |
| 44 | - <div class="form-row"> | |
| 45 | - <% if @readings.size == 0 %> | |
| 46 | - <%= render partial: 'no_readings' %> | |
| 47 | - <% else %> | |
| 48 | - <div class="field-container"> | |
| 49 | - <%= f.label :reading_id, 'Reading', class: 'control-label' %> | |
| 50 | - <%= f.select( :reading_id, readings_options(@readings), {class: 'form-control'} ) %> | |
| 51 | - </div> | |
| 52 | - <div class="help-container"> | |
| 53 | - <p> | |
| 54 | - The Reading associated with this Range. | |
| 55 | - </p> | |
| 56 | - </div> | |
| 57 | - <% end %> | |
| 48 | + <div class="form-row"> | |
| 49 | + <div class="field-container"> | |
| 50 | + <%= f.label :comments, class: 'control-label' %> | |
| 51 | + <%= f.text_area :comments, class: 'text-area' %> | |
| 52 | + </div> | |
| 53 | + <div class="help-container"> | |
| 54 | + <p> | |
| 55 | + An explanation of why you chose this interval, with that reading for this <%= link_to 'Metric', tutorials_path('keywords', anchor: 'metric')%>. | |
| 56 | + </p> | |
| 57 | + </div> | |
| 58 | + </div> | |
| 58 | 59 | </div> |
| 59 | - | |
| 60 | 60 | </div> |
| 61 | -</div> | |
| 62 | 61 | |
| 63 | -<div class="row margin-left-none" style="margin-top: 20px"> | |
| 64 | - <%= f.submit 'Save', class: 'btn btn-primary' %> | |
| 65 | - <%= link_to 'Back', mezuro_configuration_metric_configuration_path(@mezuro_configuration_id, @metric_configuration_id), class: 'btn btn-default' %> | |
| 66 | -</div> | |
| 62 | + <div class="row margin-left-none" style="margin-top: 20px"> | |
| 63 | + <%= f.submit 'Save', class: 'btn btn-primary' %> | |
| 64 | + <%= link_to 'Back', mezuro_configuration_metric_configuration_path(@mezuro_configuration_id, @metric_configuration_id), class: 'btn btn-default' %> | |
| 65 | + </div> | ... | ... |