BigW Consortium Gitlab

Commit 729618c5 by Dmitriy Zaporozhets

Merge branch 'ui-improvements' into 'master'

Ui improvements
parents 67b0857d 95d61a09
...@@ -98,3 +98,7 @@ label { ...@@ -98,3 +98,7 @@ label {
z-index: 2; z-index: 2;
} }
} }
.fieldset-form fieldset {
margin-bottom: 20px;
}
...@@ -14,6 +14,7 @@ h2.page-title { ...@@ -14,6 +14,7 @@ h2.page-title {
h3.page-title { h3.page-title {
@include page-title; @include page-title;
font-size: 22px;
} }
h6 { h6 {
......
...@@ -117,11 +117,11 @@ ...@@ -117,11 +117,11 @@
} }
@mixin page-title { @mixin page-title {
color: #333; color: #555;
font-size: 20px;
line-height: 1.5; line-height: 1.5;
font-weight: normal;
margin-top: 0px; margin-top: 0px;
margin-bottom: 15px; margin-bottom: 10px;
} }
@mixin str-truncated($max_width: "82%") { @mixin str-truncated($max_width: "82%") {
......
...@@ -21,12 +21,22 @@ ...@@ -21,12 +21,22 @@
} }
.admin-filter form { .admin-filter form {
label { width: 110px; } .select2-container {
.controls { margin-left: 130px; } width: 100%
.form-actions { padding-left: 130px; background: #fff } }
.visibility-levels {
.controls { .controls {
margin-bottom: 9px; margin-left: 130px;
}
.form-actions {
padding-left: 130px;
background: #fff
}
.visibility-levels {
.controls {
margin-bottom: 9px;
} }
i { i {
......
...@@ -57,6 +57,10 @@ ...@@ -57,6 +57,10 @@
} }
} }
i {
color: $bg_primary;
}
img { img {
position: relative; position: relative;
top:-1px; top:-1px;
......
...@@ -4,10 +4,8 @@ class Admin::ProjectsController < Admin::ApplicationController ...@@ -4,10 +4,8 @@ class Admin::ProjectsController < Admin::ApplicationController
before_filter :repository, only: [:show, :transfer] before_filter :repository, only: [:show, :transfer]
def index def index
owner_id = params[:owner_id] @projects = Project.all
user = User.find_by(id: owner_id) @projects = @projects.where(namespace_id: params[:namespace_id]) if params[:namespace_id].present?
@projects = user ? user.owned_projects : Project.all
@projects = @projects.where("visibility_level IN (?)", params[:visibility_levels]) if params[:visibility_levels].present? @projects = @projects.where("visibility_level IN (?)", params[:visibility_levels]) if params[:visibility_levels].present?
@projects = @projects.with_push if params[:with_push].present? @projects = @projects.with_push if params[:with_push].present?
@projects = @projects.abandoned if params[:abandoned].present? @projects = @projects.abandoned if params[:abandoned].present?
......
...@@ -8,7 +8,8 @@ class Admin::UsersController < Admin::ApplicationController ...@@ -8,7 +8,8 @@ class Admin::UsersController < Admin::ApplicationController
end end
def show def show
@projects = user.authorized_projects @personal_projects = user.personal_projects
@joined_projects = user.projects.joined(@user)
end end
def new def new
......
...@@ -25,8 +25,13 @@ module TreeHelper ...@@ -25,8 +25,13 @@ module TreeHelper
# #
# type - String type of the tree item; either 'folder' or 'file' # type - String type of the tree item; either 'folder' or 'file'
def tree_icon(type) def tree_icon(type)
image = type == 'folder' ? 'file_dir.png' : 'file_txt.png' icon_class = if type == 'folder'
image_tag(image, size: '16x16') 'icon-folder-close'
else
'icon-file-alt'
end
content_tag :i, nil, class: icon_class
end end
def tree_hex_class(content) def tree_hex_class(content)
......
.row .row
.col-md-4 .col-md-3
.admin-filter .admin-filter
= form_tag admin_projects_path, method: :get, class: '' do = form_tag admin_projects_path, method: :get, class: '' do
.form-group .form-group
...@@ -7,19 +7,21 @@ ...@@ -7,19 +7,21 @@
= text_field_tag :name, params[:name], class: "form-control" = text_field_tag :name, params[:name], class: "form-control"
.form-group .form-group
= label_tag :owner_id, 'Owner:' = label_tag :namespace_id, "Namespace"
%div = namespace_select_tag :namespace_id, selected: params[:namespace_id], class: 'input-large'
= users_select_tag :owner_id, selected: params[:owner_id], class: 'input-large input-clamp'
.checkbox .form-group
= label_tag :with_push, 'Not empty' %strong Activity
= check_box_tag :with_push, 1, params[:with_push] .checkbox
&nbsp; = label_tag :with_push, 'Not empty'
%span.light Projects with push events = check_box_tag :with_push, 1, params[:with_push]
.checkbox &nbsp;
= label_tag :abandoned, 'Abandoned' %span.light Projects with push events
= check_box_tag :abandoned, 1, params[:abandoned] .checkbox
&nbsp; = label_tag :abandoned, 'Abandoned'
%span.light No activity over 6 month = check_box_tag :abandoned, 1, params[:abandoned]
&nbsp;
%span.light No activity over 6 month
%fieldset %fieldset
%strong Visibility level: %strong Visibility level:
...@@ -31,12 +33,12 @@ ...@@ -31,12 +33,12 @@
%span.descr %span.descr
= visibility_level_icon(level) = visibility_level_icon(level)
= label = label
.form-actions %hr
= hidden_field_tag :sort, params[:sort] = hidden_field_tag :sort, params[:sort]
= submit_tag "Search", class: "btn submit btn-primary" = submit_tag "Search", class: "btn submit btn-primary"
= link_to "Reset", admin_projects_path, class: "btn" = link_to "Reset", admin_projects_path, class: "btn btn-cancel"
.col-md-8 .col-md-9
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
Projects (#{@projects.total_count}) Projects (#{@projects.total_count})
......
.user_new .user_new
= form_for [:admin, @user], html: { class: 'form-horizontal' } do |f| = form_for [:admin, @user], html: { class: 'form-horizontal fieldset-form' } do |f|
-if @user.errors.any? -if @user.errors.any?
#error_explanation #error_explanation
.alert.alert-danger .alert.alert-danger
...@@ -61,17 +61,14 @@ ...@@ -61,17 +61,14 @@
.col-sm-10 You cannot remove your own admin rights .col-sm-10 You cannot remove your own admin rights
- else - else
.col-sm-10= f.check_box :admin .col-sm-10= f.check_box :admin
- unless @user.new_record? || current_user == @user
.alert.alert-danger
- if @user.blocked?
%p This user is blocked and is not able to login to GitLab
= link_to 'Unblock User', unblock_admin_user_path(@user), method: :put, class: "btn btn-small"
- else
%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 :avatar, class: 'control-label'
.col-sm-10
= f.file_field :avatar
.form-group
= f.label :skype, class: 'control-label' = f.label :skype, class: 'control-label'
.col-sm-10= f.text_field :skype, class: 'form-control' .col-sm-10= f.text_field :skype, class: 'form-control'
.form-group .form-group
......
%h3.page-title %h3.page-title
#{@user.name} &rarr; Edit user: #{@user.name}
%i.icon-edit .back-link
Edit user = link_to admin_user_path(@user) do
&larr; Back to user page
%hr %hr
= render 'form' = render 'form'
%h3.page-title %h3.page-title
%i.icon-plus
New user New user
%hr %hr
= render 'form' = render 'form'
- tree, commit = submodule_links(submodule_item) - tree, commit = submodule_links(submodule_item)
%tr{ class: "tree-item" } %tr{ class: "tree-item" }
%td.tree-item-file-name %td.tree-item-file-name
= image_tag "submodule.png" %i.icon-archive
%span %span
= link_to truncate(submodule_item.name, length: 40), tree = link_to truncate(submodule_item.name, length: 40), tree
@ @
......
...@@ -36,8 +36,7 @@ ...@@ -36,8 +36,7 @@
- if @path.present? - if @path.present?
%tr.tree-item %tr.tree-item
%td.tree-item-file-name %td.tree-item-file-name
= image_tag "file_empty.png", size: '16x16' = link_to "..", project_tree_path(@project, up_dir_path(tree)), class: 'prepend-left-10'
= link_to "..", project_tree_path(@project, up_dir_path(tree))
%td %td
%td %td
%td %td
......
.panel.panel-default .panel.panel-default
.panel-heading Personal projects .panel-heading Personal projects
%ul.well-list %ul.well-list
- @projects.each do |project| - projects.each do |project|
%li %li
= link_to_project project = link_to_project project
...@@ -13,12 +13,14 @@ ...@@ -13,12 +13,14 @@
%br %br
%small member since #{@user.created_at.stamp("Nov 12, 2031")} %small member since #{@user.created_at.stamp("Nov 12, 2031")}
.clearfix .clearfix
%h4 Groups:
= render 'groups', groups: @groups - if @groups.any?
%hr %h4 Groups:
= render 'groups', groups: @groups
%hr
%h4 User Activity: %h4 User Activity:
= render @events = render @events
.col-md-4 .col-md-4
= render 'profile', user: @user = render 'profile', user: @user
- if @projects.present? - if @projects.present?
= render 'projects' = render 'projects', projects: @projects
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