Commit 95e6a5dc authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix admin forms UI

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent f1266765
%h3.page-title Edit Group %h3.page-title Edit Group
%hr %hr
= form_for [:admin, @group] do |f| = form_for [:admin, @group], html: { class: "form-horizontal" } do |f|
- if @group.errors.any? - if @group.errors.any?
.alert.alert-danger .alert.alert-danger
%span= @group.errors.full_messages.first %span= @group.errors.full_messages.first
.form-group.group_name_holder .form-group.group_name_holder
= f.label :name do = f.label :name, class: 'control-label' do
Group name Group name
.col-sm-10 .col-sm-10
= f.text_field :name, placeholder: "Example Group", class: "form-control" = f.text_field :name, placeholder: "Example Group", class: "form-control"
.form-group.group-description-holder .form-group.group-description-holder
= f.label :description, "Details" = f.label :description, "Details", class: 'control-label'
.col-sm-10 .col-sm-10
= f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4 = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4
.form-group.group_name_holder .form-group.group_name_holder
= f.label :path do = f.label :path, class: 'control-label' do
%span.cred Group path %span.cred Group path
.col-sm-10 .col-sm-10
= f.text_field :path, placeholder: "example-group", class: "form-control danger" = f.text_field :path, placeholder: "example-group", class: "form-control danger"
......
%h3.page-title New Group %h3.page-title New Group
%hr %hr
= form_for [:admin, @group] do |f| = form_for [:admin, @group], html: { class: 'group-form form-horizontal' } do |f|
- if @group.errors.any? - if @group.errors.any?
.alert.alert-danger .alert.alert-danger
%span= @group.errors.full_messages.first %span= @group.errors.full_messages.first
.form-group .form-group
= f.label :name do = f.label :name, class: 'control-label' do
Group name Group name
.col-sm-10 .col-sm-10
= f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control left" = f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control"
.form-group.group-description-holder .form-group.group-description-holder
= f.label :description, "Details" = f.label :description, "Details", class: 'control-label'
.col-sm-10 .col-sm-10
= f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4 = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4
.form-group
.col-sm-2
.col-sm-10
%ul
%li A group is a collection of several projects
%li Groups are private by default
%li Members of a group may only view projects they have permission to access
%li Group project URLs are prefixed with the group namespace
%li Existing projects may be moved into a group
.form-actions .form-actions
= f.submit 'Create group', class: "btn btn-create" = f.submit 'Create group', class: "btn btn-create"
%hr
.padded
%ul
%li Group is kind of directory for several projects
%li All created groups are private
%li People within a group see only projects they have access to
%li All projects of group will be stored in a group directory
%li You will be able to move existing projects into group
.user_new .user_new
= form_for [:admin, @user] do |f| = form_for [:admin, @user], html: { class: 'form-horizontal' } do |f|
-if @user.errors.any? -if @user.errors.any?
#error_explanation #error_explanation
%ul.unstyled.alert.alert-danger %ul.unstyled.alert.alert-danger
...@@ -9,26 +9,26 @@ ...@@ -9,26 +9,26 @@
%fieldset %fieldset
%legend Account %legend Account
.form-group .form-group
= f.label :name = f.label :name, class: 'control-label'
.col-sm-10 .col-sm-10
= f.text_field :name, required: true, autocomplete: "off" = f.text_field :name, required: true, autocomplete: "off", class: 'form-control'
%span.help-inline * required %span.help-inline * required
.form-group .form-group
= f.label :username = f.label :username, class: 'control-label'
.col-sm-10 .col-sm-10
= f.text_field :username, required: true, autocomplete: "off" = f.text_field :username, required: true, autocomplete: "off", class: 'form-control'
%span.help-inline * required %span.help-inline * required
.form-group .form-group
= f.label :email = f.label :email, class: 'control-label'
.col-sm-10 .col-sm-10
= f.text_field :email, required: true, autocomplete: "off" = f.text_field :email, required: true, autocomplete: "off", class: 'form-control'
%span.help-inline * required %span.help-inline * required
- if @user.new_record? - if @user.new_record?
%fieldset %fieldset
%legend Password %legend Password
.form-group .form-group
= f.label :password = f.label :password, class: 'control-label'
.col-sm-10 .col-sm-10
%strong %strong
A temporary password will be generated and sent to user. A temporary password will be generated and sent to user.
...@@ -38,48 +38,44 @@ ...@@ -38,48 +38,44 @@
%fieldset %fieldset
%legend Password %legend Password
.form-group .form-group
= f.label :password = f.label :password, class: 'control-label'
.col-sm-10= f.password_field :password, disabled: f.object.force_random_password .col-sm-10= f.password_field :password, disabled: f.object.force_random_password, class: 'form-control'
.form-group .form-group
= f.label :password_confirmation = f.label :password_confirmation, class: 'control-label'
.col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password .col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control'
%fieldset %fieldset
%legend Access %legend Access
.row .form-group
.col-md-8 = f.label :projects_limit, class: 'control-label'
.form-group .col-sm-10= f.number_field :projects_limit, class: 'form-control'
= f.label :projects_limit
.col-sm-10= f.number_field :projects_limit
.form-group .form-group
= f.label :can_create_group = f.label :can_create_group, class: 'control-label'
.col-sm-10= f.check_box :can_create_group .col-sm-10= f.check_box :can_create_group
.form-group .form-group
= f.label :admin do = f.label :admin, class: 'control-label'
%strong.cred Administrator .col-sm-10= f.check_box :admin
.col-sm-10= f.check_box :admin - unless @user.new_record?
.col-md-4 .alert.alert-danger
- unless @user.new_record? - if @user.blocked?
.alert.alert-danger %p This user is blocked and is not able to login to GitLab
- if @user.blocked? = link_to 'Unblock User', unblock_admin_user_path(@user), method: :put, class: "btn btn-small"
%p This user is blocked and is not able to login to GitLab - else
= link_to 'Unblock User', unblock_admin_user_path(@user), method: :put, class: "btn btn-small" %p Blocked users will be removed from all projects &amp; will not be able to login to GitLab.
- else = link_to 'Block User', block_admin_user_path(@user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-small btn-remove"
%p Blocked users will be removed from all projects &amp; will not be able to login to GitLab.
= link_to 'Block User', block_admin_user_path(@user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-small btn-remove"
%fieldset %fieldset
%legend Profile %legend Profile
.form-group .form-group
= f.label :skype = f.label :skype, class: 'control-label'
.col-sm-10= f.text_field :skype .col-sm-10= f.text_field :skype, class: 'form-control'
.form-group .form-group
= f.label :linkedin = f.label :linkedin, class: 'control-label'
.col-sm-10= f.text_field :linkedin .col-sm-10= f.text_field :linkedin, class: 'form-control'
.form-group .form-group
= f.label :twitter = f.label :twitter, class: 'control-label'
.col-sm-10= f.text_field :twitter .col-sm-10= f.text_field :twitter, class: 'form-control'
.form-actions .form-actions
- if @user.new_record? - if @user.new_record?
......
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