Commit 3eb3c201316db78757fa39ad8a4b4908cc968bc3

Authored by Diego Camarinha
Committed by Heitor
1 parent 0995444d

Created branches input field on repository's form

That will be used for the process by branch feature

Signed off by: Heitor Reis <marcheing@gmail.com>
app/views/repositories/_form.html.erb
@@ -66,6 +66,18 @@ @@ -66,6 +66,18 @@
66 66
67 <div class="form-row"> 67 <div class="form-row">
68 <div class="field-container"> 68 <div class="field-container">
  69 + <%= f.label :branch, class: 'control-label' %>
  70 + <%= f.text_field :branch, class: 'text-field form-control' %>
  71 + </div>
  72 + <div class="help-container">
  73 + <p>
  74 + <%= t('activemodel.hints.repository.branch') %>
  75 + </p>
  76 + </div>
  77 + </div>
  78 +
  79 + <div class="form-row">
  80 + <div class="field-container">
69 <%= f.label :period, class: 'control-label' %> 81 <%= f.label :period, class: 'control-label' %>
70 <%= f.select( :period, periodicity_options, class: 'tooltip-control' ) %> 82 <%= f.select( :period, periodicity_options, class: 'tooltip-control' ) %>
71 </div> 83 </div>
app/views/repositories/show.html.erb
@@ -23,6 +23,11 @@ @@ -23,6 +23,11 @@
23 </p> 23 </p>
24 24
25 <p> 25 <p>
  26 + <strong><%= Repository.human_attribute_name('branch') %>:</strong>
  27 + <%= @repository.branch %>
  28 +</p>
  29 +
  30 +<p>
26 <strong><%= Repository.human_attribute_name('period') %>:</strong> 31 <strong><%= Repository.human_attribute_name('period') %>:</strong>
27 <%= periodicity_option(@repository.period) %> 32 <%= periodicity_option(@repository.period) %>
28 </p> 33 </p>
config/locales/views/repository/en.yml
@@ -12,6 +12,7 @@ en: @@ -12,6 +12,7 @@ en:
12 scm_type: "Type" 12 scm_type: "Type"
13 address: "Address" 13 address: "Address"
14 period: "Process Period" 14 period: "Process Period"
  15 + branch: "Branch"
15 hints: 16 hints:
16 repository: 17 repository:
17 name: "The name of your Repository." 18 name: "The name of your Repository."
@@ -21,6 +22,7 @@ en: @@ -21,6 +22,7 @@ en:
21 address: "The URL where the Repository is located." 22 address: "The URL where the Repository is located."
22 period: "Select how often the Repository will be reprocessed." 23 period: "Select how often the Repository will be reprocessed."
23 kalibro_configuration: "A %{configuration_href} defines all the metrics to be calculated in the source code. Choose your weapon!" 24 kalibro_configuration: "A %{configuration_href} defines all the metrics to be calculated in the source code. Choose your weapon!"
  25 + branch: "The branch to be analyzed."
24 errors: 26 errors:
25 repository: 27 repository:
26 no_metric_results: "Repository process returned with error. There are no metric results." 28 no_metric_results: "Repository process returned with error. There are no metric results."
@@ -33,4 +35,4 @@ en: @@ -33,4 +35,4 @@ en:
33 modules_tree: "Modules Tree" 35 modules_tree: "Modules Tree"
34 metric_results: "Metric Results" 36 metric_results: "Metric Results"
35 loading: "Loading data. Please, wait." 37 loading: "Loading data. Please, wait."
36 - date_processing: "Retrieve the closest processing information from"  
37 \ No newline at end of file 38 \ No newline at end of file
  39 + date_processing: "Retrieve the closest processing information from"
config/locales/views/repository/pt.yml
@@ -12,6 +12,7 @@ pt: @@ -12,6 +12,7 @@ pt:
12 scm_type: "Tipo" 12 scm_type: "Tipo"
13 address: "Endereço" 13 address: "Endereço"
14 period: "Período" 14 period: "Período"
  15 + branch: "Ramo"
15 hints: 16 hints:
16 repository: 17 repository:
17 name: "O nome do seu Repositório." 18 name: "O nome do seu Repositório."
@@ -21,6 +22,7 @@ pt: @@ -21,6 +22,7 @@ pt:
21 address: "A URL onde o respositório está acessível." 22 address: "A URL onde o respositório está acessível."
22 period: "Selecione o quão frequentemente o repositório será reprocessado." 23 period: "Selecione o quão frequentemente o repositório será reprocessado."
23 kalibro_configuration: "Uma %{configuration_href} define todas as métricas a serem extraídas do códifo-fonte." 24 kalibro_configuration: "Uma %{configuration_href} define todas as métricas a serem extraídas do códifo-fonte."
  25 + branch: "O ramo que será analisado."
24 errors: 26 errors:
25 repository: 27 repository:
26 no_metric_results: "O processamento do Repósitório retornou um erro. Não há Resultados de Métrica." 28 no_metric_results: "O processamento do Repósitório retornou um erro. Não há Resultados de Métrica."
@@ -33,4 +35,4 @@ pt: @@ -33,4 +35,4 @@ pt:
33 modules_tree: "Árvore de Módulos" 35 modules_tree: "Árvore de Módulos"
34 metric_results: "Resultados de Métrica" 36 metric_results: "Resultados de Métrica"
35 loading: "Carregando os dados. Por favor, aguarde." 37 loading: "Carregando os dados. Por favor, aguarde."
36 - date_processing: "Obtenha a informação de processamento mais próxima a"  
37 \ No newline at end of file 38 \ No newline at end of file
  39 + date_processing: "Obtenha a informação de processamento mais próxima a"