Commit e9c440d2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ui-panel-boxes' into 'master'

UI panel boxes

Replace custom ui-box with bootstrap `panels`. No sense to use custom components if we can use bootstrap.

UI different is minimal so no screenshots
parents 5e20b0a7 4c51619d
......@@ -4,7 +4,7 @@ class Dashboard
$(".dash-filter").keyup ->
terms = $(this).val()
uiBox = $(this).parents('.ui-box').first()
uiBox = $(this).parents('.panel').first()
if terms == "" || terms == undefined
uiBox.find(".dash-list li").show()
else
......
......@@ -72,6 +72,15 @@
font-size: 14px;
line-height: 18px;
}
.row_title {
font-weight: 500;
color: #444;
&:hover {
color: #444;
text-decoration: underline;
}
}
}
}
......
/**
* UI box:
* Block element for separating information on page.
* Used for storing issues lists, grouped data.
* You can have multiple ui boxes on one page
*
* Classes:
* .ui-box - for any block & widgets
* .ui-box.ui-box-small - same but with smaller title
* .ui-box.ui-box-danger - with red title
*
* Ex. 1: List
* .ui-box
* .title
* # title here
* %ul
* # content here
*
* Ex. 2: Block data
* .ui-box
* .title
* # title here
* .body
* # content here
*
*/
.ui-box {
background: #FFF;
margin-bottom: 20px;
border: 1px solid #DDD;
word-wrap: break-word;
img {
max-width: 100%;
}
pre {
code {
background: none !important;
}
}
ul {
margin: 0;
padding: 0;
}
.title {
background-color: #EEE;
border-bottom: 1px solid #DDD;
color: #666;
font-size: 16px;
text-shadow: 0 1px 1px #fff;
padding: 0 10px;
font-size: 14px;
line-height: 40px;
font-weight: normal;
margin: 0;
> a {
text-shadow: 0 1px 1px #fff;
}
form {
margin-bottom: 0;
margin-top: 0;
}
.btn {
vertical-align: middle;
padding: 4px 12px;
@include box-shadow(0 0px 1px 1px #f2f2f2);
}
.nav-pills {
> li {
> a {
padding: 13px;
margin: 0;
font-size: 13px;
}
&.active {
> a {
background: #D5D5D5;
color: $style_color;
@include border-radius(0);
border-radius: 0;
border-left: 1px solid #CCC;
border-right: 1px solid #CCC;
}
}
}
}
}
.body {
padding: 10px;
}
&.padded {
h5, .title {
margin: -20px;
margin-bottom: 0;
padding: 5px 20px;
}
}
.row_title {
font-weight: 500;
color: #444;
&:hover {
color: #444;
text-decoration: underline;
}
}
.form-holder {
padding-top: 20px;
form {
margin-bottom: 0;
legend {
text-indent: 10px;
}
.form-actions {
margin-bottom: 0;
}
}
}
}
/*
* Small box
*/
.ui-box.ui-box-small {
margin-bottom: 10px;
.title {
font-size: 13px;
line-height: 30px;
a {
color: #666;
&:hover {
text-decoration: underline;
}
}
}
}
/*
* Danger box
*/
.ui-box.ui-box-danger {
background: #f7f7f7;
border: none;
.title {
background: #D65;
color: #fff;
text-shadow: none;
font-weight: 500;
}
}
/*
* Block under tw-bootstrap tabs
*/
.tab-pane {
.ui-box {
margin: 3px 3px 25px 3px;
}
}
......@@ -221,3 +221,20 @@ ul.breadcrumb {
position: relative;
white-space: nowrap;
}
/**
* Add some extra stuff to panels
*
*/
.panel {
.panel-heading {
font-size: 14px;
line-height: 18px;
.panel-head-actions {
position: relative;
top: -7px;
float: right;
}
}
}
.dashboard {
.side {
.ui-box {
margin: 0px;
box-shadow: none;
.nav-projects-tabs li { padding: 0; }
.panel {
.panel-heading {
background: #EEE;
border-top-left-radius: 0;
}
border-top-left-radius: 0;
}
}
}
......@@ -24,9 +25,7 @@
.dashboard {
.dash-filter {
margin: 7px 0;
padding: 4px 6px;
width: 220px;
width: 205px;
float: left;
height: inherit;
}
......@@ -34,7 +33,7 @@
@media (max-width: 1200px) {
.dashboard .dash-filter {
width: 150px;
width: 140px;
}
}
......
......@@ -3,9 +3,9 @@
%hr
.ui-box
.title Sidekiq running processes
.body
.panel.panel-default
.panel-heading Sidekiq running processes
.panel-body
- if @sidekiq_processes.empty?
%h4.cred
%i.icon-warning-sign
......@@ -40,5 +40,5 @@
.ui-box
.panel.panel-default
%iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"}
......@@ -7,8 +7,8 @@
%hr
.row
.col-md-6
.ui-box
.title
.panel.panel-default
.panel-heading
Group info:
%ul.well-list
%li
......@@ -29,8 +29,8 @@
%strong
= @group.created_at.stamp("March 1, 1999")
.ui-box
.title
.panel.panel-default
.panel-heading
Projects
%small
(#{@group.projects.count})
......@@ -45,10 +45,10 @@
%span.monospace= project.path_with_namespace + ".git"
.col-md-6
.ui-box
.title
.panel.panel-default
.panel-heading
Add user(s) to the group:
.body.form-holder
.panel-body.form-holder
%p.light
Read more about project permissions
%strong= link_to "here", help_page_path("permissions", "permissions"), class: "vlink"
......@@ -60,8 +60,8 @@
= select_tag :group_access, options_for_select(UsersGroup.group_access_roles), class: "project-access-select select2"
%hr
= submit_tag 'Add users into group', class: "btn btn-create"
.ui-box
.title
.panel.panel-default
.panel-heading
%strong #{@group.name}
Group Members
%small
......
......@@ -22,8 +22,8 @@
%hr
-if @hooks.any?
.ui-box
.title
.panel.panel-default
.panel-heading
System hooks (#{@hooks.count})
%ul.well-list
- @hooks.each do |hook|
......
......@@ -37,10 +37,10 @@
= link_to "Reset", admin_projects_path, class: "btn"
.col-md-8
.ui-box
.title
.panel.panel-default
.panel-heading
Projects (#{@projects.total_count})
.pull-right
.panel-head-actions
.dropdown.inline
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%span.light sort:
......
......@@ -6,8 +6,8 @@
%hr
.row
.col-md-6
.ui-box
.title
.panel.panel-default
.panel-heading
Project info:
%ul.well-list
%li
......@@ -75,10 +75,10 @@
= visibility_level_icon(@project.visibility_level)
= visibility_level_label(@project.visibility_level)
.ui-box
.title
.panel.panel-default
.panel-heading
Transfer project
.body
.panel-body
= form_for @project, url: transfer_admin_project_path(@project), method: :put, html: { class: 'form-horizontal' } do |f|
.form-group
= f.label :namespace_id, "Namespace", class: 'control-label'
......@@ -92,8 +92,8 @@
.col-md-6
- if @group
.ui-box
.title
.panel.panel-default
.panel-heading
%strong #{@group.name}
group members (#{@group.users_groups.count})
.pull-right
......@@ -103,8 +103,8 @@
- @group.users_groups.order('group_access DESC').each do |member|
= render 'users_groups/users_group', member: member, show_controls: false
.ui-box
.title
.panel.panel-default
.panel-heading
Project members
%small
(#{@project.users.count})
......
......@@ -28,10 +28,10 @@
= link_to 'Reset', admin_users_path, class: "btn btn-cancel"
.col-md-9
.ui-box
.title
.panel.panel-default
.panel-heading
Users (#{@users.total_count})
.pull-right
.panel-head-actions
= link_to 'New User', new_admin_user_path, class: "btn btn-new"
%ul.well-list
- @users.each do |user|
......
......@@ -14,8 +14,8 @@
.row
.col-md-6
.ui-box
.title
.panel.panel-default
.panel-heading
Account:
.pull-right
= image_tag avatar_icon(@user.email, 32), class: "avatar s32"
......@@ -118,8 +118,8 @@
.col-md-6
- if @user.users_groups.present?
.ui-box
.title Groups:
.panel.panel-default
.panel-heading Groups:
%ul.well-list
- @user.users_groups.each do |user_group|
- group = user_group.group
......@@ -132,8 +132,8 @@
= link_to group_users_group_path(group, user_group), data: { confirm: remove_user_from_group_message(group, @user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do
%i.icon-remove.icon-white
.ui-box
.title Projects (#{@projects.count})
.panel.panel-default
.panel-heading Projects (#{@projects.count})
%ul.well-list
- @projects.sort_by(&:name_with_namespace).each do |project|
- tm = project.team.find_tm(@user.id)
......
.ui-box
.title.clearfix
.panel.panel-default
.panel-heading.clearfix
= search_field_tag :filter_group, nil, placeholder: 'Filter by name', class: 'dash-filter form-control'
- if current_user.can_create_group?
%span.pull-right
......
.ui-box
.title.clearfix
.panel.panel-default
.panel-heading.clearfix
= search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'dash-filter form-control'
- if current_user.can_create_project?
%span.pull-right
......
.ui-box
.title
.panel.panel-default
.panel-heading
Projects (#{projects.count})
- if can? current_user, :create_projects, @group
%span.pull-right
.panel-head-actions
= link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do
%i.icon-plus
New project
......
......@@ -17,8 +17,8 @@
.col-md-10
.tab-content
.tab-pane.active#tab-edit
.ui-box
.title
.panel.panel-default
.panel-heading
%strong= @group.name
group settings:
%div.form-holder
......@@ -61,8 +61,8 @@
= f.submit 'Save group', class: "btn btn-save"
.tab-pane#tab-projects
.ui-box
.title
.panel.panel-default
.panel-heading
%strong= @group.name
projects:
- if can? current_user, :manage_group, @group
......@@ -84,9 +84,9 @@
.nothing-here-block This group has no projects yet
.tab-pane#tab-remove
.ui-box.ui-box-danger
.title Remove group
.body
.panel.panel-default.panel.panel-danger
.panel-heading Remove group
.panel-body
%p
Removing group will cause all child projects and resources to be removed.
%p
......
......@@ -24,8 +24,8 @@
.js-toggle-content.hide.new-group-member-holder
= render "new_group_member"
.ui-box.prepend-top-20
.title
.panel.panel-default.prepend-top-20
.panel-heading
%strong #{@group.name}
group members
%small
......
......@@ -18,8 +18,8 @@
.row
.col-md-4
.ui-box
.title
.panel.panel-default
.panel-heading
Quick help
%ul.well-list
%li
......@@ -34,8 +34,8 @@
= link_to "shortcuts", '#', onclick: "new Shortcuts()"
.col-md-8
.ui-box.documentation
.title Documentation
.panel.panel-default.documentation
.panel-heading Documentation
= preserve do
- readme_text = File.read(Rails.root.join("doc", "README.md"))
......
......@@ -9,8 +9,8 @@
%hr
.ui-box
.title
.panel.panel-default
.panel-heading
Emails (#{@emails.count + 1})
%ul.well-list#emails-table
%li
......
......@@ -8,8 +8,8 @@
%p.light
Group members have access to all a group's projects
%hr
.ui-box
.title
.panel.panel-default
.panel-heading
%strong Groups
(#{@user_groups.count})
%ul.well-list
......
......@@ -10,8 +10,8 @@
%hr
.ui-box
.title
.panel.panel-default
.panel-heading
SSH Keys (#{@keys.count})
%ul.well-list#keys-table
= render @keys
......
.row
.col-md-4
.ui-box
.title
.panel.panel-default
.panel-heading
SSH Key
%ul.well-list
%li
......
......@@ -6,8 +6,8 @@
= render "form"
- if @commits.present?
%div.ui-box
.title
%div.panel.panel-default
.panel-heading
Commits (#{@commits.count})
- if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
%ul.well-list
......
......@@ -6,7 +6,7 @@
Project settings:
%p.light Some settings, such as "Transfer Project", are hidden inside the danger area below
%hr
.form-holder
.panel-body
= form_for @project, remote: true, html: { class: "edit_project form-horizontal" } do |f|
%fieldset
.form-group.project_name_holder
......@@ -106,13 +106,13 @@
.js-toggle-content.hide
- if can? current_user, :archive_project, @project
.ui-box.ui-box-danger
.title
.panel.panel-default.panel.panel-danger
.panel-heading
- if @project.archived?
Unarchive project
- else
Archive project
.body
.panel-body
- if @project.archived?
%p
Unarchiving the project will mark its repository as active.
......@@ -137,10 +137,10 @@
.nothing-here-block Only the project owner can archive a project
- if can?(current_user, :change_namespace, @project)
.ui-box.ui-box-danger
.title Transfer project
.panel.panel-default.panel.panel-danger
.panel-heading Transfer project
.errors-holder
.form-holder
.panel-body
= form_for(@project, url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'transfer-project form-horizontal' }) do |f|
.form-group
= f.label :namespace_id, class: 'control-label' do
......@@ -157,10 +157,10 @@
- else
.nothing-here-block Only the project owner can transfer a project
.ui-box.ui-box-danger
.title Rename repository
.panel.panel-default.panel.panel-danger
.panel-heading Rename repository
.errors-holder
.form-holder
.panel-body
= form_for(@project, html: { class: 'form-horizontal' }) do |f|
.form-group
= f.label :path, class: 'control-label' do
......@@ -177,9 +177,9 @@
= f.submit 'Rename', class: "btn btn-remove"
- if can?(current_user, :remove_project, @project)
.ui-box.ui-box-danger
.title Remove project
.body
.panel.panel-default.panel.panel-danger
.panel-heading Remove project
.panel-body
%p
Removing the project will delete its repository and all related resources including issues, merge requests etc.
%br
......
......@@ -51,8 +51,8 @@
= f.submit "Add Web Hook", class: "btn btn-create"
-if @hooks.any?
.ui-box
.title
.panel.panel-default
.panel-heading
Web hooks (#{@hooks.count})
%ul.well-list
- @hooks.each do |hook|
......
......@@ -61,7 +61,7 @@
= hidden_field_tag :status, params[:status]
= button_tag "Update issues", class: "btn update_selected_issues btn-save"
.ui-box
.panel.panel-default
%ul.well-list.issues-list
= render @issues
- if @issues.blank?
......
......@@ -58,8 +58,8 @@
= f.submit 'Submit merge request', class: "btn btn-create"
.mr-compare
%div.ui-box
.title
%div.panel.panel-default
.panel-heading
Commits (#{@commits.count})
- if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
%ul.well-list
......
......@@ -61,7 +61,7 @@
.pull-right
= render 'shared/sort_dropdown'
.ui-box
.panel.panel-default
%ul.well-list.mr-list
= render @merge_requests
- if @merge_requests.blank?
......
- if @commits.present?
.ui-box
.title
.panel.panel-default
.panel-heading
%i.icon-list
Commits (#{@commits.count})
.commits
......
.ui-box
.title= title
.panel.panel-default
.panel-heading= title
%ul.well-list
- issues.each do |issue|
%li
......
......@@ -20,7 +20,7 @@
= link_to project_milestones_path(@project, f: "all") do
All
.col-md-9
.ui-box
.panel.panel-default
%ul.well-list
= render @milestones
......
......@@ -84,14 +84,14 @@
.tab-pane#tab-merge-requests
.row
.col-md-6
.ui-box
.title Open
.panel.panel-default
.panel-heading Open
%ul.well-list
- @merge_requests.opened.each do |merge_request|
= render 'merge_request', merge_request: merge_request
.col-md-6
.ui-box
.title Closed
.panel.panel-default
.panel-heading Closed
%ul.well-list
- @merge_requests.closed.each do |merge_request|
= render 'merge_request', merge_request: merge_request
......
- group_users_count = @group.users_groups.count
.ui-box
.title
.panel.panel-default
.panel-heading
%strong #{@group.name}
group members (#{group_users_count})
.pull-right
......
.team-table
- can_admin_project = (can? current_user, :admin_project, @project)
.ui-box
.title
.panel.panel-default
.panel-heading
%strong #{@project.name}
project members (#{members.count})
%ul.well-list
......
- if @issues.any?
- @issues.group_by(&:project).each do |group|
.ui-box.ui-box-small
.panel.panel-default.panel.panel-default-small
- project = group[0]
.title
.panel-heading
= link_to_project project
= link_to 'show all', project_issues_path(project), class: 'pull-right'
......
- if @merge_requests.any?
- @merge_requests.group_by(&:target_project).each do |group|
.ui-box.ui-box-small
.panel.panel-default.panel.panel-default-small
- project = group[0]
.title
.panel-heading
= link_to_project project
= link_to 'show all', project_merge_requests_path(project), class: 'pull-right'
%ul.well-list.mr-list
......
.ui-box
.title
.panel.panel-default
.panel-heading
Profile
%ul.well-list
%li
......
.ui-box
.title Projects
.panel.panel-default
.panel-heading Projects
%ul.well-list
- @projects.each do |project|
%li
......
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