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; color: #FFF;
&:hover { &:hover {
color: #FFF; 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,136 +3,137 @@ ...@@ -3,136 +3,137 @@
%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
.col-sm-4 .row
.light-well .col-sm-4
%h4 Projects .light-well
.data %h4 Projects
= link_to admin_projects_path do .data
%h1= Project.count = link_to admin_projects_path do
%hr %h1= Project.count
= link_to 'New Project', new_project_path, class: "btn btn-new" %hr
.col-sm-4 = link_to 'New Project', new_project_path, class: "btn btn-new"
.light-well .col-sm-4
%h4 Users .light-well
.data %h4 Users
= link_to admin_users_path do .data
%h1= User.count = link_to admin_users_path do
%hr %h1= User.count
= link_to 'New User', new_admin_user_path, class: "btn btn-new" %hr
.col-sm-4 = link_to 'New User', new_admin_user_path, class: "btn btn-new"
.light-well .col-sm-4
%h4 Groups .light-well
.data %h4 Groups
= link_to admin_groups_path do .data
%h1= Group.count = link_to admin_groups_path do
%hr %h1= Group.count
= link_to 'New Group', new_admin_group_path, class: "btn btn-new" %hr
= 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
= link_to project.name_with_namespace, [:admin, project], class: 'str-truncated'
%span.light.pull-right
#{time_ago_with_tooltip(project.created_at)}
.col-md-4
%h4 Latest users
%hr
- @users.each do |user|
%p
= link_to [:admin, user], class: 'str-truncated' do
= user.name
%span.light.pull-right
#{time_ago_with_tooltip(user.created_at)}
.col-md-4
%h4 Latest groups
%hr
- @groups.each do |group|
%p
= link_to [:admin, group], class: 'str-truncated' do
= group.name
%span.light.pull-right
#{time_ago_with_tooltip(group.created_at)}
%br
.row
.col-md-4
%h4 Stats
%hr
%p %p
= link_to project.name_with_namespace, [:admin, project] Forks
%span.light.pull-right %span.light.pull-right
#{time_ago_with_tooltip(project.created_at)} = ForkedProjectLink.count
.col-md-4
%h4 Latest users
%hr
- @users.each do |user|
%p %p
= link_to [:admin, user] do Issues
= user.name
%span.light.pull-right %span.light.pull-right
#{time_ago_with_tooltip(user.created_at)} = Issue.count
.col-md-4
%h4 Latest groups
%hr
- @groups.each do |group|
%p %p
= link_to [:admin, group] do Merge Requests
= group.name
%span.light.pull-right %span.light.pull-right
#{time_ago_with_tooltip(group.created_at)} = MergeRequest.count
%p
%br Notes
.row %span.light.pull-right
.col-md-4 = Note.count
%h4 Stats %p
%hr Snippets
%p %span.light.pull-right
Forks = Snippet.count
%span.light.pull-right %p
= ForkedProjectLink.count SSH Keys
%p %span.light.pull-right
Issues = Key.count
%span.light.pull-right %p
= Issue.count Milestones
%p %span.light.pull-right
Merge Requests = Milestone.count
%span.light.pull-right .col-md-4
= MergeRequest.count %h4
%p Features
Notes %hr
%span.light.pull-right %p
= Note.count Sign up
%p %span.light.pull-right
Snippets = boolean_to_icon gitlab_config.signup_enabled
%span.light.pull-right %p
= Snippet.count LDAP
%p %span.light.pull-right
SSH Keys = boolean_to_icon Gitlab.config.ldap.enabled
%span.light.pull-right %p
= Key.count Gravatar
%p %span.light.pull-right
Milestones = boolean_to_icon Gitlab.config.gravatar.enabled
%span.light.pull-right %p
= Milestone.count OmniAuth
.col-md-4 %span.light.pull-right
%h4 = boolean_to_icon Gitlab.config.omniauth.enabled
Features .col-md-4
%hr %h4 Components
%p %hr
Sign up %p
%span.light.pull-right GitLab
= boolean_to_icon gitlab_config.signup_enabled %span.pull-right
%p = Gitlab::VERSION
LDAP %p
%span.light.pull-right GitLab Shell
= boolean_to_icon Gitlab.config.ldap.enabled %span.pull-right
%p = Gitlab::Shell.new.version
Gravatar %p
%span.light.pull-right GitLab API
= boolean_to_icon Gitlab.config.gravatar.enabled %span.pull-right
%p = API::API::version
OmniAuth %p
%span.light.pull-right Ruby
= boolean_to_icon Gitlab.config.omniauth.enabled %span.pull-right
.col-md-4 #{RUBY_VERSION}p#{RUBY_PATCHLEVEL}
%h4 Components
%hr
%p
GitLab
%span.pull-right
= Gitlab::VERSION
%p
GitLab Shell
%span.pull-right
= Gitlab::Shell.new.version
%p
GitLab API
%span.pull-right
= API::API::version
%p
Ruby
%span.pull-right
#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}
%p %p
Rails Rails
%span.pull-right %span.pull-right
#{Rails::VERSION::STRING} #{Rails::VERSION::STRING}
%h3.page-title %h3.page-title
Groups (#{@groups.total_count}) Groups (#{@groups.total_count})
%small
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" = link_to 'New Group', new_admin_group_path, class: "btn btn-new pull-right"
%br
%p.light
Group allows you to keep projects organized.
Use groups for uniting related projects.
%hr
= 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,11 +23,11 @@ ...@@ -19,11 +23,11 @@
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'
.col-sm-10 .col-sm-10
= f.text_field :email, class: 'form-control' = f.text_field :email, class: 'form-control'
.form-actions .form-actions
= f.submit 'Add', class: 'btn btn-create' = f.submit 'Add', class: 'btn btn-create'
\ No newline at end of file
%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