Commit c52f9e1a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

use control-group classes for inline forms in project new/edit pages

parent a3b0dc2e
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
- @key.errors.full_messages.each do |msg| - @key.errors.full_messages.each do |msg|
%li= msg %li= msg
.clearfix .control-group
= f.label :title = f.label :title
.input= f.text_field :title .controls= f.text_field :title
.clearfix .control-group
= f.label :key = f.label :key
.input .controls
%p.light %p.light
Paste your public key here. Read more about how generate it #{link_to "here", help_ssh_path} Paste your public key here. Read more about how generate it #{link_to "here", help_ssh_path}
= f.text_area :key, class: [:xxlarge, :thin_area] = f.text_area :key, class: [:xxlarge, :thin_area]
......
...@@ -8,24 +8,24 @@ ...@@ -8,24 +8,24 @@
.form-holder .form-holder
= form_for(@project, remote: true) do |f| = form_for(@project, remote: true) do |f|
%fieldset %fieldset
.clearfix.project_name_holder .control-group.project_name_holder
= f.label :name do = f.label :name do
Project name is Project name is
.input .controls
= f.text_field :name, placeholder: "Example Project", class: "span5" = f.text_field :name, placeholder: "Example Project", class: "span5"
.clearfix .control-group
= f.label :description do = f.label :description do
Project description Project description
%span.light (optional) %span.light (optional)
.input .controls
= f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250 = f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250
- if @project.repository.exists? && @project.repository.branch_names.any? - if @project.repository.exists? && @project.repository.branch_names.any?
.clearfix .control-group
= f.label :default_branch, "Default Branch" = f.label :default_branch, "Default Branch"
.input= f.select(:default_branch, @repository.branch_names, {}, {class: 'chosen'}) .controls= f.select(:default_branch, @repository.branch_names, {}, {class: 'chosen'})
- if can?(current_user, :change_public_mode, @project) - if can?(current_user, :change_public_mode, @project)
...@@ -66,11 +66,11 @@ ...@@ -66,11 +66,11 @@
- if Project.issues_tracker.values.count > 1 - if Project.issues_tracker.values.count > 1
.control-group .control-group
= f.label :issues_tracker, "Issues tracker", class: 'control-label' = f.label :issues_tracker, "Issues tracker", class: 'control-label'
.input= f.select(:issues_tracker, Project.issues_tracker.values, {}, { disabled: !@project.issues_enabled }) .controls= f.select(:issues_tracker, Project.issues_tracker.values, {}, { disabled: !@project.issues_enabled })
.clearfix .control-group
= f.label :issues_tracker_id, "Project name or id in issues tracker", class: 'control-label' = f.label :issues_tracker_id, "Project name or id in issues tracker", class: 'control-label'
.input= f.text_field :issues_tracker_id, disabled: !@project.can_have_issues_tracker_id? .controls= f.text_field :issues_tracker_id, disabled: !@project.can_have_issues_tracker_id?
.control-group .control-group
= f.label :merge_requests_enabled, "Merge Requests", class: 'control-label' = f.label :merge_requests_enabled, "Merge Requests", class: 'control-label'
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
= f.label :namespace_id do = f.label :namespace_id do
%span Namespace %span Namespace
.controls .controls
.clearfix .control-group
= f.select :namespace_id, namespaces_options(@project.namespace_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'} = f.select :namespace_id, namespaces_options(@project.namespace_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'}
%ul %ul
%li Be careful. Changing project namespace can have unintended side effects %li Be careful. Changing project namespace can have unintended side effects
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
= f.label :path do = f.label :path do
%span Path %span Path
.controls .controls
.clearfix .control-group
= f.text_field :path = f.text_field :path
%ul %ul
%li Be careful. Rename of project repo can have unintended side effects %li Be careful. Rename of project repo can have unintended side effects
......
...@@ -3,36 +3,36 @@ ...@@ -3,36 +3,36 @@
= render 'projects/errors' = render 'projects/errors'
.project-edit-content .project-edit-content
= form_for @project, remote: true do |f| = form_for @project, remote: true do |f|
.clearfix.project_name_holder .control-group.project_name_holder
= f.label :name do = f.label :name do
Project name is Project name is
.input .controls
= f.text_field :name, placeholder: "Example Project", class: "xxlarge", tabindex: 1, autofocus: true = f.text_field :name, placeholder: "Example Project", class: "xxlarge", tabindex: 1, autofocus: true
- if current_user.can_select_namespace? - if current_user.can_select_namespace?
.clearfix .control-group
= f.label :namespace_id do = f.label :namespace_id do
%span Namespace %span Namespace
.input .controls
= f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'chosen', tabindex: 2} = f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'chosen', tabindex: 2}
.clearfix .control-group
.input .controls
= link_to "#", class: 'appear-link' do = link_to "#", class: 'appear-link' do
%i.icon-upload-alt %i.icon-upload-alt
%span Import existing repository? %span Import existing repository?
.clearfix.appear-data.import-url-data .control-group.appear-data.import-url-data
= f.label :import_url do = f.label :import_url do
%span Import existing repo %span Import existing repo
.input .controls
= f.text_field :import_url, class: 'xlarge', placeholder: 'https://github.com/randx/six.git' = f.text_field :import_url, class: 'xlarge', placeholder: 'https://github.com/randx/six.git'
.light .light
URL must be cloneable URL must be cloneable
.clearfix .control-group
= f.label :description do = f.label :description do
Description Description
%span.light (optional) %span.light (optional)
.input .controls
= f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250, tabindex: 3 = f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250, tabindex: 3
%p.padded %p.padded
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
- if current_user.can_create_group? - if current_user.can_create_group?
.pull-right .pull-right
.input.light .controls.light
Need a group for several dependent projects? Need a group for several dependent projects?
= link_to new_group_path, class: "btn btn-tiny" do = link_to new_group_path, class: "btn btn-tiny" do
Create a group Create a group
......
...@@ -9,16 +9,16 @@ ...@@ -9,16 +9,16 @@
- @snippet.errors.full_messages.each do |msg| - @snippet.errors.full_messages.each do |msg|
%li= msg %li= msg
.clearfix .control-group
= f.label :title = f.label :title
.input= f.text_field :title, placeholder: "Example Snippet", class: 'input-xlarge', required: true .controls= f.text_field :title, placeholder: "Example Snippet", class: 'input-xlarge', required: true
.clearfix .control-group
= f.label "Private?" = f.label "Private?"
.input= f.check_box :private, {class: ''} .controls= f.check_box :private, {class: ''}
.clearfix .control-group
.file-editor .file-editor
= f.label :file_name, "File" = f.label :file_name, "File"
.input .controls
.file-holder.snippet .file-holder.snippet
.file-title .file-title
= f.text_field :file_name, placeholder: "example.rb", class: 'snippet-file-name', required: true = f.text_field :file_name, placeholder: "example.rb", class: 'snippet-file-name', required: true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment