]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4379 Design the create/edit form the same way: Manual Metrics, Manual Rules...
authorJulien HENRY <julien.henry@sonarsource.com>
Wed, 10 Jul 2013 11:29:09 +0000 (13:29 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Wed, 10 Jul 2013 11:29:42 +0000 (13:29 +0200)
sonar-server/src/main/webapp/WEB-INF/app/views/action_plans/_new.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/manual_rules/index.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb

index 0159c7930b68e64548640511aa7dd8061c435cff..eb01fe998c2bc030151c4594feb1a923d7fdc441 100644 (file)
@@ -4,7 +4,7 @@
     <input type="hidden" name="plan_key" value="<%= @action_plan.key() if @action_plan -%>"/>
     <tbody>
     <tr>
-      <td colspan="2"><h1 class="marginbottom10"><%= @action_plan && @action_plan.key() ? message('action_plans.edit_action_plan') : message('action_plans.create_form_title') -%></h1></td>
+      <td colspan="2" class="left"><h1 class="marginbottom10"><%= @action_plan && @action_plan.key() ? message('action_plans.edit_action_plan') : message('action_plans.create_form_title') -%></h1></td>
     </tr>
     <tr>
       <td class="left" valign="top">
@@ -36,4 +36,4 @@
     </tr>
     </tbody>
   </form>
-</table>
\ No newline at end of file
+</table>
index 3408571000225787ce85e4d6140fc7eae3c7d989..d95585840ad9ad2ea85ee425e94df6b37187e77d 100644 (file)
@@ -38,7 +38,9 @@
         <form action="<%= ApplicationController.root_context -%>/manual_rules/create" method="POST">
           <table class="admintable" width="100%">
             <input type="hidden" name="id" value="<%= @rule.id -%>"/>
-
+            <tr>
+              <td colspan="2" class="left"><h1 class="marginbottom10"><%= @rule && @rule.id.nil? ? 'Create Manual Rule' : 'Edit Manual Rule' -%></h1></td>
+            </tr>
             <tr>
               <td class="left" valign="top">
                 Name:<br/><input type="text" name="name" value="<%= h @rule.name -%>"/>
@@ -55,7 +57,7 @@
             </tr>
             <tr>
               <td class="left" valign="top">
-                <input type="submit" value="<%= @rule.id.nil? ? 'Create' : 'Update' -%>"/>
+                <input type="submit" value="<%= @rule.id.nil? ? message('create') : message('edit') -%>"/>
               </td>
             </tr>
           </table>
index eeba95de5492e4306e87d5ff1bda27a11811f500..f07a86b892adda27f1f5ed6f85497ff078c54d53 100644 (file)
@@ -62,6 +62,9 @@
     <% else %>
       <% form_for :metric, @metric, :url => { :action => 'save_from_web', :id => @metric.id } do |f| %>
       <tbody>
+        <tr>
+          <td colspan="2" class="left"><h1 class="marginbottom10"><%= @metric && @metric.id.nil? ? 'Create Manual Metric' : 'Edit Manual Metric' -%></h1></td>
+        </tr>
         <tr>
           <td class="left" valign="top">
             Name:<br/><%= f.text_field :short_name %><br/>
@@ -90,7 +93,7 @@
         </tr>
         <tr>
           <td class="left" valign="top">
-            <%= submit_tag @metric.id.nil? ? 'Create' : 'Update' %>
+            <%= submit_tag @metric.id.nil? ? message('create') : message('edit') %>
           </td>
         </tr>
       </tbody>