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;
// Nav tabs
.nav.nav-tabs {
margin-bottom: 15px;
li {
> a {
padding: 8px 20px;
......
......@@ -2,7 +2,7 @@
* Admin area
*
*/
.admin_dash {
.admin-dashboard {
.data {
a {
h1 {
......@@ -14,6 +14,10 @@
}
}
}
.str-truncated {
max-width: 60%;
}
}
.admin-filter form {
......
......@@ -41,7 +41,7 @@
.dash-sidebar-tabs {
margin-bottom: 2px;
border: none;
margin: 0;
margin: 0 !important;
li {
&.active {
......
......@@ -229,9 +229,9 @@ header {
}
.title {
a {
color: #BBB;
&:hover {
color: #FFF;
&:hover {
text-decoration: underline;
}
}
color: #fff;
......
......@@ -31,10 +31,10 @@
.mr_source_commit,
.mr_target_commit {
margin-top: 10px;
.commit {
margin: 0;
padding: 0;
padding: 5px 0;
padding: 2px 0;
list-style: none;
&:hover {
background: none;
......
......@@ -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
end
end
def source_project_namespace
if source_project && source_project.namespace
source_project.namespace.path
else
"(removed)"
end
end
def source_branch_exists?
return false unless self.source_project
......
......@@ -3,7 +3,8 @@
%p.light
You can manage projects, users and other GitLab data from here.
%hr
.admin_dash.row
.admin-dashboard
.row
.col-sm-4
.light-well
%h4 Projects
......@@ -29,13 +30,13 @@
%hr
= link_to 'New Group', new_admin_group_path, class: "btn btn-new"
.row.prepend-top-10
.row.prepend-top-10
.col-md-4
%h4 Latest projects
%hr
- @projects.each do |project|
%p
= link_to project.name_with_namespace, [:admin, project]
= link_to project.name_with_namespace, [:admin, project], class: 'str-truncated'
%span.light.pull-right
#{time_ago_with_tooltip(project.created_at)}
......@@ -44,7 +45,7 @@
%hr
- @users.each do |user|
%p
= link_to [:admin, user] do
= link_to [:admin, user], class: 'str-truncated' do
= user.name
%span.light.pull-right
#{time_ago_with_tooltip(user.created_at)}
......@@ -54,13 +55,13 @@
%hr
- @groups.each do |group|
%p
= link_to [:admin, group] do
= link_to [:admin, group], class: 'str-truncated' do
= group.name
%span.light.pull-right
#{time_ago_with_tooltip(group.created_at)}
%br
.row
%br
.row
.col-md-4
%h4 Stats
%hr
......
%h3.page-title
Groups (#{@groups.total_count})
%small
allows you to keep projects organized.
= link_to 'New Group', new_admin_group_path, class: "btn btn-new pull-right"
%p.light
Group allows you to keep projects organized.
Use groups for uniting related projects.
= link_to 'New Group', new_admin_group_path, class: "btn btn-new pull-right"
%br
%hr
= form_tag admin_groups_path, method: :get, class: 'form-inline' do
.form-group
= text_field_tag :name, params[:name], class: "form-control input-mn-300"
......@@ -23,24 +24,18 @@
%h4
= link_to [:admin, group] do
%i.icon-folder-close
= group.name
&rarr;
%span.monospace
%i.icon-folder-close
%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
%p
= truncate group.description, length: 150
.clearfix
%p.light
#{pluralize(group.members.size, 'member')}, #{pluralize(group.projects.count, 'project')}
= paginate @groups, theme: "gitlab"
.row
.col-md-3
.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
%li{class: "#{'active' unless params[:filter]}"}
= link_to admin_users_path do
......@@ -25,6 +19,12 @@
Without projects
%small.pull-right= User.without_projects.count
%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"
.col-md-9
......
.login-box
%h3.page-title Sign in
- if ldap_enabled?
%ul.nav.nav-tabs.append-bottom-20
%ul.nav.nav-tabs
%li.active
= link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
%li
......
%h3.page-title
My Email Addresses
My email addresses
%p.light
Your
%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
.title
......@@ -19,7 +23,7 @@
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'
%h3.page-title Add Email Address
%h4 Add email address
= form_for 'email', url: profile_emails_path, html: { class: 'form-horizontal' } do |f|
.form-group
= 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'}
= nav_link(controller: [:commit, :commits]) do
......
%ul.nav.nav-tabs.append-bottom-15
%ul.nav.nav-tabs
= nav_link(controller: :issues) do
= link_to project_issues_path(@project), class: "tab" do
Browse Issues
......
......@@ -6,19 +6,22 @@
%li= msg
.merge-request-branches
.row
.col-md-5
.form-group
= label_tag nil, class: 'control-label' do
From
.col-sm-10
.clearfix
.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? })
.pull-left
&nbsp;
= f.select(:source_branch, @merge_request.source_branches, { include_blank: "Select branch" }, {class: 'source_branch select2 span2'})
.mr_source_commit.prepend-top-10
.col-md-2
.merge-request-angle
%i.icon-long-arrow-right
.col-md-5
.mr_source_commit
%br
.form-group
= label_tag nil, class: 'control-label' do
To
.col-sm-10
.clearfix
.pull-left
- projects = @project.forked_from_project.nil? ? [@project] : [ @project,@project.forked_from_project]
......@@ -26,7 +29,7 @@
.pull-left
&nbsp;
= 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
.merge-request-form-info
......
......@@ -10,14 +10,14 @@
%span.pull-right
- if merge_request.for_fork?
%span.light
= "#{merge_request.source_project_path}"
= "#{merge_request.source_branch}"
#{merge_request.source_project_namespace}:
= merge_request.source_branch
%i.icon-angle-right.light
= "#{merge_request.target_branch}"
= merge_request.target_branch
- else
= "#{merge_request.source_branch}"
= merge_request.source_branch
%i.icon-angle-right.light
= "#{merge_request.target_branch}"
= merge_request.target_branch
.merge-request-info
- if merge_request.author
authored by #{link_to_member(merge_request.source_project, merge_request.author)}
......
......@@ -12,7 +12,7 @@
= render "projects/merge_requests/show/commits"
- if @commits.present?
%ul.nav.nav-tabs.append-bottom-10
%ul.nav.nav-tabs
%li.notes-tab{data: {action: 'notes'}}
= link_to project_merge_request_path(@project, @merge_request) do
%i.icon-comment
......
: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');
if(mrTitle.val().length == 0) {
......
: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 @@
= preserve do
= markdown @milestone.description
%ul.nav.nav-tabs.append-bottom-10
%ul.nav.nav-tabs
%li.active
= link_to '#tab-issues', 'data-toggle' => 'tab' do
Issues
......
%ul.nav.nav-tabs.append-bottom-20
%ul.nav.nav-tabs
= nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do
= 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?)}
= link_to search_path(params.merge(search_code: true)) do
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