Commit 3e30b105 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ui-improvements' into 'master'

Ui Improvements
parents 5cf5c177 99fd58ce
...@@ -108,6 +108,8 @@ $pagination-active-bg: $bg_style_color; ...@@ -108,6 +108,8 @@ $pagination-active-bg: $bg_style_color;
// Nav tabs // Nav tabs
.nav.nav-tabs { .nav.nav-tabs {
margin-bottom: 15px;
li { li {
> a { > a {
padding: 8px 20px; padding: 8px 20px;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Admin area * Admin area
* *
*/ */
.admin_dash { .admin-dashboard {
.data { .data {
a { a {
h1 { h1 {
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
} }
} }
} }
.str-truncated {
max-width: 60%;
}
} }
.admin-filter form { .admin-filter form {
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
.dash-sidebar-tabs { .dash-sidebar-tabs {
margin-bottom: 2px; margin-bottom: 2px;
border: none; border: none;
margin: 0; margin: 0 !important;
li { li {
&.active { &.active {
......
...@@ -229,9 +229,9 @@ header { ...@@ -229,9 +229,9 @@ header {
} }
.title { .title {
a { a {
color: #BBB;
&:hover {
color: #FFF; color: #FFF;
&:hover {
text-decoration: underline;
} }
} }
color: #fff; color: #fff;
......
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
.mr_source_commit, .mr_source_commit,
.mr_target_commit { .mr_target_commit {
margin-top: 10px;
.commit { .commit {
margin: 0; margin: 0;
padding: 0; padding: 2px 0;
padding: 5px 0;
list-style: none; list-style: none;
&:hover { &:hover {
background: none; background: none;
......
...@@ -36,4 +36,8 @@ ...@@ -36,4 +36,8 @@
} }
} }
} }
.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
background: #769;
}
} }
...@@ -219,6 +219,14 @@ class MergeRequest < ActiveRecord::Base ...@@ -219,6 +219,14 @@ class MergeRequest < ActiveRecord::Base
end end
end end
def source_project_namespace
if source_project && source_project.namespace
source_project.namespace.path
else
"(removed)"
end
end
def source_branch_exists? def source_branch_exists?
return false unless self.source_project return false unless self.source_project
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
%p.light %p.light
You can manage projects, users and other GitLab data from here. You can manage projects, users and other GitLab data from here.
%hr %hr
.admin_dash.row .admin-dashboard
.row
.col-sm-4 .col-sm-4
.light-well .light-well
%h4 Projects %h4 Projects
...@@ -29,13 +30,13 @@ ...@@ -29,13 +30,13 @@
%hr %hr
= link_to 'New Group', new_admin_group_path, class: "btn btn-new" = link_to 'New Group', new_admin_group_path, class: "btn btn-new"
.row.prepend-top-10 .row.prepend-top-10
.col-md-4 .col-md-4
%h4 Latest projects %h4 Latest projects
%hr %hr
- @projects.each do |project| - @projects.each do |project|
%p %p
= link_to project.name_with_namespace, [:admin, project] = link_to project.name_with_namespace, [:admin, project], class: 'str-truncated'
%span.light.pull-right %span.light.pull-right
#{time_ago_with_tooltip(project.created_at)} #{time_ago_with_tooltip(project.created_at)}
...@@ -44,7 +45,7 @@ ...@@ -44,7 +45,7 @@
%hr %hr
- @users.each do |user| - @users.each do |user|
%p %p
= link_to [:admin, user] do = link_to [:admin, user], class: 'str-truncated' do
= user.name = user.name
%span.light.pull-right %span.light.pull-right
#{time_ago_with_tooltip(user.created_at)} #{time_ago_with_tooltip(user.created_at)}
...@@ -54,13 +55,13 @@ ...@@ -54,13 +55,13 @@
%hr %hr
- @groups.each do |group| - @groups.each do |group|
%p %p
= link_to [:admin, group] do = link_to [:admin, group], class: 'str-truncated' do
= group.name = group.name
%span.light.pull-right %span.light.pull-right
#{time_ago_with_tooltip(group.created_at)} #{time_ago_with_tooltip(group.created_at)}
%br %br
.row .row
.col-md-4 .col-md-4
%h4 Stats %h4 Stats
%hr %hr
......
%h3.page-title %h3.page-title
Groups (#{@groups.total_count}) Groups (#{@groups.total_count})
%small = link_to 'New Group', new_admin_group_path, class: "btn btn-new pull-right"
allows you to keep projects organized.
%p.light
Group allows you to keep projects organized.
Use groups for uniting related projects. Use groups for uniting related projects.
= link_to 'New Group', new_admin_group_path, class: "btn btn-new pull-right" %hr
%br
= form_tag admin_groups_path, method: :get, class: 'form-inline' do = form_tag admin_groups_path, method: :get, class: 'form-inline' do
.form-group .form-group
= text_field_tag :name, params[:name], class: "form-control input-mn-300" = text_field_tag :name, params[:name], class: "form-control input-mn-300"
...@@ -23,24 +24,18 @@ ...@@ -23,24 +24,18 @@
%h4 %h4
= link_to [:admin, group] do = link_to [:admin, group] do
%i.icon-folder-close
= group.name = group.name
&rarr; &rarr;
%span.monospace %span.monospace
%i.icon-folder-close
%strong #{group.path}/ %strong #{group.path}/
.clearfix.light.append-bottom-10
%span
%b Members:
%span.badge= group.members.size
\|
%span
%b Projects:
%span.badge= group.projects.count
.clearfix .clearfix
%p %p
= truncate group.description, length: 150 = truncate group.description, length: 150
.clearfix
%p.light
#{pluralize(group.members.size, 'member')}, #{pluralize(group.projects.count, 'project')}
= paginate @groups, theme: "gitlab" = paginate @groups, theme: "gitlab"
.row .row
.col-md-3 .col-md-3
.admin-filter .admin-filter
= form_tag admin_users_path, method: :get, class: 'form-inline' do
.append-bottom-10
.form-group
= search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control'
= button_tag type: 'submit', class: 'btn btn-primary' do
%i.icon-search
%ul.nav.nav-pills.nav-stacked %ul.nav.nav-pills.nav-stacked
%li{class: "#{'active' unless params[:filter]}"} %li{class: "#{'active' unless params[:filter]}"}
= link_to admin_users_path do = link_to admin_users_path do
...@@ -25,6 +19,12 @@ ...@@ -25,6 +19,12 @@
Without projects Without projects
%small.pull-right= User.without_projects.count %small.pull-right= User.without_projects.count
%hr %hr
= form_tag admin_users_path, method: :get, class: 'form-inline' do
.form-group
= search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control'
= button_tag type: 'submit', class: 'btn btn-primary' do
%i.icon-search
%hr
= link_to 'Reset', admin_users_path, class: "btn btn-cancel" = link_to 'Reset', admin_users_path, class: "btn btn-cancel"
.col-md-9 .col-md-9
......
.login-box .login-box
%h3.page-title Sign in %h3.page-title Sign in
- if ldap_enabled? - if ldap_enabled?
%ul.nav.nav-tabs.append-bottom-20 %ul.nav.nav-tabs
%li.active %li.active
= link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab' = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
%li %li
......
%h3.page-title %h3.page-title
My Email Addresses My email addresses
%p.light %p.light
Your Your
%b Primary Email %b Primary Email
will be used for account notifications, avatar detection and web based operations, such as edits and merges. All email addresses will be used to identify your commits. will be used for account notifications, avatar detection and web based operations, such as edits and merges.
%br
All email addresses will be used to identify your commits.
%hr
.ui-box .ui-box
.title .title
...@@ -19,7 +23,7 @@ ...@@ -19,7 +23,7 @@
added #{time_ago_with_tooltip(email.created_at)} added #{time_ago_with_tooltip(email.created_at)}
= link_to 'Remove', profile_email_path(email), data: { confirm: 'Are you sure?'}, method: :delete, class: 'btn btn-small btn-remove pull-right' = link_to 'Remove', profile_email_path(email), data: { confirm: 'Are you sure?'}, method: :delete, class: 'btn btn-small btn-remove pull-right'
%h3.page-title Add Email Address %h4 Add email address
= form_for 'email', url: profile_emails_path, html: { class: 'form-horizontal' } do |f| = form_for 'email', url: profile_emails_path, html: { class: 'form-horizontal' } do |f|
.form-group .form-group
= f.label :email, class: 'control-label' = f.label :email, class: 'control-label'
......
%ul.nav.nav-tabs.append-bottom-15 %ul.nav.nav-tabs
%li= render partial: 'shared/ref_switcher', locals: {destination: 'commits'} %li= render partial: 'shared/ref_switcher', locals: {destination: 'commits'}
= nav_link(controller: [:commit, :commits]) do = nav_link(controller: [:commit, :commits]) do
......
%ul.nav.nav-tabs.append-bottom-15 %ul.nav.nav-tabs
= nav_link(controller: :issues) do = nav_link(controller: :issues) do
= link_to project_issues_path(@project), class: "tab" do = link_to project_issues_path(@project), class: "tab" do
Browse Issues Browse Issues
......
...@@ -6,19 +6,22 @@ ...@@ -6,19 +6,22 @@
%li= msg %li= msg
.merge-request-branches .merge-request-branches
.row .form-group
.col-md-5 = label_tag nil, class: 'control-label' do
From
.col-sm-10
.clearfix .clearfix
.pull-left .pull-left
= f.select(:source_project_id, [[@merge_request.source_project_path,@merge_request.source_project.id]] , {}, { class: 'source_project select2 span3', disabled: @merge_request.persisted? }) = f.select(:source_project_id, [[@merge_request.source_project_path,@merge_request.source_project.id]] , {}, { class: 'source_project select2 span3', disabled: @merge_request.persisted? })
.pull-left .pull-left
&nbsp; &nbsp;
= f.select(:source_branch, @merge_request.source_branches, { include_blank: "Select branch" }, {class: 'source_branch select2 span2'}) = f.select(:source_branch, @merge_request.source_branches, { include_blank: "Select branch" }, {class: 'source_branch select2 span2'})
.mr_source_commit.prepend-top-10 .mr_source_commit
.col-md-2 %br
.merge-request-angle .form-group
%i.icon-long-arrow-right = label_tag nil, class: 'control-label' do
.col-md-5 To
.col-sm-10
.clearfix .clearfix
.pull-left .pull-left
- projects = @project.forked_from_project.nil? ? [@project] : [ @project,@project.forked_from_project] - projects = @project.forked_from_project.nil? ? [@project] : [ @project,@project.forked_from_project]
...@@ -26,7 +29,7 @@ ...@@ -26,7 +29,7 @@
.pull-left .pull-left
&nbsp; &nbsp;
= f.select(:target_branch, @merge_request.target_branches, { include_blank: "Select branch" }, {class: 'target_branch select2 span2'}) = f.select(:target_branch, @merge_request.target_branches, { include_blank: "Select branch" }, {class: 'target_branch select2 span2'})
.mr_target_commit.prepend-top-10 .mr_target_commit
%hr %hr
.merge-request-form-info .merge-request-form-info
......
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
%span.pull-right %span.pull-right
- if merge_request.for_fork? - if merge_request.for_fork?
%span.light %span.light
= "#{merge_request.source_project_path}" #{merge_request.source_project_namespace}:
= "#{merge_request.source_branch}" = merge_request.source_branch
%i.icon-angle-right.light %i.icon-angle-right.light
= "#{merge_request.target_branch}" = merge_request.target_branch
- else - else
= "#{merge_request.source_branch}" = merge_request.source_branch
%i.icon-angle-right.light %i.icon-angle-right.light
= "#{merge_request.target_branch}" = merge_request.target_branch
.merge-request-info .merge-request-info
- if merge_request.author - if merge_request.author
authored by #{link_to_member(merge_request.source_project, merge_request.author)} authored by #{link_to_member(merge_request.source_project, merge_request.author)}
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
= render "projects/merge_requests/show/commits" = render "projects/merge_requests/show/commits"
- if @commits.present? - if @commits.present?
%ul.nav.nav-tabs.append-bottom-10 %ul.nav.nav-tabs
%li.notes-tab{data: {action: 'notes'}} %li.notes-tab{data: {action: 'notes'}}
= link_to project_merge_request_path(@project, @merge_request) do = link_to project_merge_request_path(@project, @merge_request) do
%i.icon-comment %i.icon-comment
......
:plain :plain
$(".mr_source_commit").html("#{commit_to_html(@commit, @source_project)}"); $(".mr_source_commit").html("#{commit_to_html(@commit, @source_project, false)}");
var mrTitle = $('#merge_request_title'); var mrTitle = $('#merge_request_title');
if(mrTitle.val().length == 0) { if(mrTitle.val().length == 0) {
......
:plain :plain
$(".mr_target_commit").html("#{commit_to_html(@commit, @target_project)}"); $(".mr_target_commit").html("#{commit_to_html(@commit, @target_project, false)}");
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
= preserve do = preserve do
= markdown @milestone.description = markdown @milestone.description
%ul.nav.nav-tabs.append-bottom-10 %ul.nav.nav-tabs
%li.active %li.active
= link_to '#tab-issues', 'data-toggle' => 'tab' do = link_to '#tab-issues', 'data-toggle' => 'tab' do
Issues Issues
......
%ul.nav.nav-tabs.append-bottom-20 %ul.nav.nav-tabs
= nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do = nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do
= link_to 'Home', project_wiki_path(@project, :home) = link_to 'Home', project_wiki_path(@project, :home)
......
%ul.nav.nav-tabs.append-bottom-10 %ul.nav.nav-tabs
%li{class: ("active" if params[:search_code].present?)} %li{class: ("active" if params[:search_code].present?)}
= link_to search_path(params.merge(search_code: true)) do = link_to search_path(params.merge(search_code: true)) do
Repository Code Repository Code
......
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