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

This commit is contained in:
Dmitriy Zaporozhets 2013-08-07 23:28:02 +03:00
parent a3b0dc2e17
commit c52f9e1a32
4 changed files with 32 additions and 32 deletions

View file

@ -6,12 +6,12 @@
- @key.errors.full_messages.each do |msg|
%li= msg
.clearfix
.control-group
= f.label :title
.input= f.text_field :title
.clearfix
.controls= f.text_field :title
.control-group
= f.label :key
.input
.controls
%p.light
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]

View file

@ -8,24 +8,24 @@
.form-holder
= form_for(@project, remote: true) do |f|
%fieldset
.clearfix.project_name_holder
.control-group.project_name_holder
= f.label :name do
Project name is
.input
.controls
= f.text_field :name, placeholder: "Example Project", class: "span5"
.clearfix
.control-group
= f.label :description do
Project description
%span.light (optional)
.input
.controls
= f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250
- if @project.repository.exists? && @project.repository.branch_names.any?
.clearfix
.control-group
= 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)
@ -66,11 +66,11 @@
- if Project.issues_tracker.values.count > 1
.control-group
= 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'
.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
= f.label :merge_requests_enabled, "Merge Requests", class: 'control-label'
@ -110,7 +110,7 @@
= f.label :namespace_id do
%span Namespace
.controls
.clearfix
.control-group
= f.select :namespace_id, namespaces_options(@project.namespace_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'}
%ul
%li Be careful. Changing project namespace can have unintended side effects
@ -130,7 +130,7 @@
= f.label :path do
%span Path
.controls
.clearfix
.control-group
= f.text_field :path
%ul
%li Be careful. Rename of project repo can have unintended side effects

View file

@ -3,36 +3,36 @@
= render 'projects/errors'
.project-edit-content
= form_for @project, remote: true do |f|
.clearfix.project_name_holder
.control-group.project_name_holder
= f.label :name do
Project name is
.input
.controls
= f.text_field :name, placeholder: "Example Project", class: "xxlarge", tabindex: 1, autofocus: true
- if current_user.can_select_namespace?
.clearfix
.control-group
= f.label :namespace_id do
%span Namespace
.input
.controls
= f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'chosen', tabindex: 2}
.clearfix
.input
.control-group
.controls
= link_to "#", class: 'appear-link' do
%i.icon-upload-alt
%span Import existing repository?
.clearfix.appear-data.import-url-data
.control-group.appear-data.import-url-data
= f.label :import_url do
%span Import existing repo
.input
.controls
= f.text_field :import_url, class: 'xlarge', placeholder: 'https://github.com/randx/six.git'
.light
URL must be cloneable
.clearfix
.control-group
= f.label :description do
Description
%span.light (optional)
.input
.controls
= f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250, tabindex: 3
%p.padded
@ -42,7 +42,7 @@
- if current_user.can_create_group?
.pull-right
.input.light
.controls.light
Need a group for several dependent projects?
= link_to new_group_path, class: "btn btn-tiny" do
Create a group

View file

@ -9,16 +9,16 @@
- @snippet.errors.full_messages.each do |msg|
%li= msg
.clearfix
.control-group
= f.label :title
.input= f.text_field :title, placeholder: "Example Snippet", class: 'input-xlarge', required: true
.clearfix
.controls= f.text_field :title, placeholder: "Example Snippet", class: 'input-xlarge', required: true
.control-group
= f.label "Private?"
.input= f.check_box :private, {class: ''}
.clearfix
.controls= f.check_box :private, {class: ''}
.control-group
.file-editor
= f.label :file_name, "File"
.input
.controls
.file-holder.snippet
.file-title
= f.text_field :file_name, placeholder: "example.rb", class: 'snippet-file-name', required: true