Commit f9ece12e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'master' into oauth2_provider

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	app/views/layouts/nav/_profile.html.haml
parents aadfb366 64286985
...@@ -89,6 +89,9 @@ class @MergeRequest ...@@ -89,6 +89,9 @@ class @MergeRequest
this.$('.merge-request-tabs .diffs-tab').addClass 'active' this.$('.merge-request-tabs .diffs-tab').addClass 'active'
this.loadDiff() unless @diffs_loaded this.loadDiff() unless @diffs_loaded
this.$('.diffs').show() this.$('.diffs').show()
when 'commits'
this.$('.merge-request-tabs .commits-tab').addClass 'active'
this.$('.commits').show()
else else
this.$('.merge-request-tabs .notes-tab').addClass 'active' this.$('.merge-request-tabs .notes-tab').addClass 'active'
this.$('.notes').show() this.$('.notes').show()
......
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
.issue-box { .issue-box {
display: inline-block; display: inline-block;
padding: 0 10px; padding: 7px 13px;
font-weight: normal;
margin-right: 5px;
&.issue-box-closed { &.issue-box-closed {
background-color: $bg_danger; background-color: $bg_danger;
......
...@@ -44,6 +44,6 @@ $added: #63c363; ...@@ -44,6 +44,6 @@ $added: #63c363;
$deleted: #f77; $deleted: #f77;
/** /**
* * NProgress customize
*/ */
$nprogress-color: #3498db; $nprogress-color: #3498db;
...@@ -19,13 +19,15 @@ ...@@ -19,13 +19,15 @@
} }
} }
.merge-request .merge-request-tabs{ @media(min-width: $screen-sm-max) {
margin: 20px 0; .merge-request .merge-request-tabs{
margin: 20px 0;
li {
a { li {
padding: 15px 40px; a {
font-size: 14px; padding: 15px 40px;
font-size: 14px;
}
} }
} }
} }
...@@ -102,6 +104,7 @@ ...@@ -102,6 +104,7 @@
.mr-state-widget { .mr-state-widget {
background: $box_bg; background: $box_bg;
margin-bottom: 20px; margin-bottom: 20px;
color: #666;
@include box-shadow(0 1px 1px rgba(0, 0, 0, 0.09)); @include box-shadow(0 1px 1px rgba(0, 0, 0, 0.09));
.ci_widget { .ci_widget {
...@@ -146,7 +149,6 @@ ...@@ -146,7 +149,6 @@
padding: 10px 15px; padding: 10px 15px;
h4 { h4 {
font-size: 20px;
font-weight: normal; font-weight: normal;
} }
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
font-size: 13px; font-size: 13px;
line-height: 20px; line-height: 20px;
text-shadow: 0 1px 2px #FFF; text-shadow: 0 1px 2px #FFF;
padding-left: 67px; padding-left: 20px;
&:hover { &:hover {
text-decoration: none; text-decoration: none;
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
i { i {
width: 20px; width: 20px;
color: #888; color: #888;
margin-right: 23px;
} }
} }
} }
...@@ -91,12 +92,12 @@ ...@@ -91,12 +92,12 @@
a { a {
padding: 5px 15px; padding: 5px 15px;
font-size: 12px; font-size: 12px;
padding-left: 67px; padding-left: 20px;
} }
} }
} }
@media(min-width:768px) { @mixin expanded-sidebar {
.page-with-sidebar { .page-with-sidebar {
padding-left: 250px; padding-left: 250px;
} }
...@@ -121,3 +122,44 @@ ...@@ -121,3 +122,44 @@
border-left: 1px solid #EAEAEA; border-left: 1px solid #EAEAEA;
} }
} }
@mixin folded-sidebar {
.page-with-sidebar {
padding-left: 50px;
}
.sidebar-wrapper {
width: 52px;
position: absolute;
left: 50px;
height: 100%;
margin-left: -50px;
.nav-sidebar {
margin-top: 20px;
position: fixed;
top: 45px;
width: 52px;
li a {
padding-left: 18px;
font-size: 14px;
padding: 10px 15px;
text-align: center;
& > span {
display: none;
}
}
}
}
}
@media (max-width: $screen-sm-max) {
@include folded-sidebar;
}
@media(min-width: $screen-sm-max) {
@include expanded-sidebar;
}
...@@ -117,4 +117,22 @@ module DiffHelper ...@@ -117,4 +117,22 @@ module DiffHelper
[comments_left, comments_right] [comments_left, comments_right]
end end
def inline_diff_btn
params_copy = params.dup
params_copy[:view] = 'inline'
link_to url_for(params_copy), id: "commit-diff-viewtype", class: (params[:view] != 'parallel' ? 'btn active' : 'btn') do
'Inline'
end
end
def parallel_diff_btn
params_copy = params.dup
params_copy[:view] = 'parallel'
link_to url_for(params_copy), id: "commit-diff-viewtype", class: (params[:view] == 'parallel' ? 'btn active' : 'btn') do
'Side-by-side'
end
end
end end
...@@ -38,17 +38,19 @@ ...@@ -38,17 +38,19 @@
= link_to project_path(project), class: dom_class(project) do = link_to project_path(project), class: dom_class(project) do
= project.name_with_namespace = project.name_with_namespace
- if project.forked_from_project
&nbsp;
%small
%i.fa.fa-code-fork
Forked from:
= link_to project.forked_from_project.name_with_namespace, project_path(project.forked_from_project)
- if current_user.can_leave_project?(project) - if current_user.can_leave_project?(project)
.pull-right .pull-right
= link_to leave_project_team_members_path(project), data: { confirm: "Leave project?"}, method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do = link_to leave_project_team_members_path(project), data: { confirm: "Leave project?"}, method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do
%i.fa.fa-sign-out %i.fa.fa-sign-out
Leave Leave
- if project.forked_from_project
%small.pull-right
%i.fa.fa-code-fork
Forked from:
= link_to project.forked_from_project.name_with_namespace, project_path(project.forked_from_project)
.project-info .project-info
.pull-right .pull-right
- if project.archived? - if project.archived?
......
...@@ -2,3 +2,7 @@ ...@@ -2,3 +2,7 @@
.broadcast-message{ style: broadcast_styling(broadcast_message) } .broadcast-message{ style: broadcast_styling(broadcast_message) }
%i.fa.fa-bullhorn %i.fa.fa-bullhorn
= broadcast_message.message = broadcast_message.message
:css
.sidebar-wrapper .nav-sidebar {
margin-top: 58px;
}
%ul.nav-sidebar.navbar-collapse.collapse %ul.nav.nav-sidebar
= nav_link(controller: :dashboard, html_options: {class: 'home'}) do = nav_link(controller: :dashboard, html_options: {class: 'home'}) do
= link_to admin_root_path, title: "Stats" do = link_to admin_root_path, title: "Stats" do
Overview %i.fa.fa-dashboard
%span
Overview
= nav_link(controller: :projects) do = nav_link(controller: :projects) do
= link_to "Projects", admin_projects_path = link_to admin_projects_path do
%i.fa.fa-cube
%span
Projects
= nav_link(controller: :users) do = nav_link(controller: :users) do
= link_to "Users", admin_users_path = link_to admin_users_path do
%i.fa.fa-users
%span
Users
= nav_link(controller: :groups) do = nav_link(controller: :groups) do
= link_to "Groups", admin_groups_path = link_to admin_groups_path do
%i.fa.fa-group
%span
Groups
= nav_link(controller: :logs) do = nav_link(controller: :logs) do
= link_to "Logs", admin_logs_path = link_to admin_logs_path do
%i.fa.fa-file-text
%span
Logs
= nav_link(controller: :broadcast_messages) do = nav_link(controller: :broadcast_messages) do
= link_to "Messages", admin_broadcast_messages_path = link_to admin_broadcast_messages_path do
%i.fa.fa-bullhorn
%span
Messages
= nav_link(controller: :hooks) do = nav_link(controller: :hooks) do
= link_to "Hooks", admin_hooks_path = link_to admin_hooks_path do
%i.fa.fa-external-link
%span
Hooks
= nav_link(controller: :background_jobs) do = nav_link(controller: :background_jobs) do
= link_to "Background Jobs", admin_background_jobs_path = link_to admin_background_jobs_path do
%i.fa.fa-cog
%span
Background Jobs
%ul.nav.nav-sidebar.navbar-collapse.collapse %ul.nav.nav-sidebar
= nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do = nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do
= link_to root_path, title: 'Home', class: 'shortcuts-activity' do = link_to root_path, title: 'Home', class: 'shortcuts-activity' do
%i.fa.fa-dashboard %i.fa.fa-dashboard
Activity %span
Activity
= nav_link(path: 'dashboard#projects') do = nav_link(path: 'dashboard#projects') do
= link_to projects_dashboard_path, class: 'shortcuts-projects' do = link_to projects_dashboard_path, class: 'shortcuts-projects' do
%i.fa.fa-cube %i.fa.fa-cube
Projects %span
Projects
= nav_link(path: 'dashboard#issues') do = nav_link(path: 'dashboard#issues') do
= link_to issues_dashboard_path, class: 'shortcuts-issues' do = link_to issues_dashboard_path, class: 'shortcuts-issues' do
%i.fa.fa-exclamation-circle %i.fa.fa-exclamation-circle
Issues %span
%span.count= current_user.assigned_issues.opened.count Issues
%span.count= current_user.assigned_issues.opened.count
= nav_link(path: 'dashboard#merge_requests') do = nav_link(path: 'dashboard#merge_requests') do
= link_to merge_requests_dashboard_path, class: 'shortcuts-merge_requests' do = link_to merge_requests_dashboard_path, class: 'shortcuts-merge_requests' do
%i.fa.fa-tasks %i.fa.fa-tasks
Merge Requests %span
%span.count= current_user.assigned_merge_requests.opened.count Merge Requests
%span.count= current_user.assigned_merge_requests.opened.count
= nav_link(controller: :help) do = nav_link(controller: :help) do
= link_to help_path do = link_to help_path do
%i.fa.fa-question-circle %i.fa.fa-question-circle
Help %span
Help
%ul.nav.nav-sidebar.navbar-collapse.collapse %ul.nav.nav-sidebar
= nav_link(path: 'groups#show', html_options: {class: 'home'}) do = nav_link(path: 'groups#show', html_options: {class: 'home'}) do
= link_to group_path(@group), title: "Home" do = link_to group_path(@group), title: "Home" do
%i.fa.fa-dashboard %i.fa.fa-dashboard
Activity %span
Activity
- if current_user - if current_user
= nav_link(controller: [:group, :milestones]) do = nav_link(controller: [:group, :milestones]) do
= link_to group_milestones_path(@group) do = link_to group_milestones_path(@group) do
%i.fa.fa-clock-o %i.fa.fa-clock-o
Milestones %span
Milestones
= nav_link(path: 'groups#issues') do = nav_link(path: 'groups#issues') do
= link_to issues_group_path(@group) do = link_to issues_group_path(@group) do
%i.fa.fa-exclamation-circle %i.fa.fa-exclamation-circle
Issues %span
- if current_user Issues
%span.count= Issue.opened.of_group(@group).count - if current_user
%span.count= Issue.opened.of_group(@group).count
= nav_link(path: 'groups#merge_requests') do = nav_link(path: 'groups#merge_requests') do
= link_to merge_requests_group_path(@group) do = link_to merge_requests_group_path(@group) do
%i.fa.fa-tasks %i.fa.fa-tasks
Merge Requests %span
- if current_user Merge Requests
%span.count= MergeRequest.opened.of_group(@group).count - if current_user
%span.count= MergeRequest.opened.of_group(@group).count
= nav_link(path: 'groups#members') do = nav_link(path: 'groups#members') do
= link_to members_group_path(@group) do = link_to members_group_path(@group) do
%i.fa.fa-users %i.fa.fa-users
Members %span
Members
- if can?(current_user, :manage_group, @group) - if can?(current_user, :manage_group, @group)
= nav_link(html_options: { class: "#{"active" if group_settings_page?} separate-item" }) do = nav_link(html_options: { class: "#{"active" if group_settings_page?} separate-item" }) do
= link_to edit_group_path(@group), class: "tab no-highlight" do = link_to edit_group_path(@group), class: "tab no-highlight" do
%i.fa.fa-cogs %i.fa.fa-cogs
Settings %span
%i.fa.fa-angle-down Settings
%i.fa.fa-angle-down
- if group_settings_page? - if group_settings_page?
= render 'groups/settings_nav' = render 'groups/settings_nav'
%ul.nav-sidebar.navbar-collapse.collapse %ul.nav.nav-sidebar
= nav_link(path: 'profiles#show', html_options: {class: 'home'}) do = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do
= link_to profile_path, title: "Profile" do = link_to profile_path, title: "Profile" do
%i.fa.fa-user %i.fa.fa-user
Profile %span
= nav_link(controller: [:accounts]) do Profile
= nav_link(controller: :accounts) do
= link_to profile_account_path do = link_to profile_account_path do
%i.fa.fa-gear %i.fa.fa-gear
Account Account
...@@ -14,33 +15,40 @@ ...@@ -14,33 +15,40 @@
= nav_link(controller: :emails) do = nav_link(controller: :emails) do
= link_to profile_emails_path do = link_to profile_emails_path do
%i.fa.fa-envelope-o %i.fa.fa-envelope-o
Emails %span
%span.count= current_user.emails.count + 1 Emails
%span.count= current_user.emails.count + 1
- unless current_user.ldap_user? - unless current_user.ldap_user?
= nav_link(controller: :passwords) do = nav_link(controller: :passwords) do
= link_to edit_profile_password_path do = link_to edit_profile_password_path do
%i.fa.fa-lock %i.fa.fa-lock
Password %span
Password
= nav_link(controller: :notifications) do = nav_link(controller: :notifications) do
= link_to profile_notifications_path do = link_to profile_notifications_path do
%i.fa.fa-inbox %i.fa.fa-inbox
Notifications %span
Notifications
= nav_link(controller: :keys) do = nav_link(controller: :keys) do
= link_to profile_keys_path do = link_to profile_keys_path do
%i.fa.fa-key %i.fa.fa-key
SSH Keys %span
%span.count= current_user.keys.count SSH Keys
%span.count= current_user.keys.count
= nav_link(path: 'profiles#design') do = nav_link(path: 'profiles#design') do
= link_to design_profile_path do = link_to design_profile_path do
%i.fa.fa-image %i.fa.fa-image
Design %span
Design
= nav_link(controller: :groups) do = nav_link(controller: :groups) do
= link_to profile_groups_path do = link_to profile_groups_path do
%i.fa.fa-group %i.fa.fa-group
Groups %span
Groups
= nav_link(path: 'profiles#history') do = nav_link(path: 'profiles#history') do
= link_to history_profile_path do = link_to history_profile_path do
%i.fa.fa-history %i.fa.fa-history
History %span
History
%ul.project-navigation.nav.nav-sidebar.navbar-collapse.collapse %ul.project-navigation.nav.nav-sidebar
= nav_link(path: 'projects#show', html_options: {class: "home"}) do = nav_link(path: 'projects#show', html_options: {class: "home"}) do
= link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do = link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do
%i.fa.fa-dashboard %i.fa.fa-dashboard
Project %span
Project
- if project_nav_tab? :files - if project_nav_tab? :files
= nav_link(controller: %w(tree blob blame edit_tree new_tree)) do = nav_link(controller: %w(tree blob blame edit_tree new_tree)) do
= link_to project_tree_path(@project, @ref || @repository.root_ref), class: 'shortcuts-tree' do = link_to project_tree_path(@project, @ref || @repository.root_ref), class: 'shortcuts-tree' do
%i.fa.fa-files-o %i.fa.fa-files-o
Files %span
Files
- if project_nav_tab? :commits - if project_nav_tab? :commits
= nav_link(controller: %w(commit commits compare repositories tags branches)) do = nav_link(controller: %w(commit commits compare repositories tags branches)) do
= link_to project_commits_path(@project, @ref || @repository.root_ref), class: 'shortcuts-commits' do = link_to project_commits_path(@project, @ref || @repository.root_ref), class: 'shortcuts-commits' do
%i.fa.fa-history %i.fa.fa-history
Commits %span
Commits
- if project_nav_tab? :network - if project_nav_tab? :network
= nav_link(controller: %w(network)) do = nav_link(controller: %w(network)) do
= link_to project_network_path(@project, @ref || @repository.root_ref), class: 'shortcuts-network' do = link_to project_network_path(@project, @ref || @repository.root_ref), class: 'shortcuts-network' do
%i.fa.fa-code-fork %i.fa.fa-code-fork
Network %span
Network
- if project_nav_tab? :graphs - if project_nav_tab? :graphs
= nav_link(controller: %w(graphs)) do = nav_link(controller: %w(graphs)) do
= link_to project_graph_path(@project, @ref || @repository.root_ref), class: 'shortcuts-graphs' do = link_to project_graph_path(@project, @ref || @repository.root_ref), class: 'shortcuts-graphs' do
%i.fa.fa-area-chart %i.fa.fa-area-chart
Graphs %span
Graphs
- if project_nav_tab? :issues - if project_nav_tab? :issues
= nav_link(controller: %w(issues milestones labels)) do = nav_link(controller: %w(issues milestones labels)) do
= link_to url_for_project_issues, class: 'shortcuts-issues' do = link_to url_for_project_issues, class: 'shortcuts-issues' do
%i.fa.fa-exclamation-circle %i.fa.fa-exclamation-circle
Issues %span
- if @project.used_default_issues_tracker? Issues
%span.count.issue_counter= @project.issues.opened.count - if @project.used_default_issues_tracker?
%span.count.issue_counter= @project.issues.opened.count
- if project_nav_tab? :merge_requests - if project_nav_tab? :merge_requests
= nav_link(controller: :merge_requests) do = nav_link(controller: :merge_requests) do
= link_to project_merge_requests_path(@project), class: 'shortcuts-merge_requests' do = link_to project_merge_requests_path(@project), class: 'shortcuts-merge_requests' do
%i.fa.fa-tasks %i.fa.fa-tasks
Merge Requests %span
%span.count.merge_counter= @project.merge_requests.opened.count Merge Requests
%span.count.merge_counter= @project.merge_requests.opened.count
- if project_nav_tab? :wiki - if project_nav_tab? :wiki
= nav_link(controller: :wikis) do = nav_link(controller: :wikis) do
= link_to project_wiki_path(@project, :home), class: 'shortcuts-wiki' do = link_to project_wiki_path(@project, :home), class: 'shortcuts-wiki' do
%i.fa.fa-book %i.fa.fa-book
Wiki %span
Wiki
- if project_nav_tab? :snippets - if project_nav_tab? :snippets
= nav_link(controller: :snippets) do = nav_link(controller: :snippets) do
= link_to project_snippets_path(@project), class: 'shortcuts-snippets' do = link_to project_snippets_path(@project), class: 'shortcuts-snippets' do
%i.fa.fa-file-text-o %i.fa.fa-file-text-o
Snippets %span
Snippets
- if project_nav_tab? :settings - if project_nav_tab? :settings
= nav_link(html_options: {class: "#{project_tab_class} separate-item"}) do = nav_link(html_options: {class: "#{project_tab_class} separate-item"}) do
= link_to edit_project_path(@project), class: "stat-tab tab no-highlight" do = link_to edit_project_path(@project), class: "stat-tab tab no-highlight" do
%i.fa.fa-cogs %i.fa.fa-cogs
Settings %span
%i.fa.fa-angle-down Settings
%i.fa.fa-angle-down
- if @project_settings_nav - if @project_settings_nav
= render 'projects/settings_nav' = render 'projects/settings_nav'
...@@ -2,24 +2,30 @@ ...@@ -2,24 +2,30 @@
= nav_link(path: 'projects#edit') do = nav_link(path: 'projects#edit') do
= link_to edit_project_path(@project), class: "stat-tab tab " do = link_to edit_project_path(@project), class: "stat-tab tab " do
%i.fa.fa-pencil-square-o %i.fa.fa-pencil-square-o
Project %span
Project
= nav_link(controller: [:team_members, :teams]) do = nav_link(controller: [:team_members, :teams]) do
= link_to project_team_index_path(@project), class: "team-tab tab" do = link_to project_team_index_path(@project), class: "team-tab tab" do
%i.fa.fa-users %i.fa.fa-users
Members %span
Members
= nav_link(controller: :deploy_keys) do = nav_link(controller: :deploy_keys) do
= link_to project_deploy_keys_path(@project) do = link_to project_deploy_keys_path(@project) do
%i.fa.fa-key %i.fa.fa-key
Deploy Keys %span
Deploy Keys
= nav_link(controller: :hooks) do = nav_link(controller: :hooks) do
= link_to project_hooks_path(@project) do = link_to project_hooks_path(@project) do
%i.fa.fa-link %i.fa.fa-link
Web Hooks %span
Web Hooks
= nav_link(controller: :services) do = nav_link(controller: :services) do
= link_to project_services_path(@project) do = link_to project_services_path(@project) do
%i.fa.fa-cogs %i.fa.fa-cogs
Services %span
Services
= nav_link(controller: :protected_branches) do = nav_link(controller: :protected_branches) do
= link_to project_protected_branches_path(@project) do = link_to project_protected_branches_path(@project) do
%i.fa.fa-lock %i.fa.fa-lock
Protected branches %span
Protected branches
...@@ -2,15 +2,9 @@ ...@@ -2,15 +2,9 @@
.col-md-8 .col-md-8
= render 'projects/diffs/stats', diffs: diffs = render 'projects/diffs/stats', diffs: diffs
.col-md-4 .col-md-4
%ul.nav.nav-tabs .btn-group.pull-right
%li.pull-right{class: params[:view] == 'parallel' ? 'active' : ''} = inline_diff_btn
- params_copy = params.dup = parallel_diff_btn
- params_copy[:view] = 'parallel'
= link_to "Side-by-side Diff", url_for(params_copy), {id: "commit-diff-viewtype"}
%li.pull-right{class: params[:view] != 'parallel' ? 'active' : ''}
- params_copy[:view] = 'inline'
= link_to "Inline Diff", url_for(params_copy), {id: "commit-diff-viewtype"}
- if show_diff_size_warning?(diffs) - if show_diff_size_warning?(diffs)
= render 'projects/diffs/warning', diffs: diffs = render 'projects/diffs/warning', diffs: diffs
......
- content_for :note_actions do
- if can?(current_user, :modify_issue, @issue)
- if @issue.closed?
= link_to 'Reopen Issue', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-grouped btn-reopen js-note-target-reopen", title: 'Reopen Issue'
- else
= link_to 'Close Issue', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close js-note-target-close", title: "Close Issue"
.row
.col-md-9
.participants
%cite.cgray
= pluralize(@issue.participants.count, 'participant')
- @issue.participants.each do |participant|
= link_to_member(@project, participant, name: false, size: 24)
.voting_notes#notes= render "projects/notes/notes_with_form"
.col-md-3.hidden-sm.hidden-xs
%div
.clearfix
%span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'}
= cross_project_reference(@project, @issue)
%hr
.clearfix
.votes-holder
%h6 Votes
#votes= render 'votes/votes_block', votable: @issue
%hr
.context
%cite.cgray
= render partial: 'issue_context', locals: { issue: @issue }
- if @issue.labels.any?
%hr
%h6 Labels
.issue-show-labels
- @issue.labels.each do |label|
= link_to project_issues_path(@project, label_name: label.name) do
%p= render_colored_label(label)
%h3.page-title %h4.page-title
.issue-box{ class: issue_box_class(@issue) } .issue-box{ class: issue_box_class(@issue) }
- if @issue.closed? - if @issue.closed?
Closed Closed
- else - else
Open Open
Issue ##{@issue.iid} Issue ##{@issue.iid}
.pull-right.creator %small.creator
%small Created by #{link_to_member(@project, @issue.author)} #{issue_timestamp(@issue)} &middot; created by #{link_to_member(@project, @issue.author)} #{issue_timestamp(@issue)}
%hr
.row .pull-right
.col-sm-9 - if can?(current_user, :write_issue, @project)
%h3.issue-title = link_to new_project_issue_path(@project), class: "btn btn-grouped", title: "New Issue", id: "new_issue_link" do
= gfm escape_once(@issue.title) %i.fa.fa-plus
%div New Issue
- if @issue.description.present? - if can?(current_user, :modify_issue, @issue)
.description - if @issue.closed?
.wiki = link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-grouped btn-reopen"
= preserve do - else
= markdown(@issue.description, parse_tasks: true) = link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close", title: "Close Issue"
%hr
- content_for :note_actions do
- if can?(current_user, :modify_issue, @issue)
- if @issue.closed?
= link_to 'Reopen Issue', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-grouped btn-reopen js-note-target-reopen", title: 'Reopen Issue'
- else
= link_to 'Close Issue', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close js-note-target-close", title: "Close Issue"
.participants
%cite.cgray
= pluralize(@issue.participants.count, 'participant')
- @issue.participants.each do |participant|
= link_to_member(@project, participant, name: false, size: 24)
.issue-show-labels.pull-right
- @issue.labels.each do |label|
= link_to project_issues_path(@project, label_name: label.name) do
= render_colored_label(label)
.voting_notes#notes= render "projects/notes/notes_with_form" = link_to edit_project_issue_path(@project, @issue), class: "btn btn-grouped issuable-edit" do
.col-sm-3 %i.fa.fa-pencil-square-o
%div Edit
- if can?(current_user, :write_issue, @project)
= link_to new_project_issue_path(@project), class: "btn btn-block", title: "New Issue", id: "new_issue_link" do
%i.fa.fa-plus
New Issue
- if can?(current_user, :modify_issue, @issue)
- if @issue.closed?
= link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-block btn-reopen"
- else
= link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-block btn-close", title: "Close Issue"
= link_to edit_project_issue_path(@project, @issue), class: "btn btn-block issuable-edit" do %hr
%i.fa.fa-pencil-square-o %h3.issue-title
Edit = gfm escape_once(@issue.title)
.clearfix %div
%span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'} - if @issue.description.present?
= cross_project_reference(@project, @issue) .description
%hr .wiki
.clearfix = preserve do
.votes-holder = markdown(@issue.description, parse_tasks: true)
%h6 Votes
#votes= render 'votes/votes_block', votable: @issue %hr
%hr = render "projects/issues/discussion"
.context
%cite.cgray
= render partial: 'issue_context', locals: { issue: @issue }
- content_for :note_actions do
- if can?(current_user, :modify_merge_request, @merge_request)
- if @merge_request.open?
= link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :close }), method: :put, class: "btn btn-grouped btn-close close-mr-link js-note-target-close", title: "Close merge request"
- if @merge_request.closed?
= link_to 'Reopen', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-grouped btn-reopen reopen-mr-link js-note-target-reopen", title: "Reopen merge request"
.row
.col-md-9
= render "projects/merge_requests/show/participants"
= render "projects/notes/notes_with_form"
.col-md-3.hidden-sm.hidden-xs
.clearfix
%span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'}
= cross_project_reference(@project, @merge_request)
%hr
.votes-holder.hidden-sm.hidden-xs
%h6 Votes
#votes= render 'votes/votes_block', votable: @merge_request
%hr
.context
%cite.cgray
= render partial: 'projects/merge_requests/show/context', locals: { merge_request: @merge_request }
- if @merge_request.labels.any?
%hr
%h6 Labels
.merge-request-show-labels
- @merge_request.labels.each do |label|
= link_to project_merge_requests_path(@project, label_name: label.name) do
%p= render_colored_label(label)
.merge-request .merge-request
= render "projects/merge_requests/show/mr_title" = render "projects/merge_requests/show/mr_title"
%hr %hr
.row = render "projects/merge_requests/show/mr_box"
.col-sm-9 %hr
= render "projects/merge_requests/show/how_to_merge" .append-bottom-20
= render "projects/merge_requests/show/mr_box" .slead
%hr %span From
.append-bottom-20 - if @merge_request.for_fork?
%p.slead %strong.label-branch<
%span From - if @merge_request.source_project
- if @merge_request.for_fork? = link_to @merge_request.source_project_namespace, project_path(@merge_request.source_project)
%strong.label-branch<
- if @merge_request.source_project
= link_to @merge_request.source_project_namespace, project_path(@merge_request.source_project)
- else
\ #{@merge_request.source_project_namespace}
\:#{@merge_request.source_branch}
%span into
%strong.label-branch #{@merge_request.target_project_namespace}:#{@merge_request.target_branch}
- else - else
%strong.label-branch #{@merge_request.source_branch} \ #{@merge_request.source_project_namespace}
%span into \:#{@merge_request.source_branch}
%strong.label-branch #{@merge_request.target_branch} %span into
= render "projects/merge_requests/show/state_widget" %strong.label-branch #{@merge_request.target_project_namespace}:#{@merge_request.target_branch}
= render "projects/merge_requests/show/commits" - else
= render "projects/merge_requests/show/participants" %strong.label-branch #{@merge_request.source_branch}
%span into
%strong.label-branch #{@merge_request.target_branch}
- if @merge_request.open?
%span.pull-right
.btn-group
%a.btn.dropdown-toggle{ data: {toggle: :dropdown} }
%i.fa.fa-download
Download as
%span.caret
%ul.dropdown-menu
%li= link_to "Email Patches", project_merge_request_path(@project, @merge_request, format: :patch)
%li= link_to "Plain Diff", project_merge_request_path(@project, @merge_request, format: :diff)
.col-sm-3 = render "projects/merge_requests/show/how_to_merge"
.issue-btn-group = render "projects/merge_requests/show/state_widget"
- if can?(current_user, :modify_merge_request, @merge_request)
- if @merge_request.open?
.btn-group-justified.append-bottom-20
.btn-group
%a.btn.dropdown-toggle{ data: {toggle: :dropdown} }
%i.fa.fa-download
Download as
%span.caret
%ul.dropdown-menu
%li= link_to "Email Patches", project_merge_request_path(@project, @merge_request, format: :patch)
%li= link_to "Plain Diff", project_merge_request_path(@project, @merge_request, format: :diff)
= link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: { state_event: :close }), method: :put, class: "btn btn-block btn-close", title: "Close merge request"
= link_to edit_project_merge_request_path(@project, @merge_request), class: "btn btn-block issuable-edit", id: "edit_merge_request" do
%i.fa.fa-pencil-square-o
Edit
- if @merge_request.closed?
= link_to 'Reopen', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-block btn-reopen reopen-mr-link", title: "Close merge request"
.clearfix
%span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'}
= cross_project_reference(@project, @merge_request)
%hr
.votes-holder.hidden-sm.hidden-xs
%h6 Votes
#votes= render 'votes/votes_block', votable: @merge_request
%hr
.context
%cite.cgray
= render partial: 'projects/merge_requests/show/context', locals: { merge_request: @merge_request }
- if @commits.present? - if @commits.present?
%ul.nav.nav-tabs.merge-request-tabs %ul.nav.nav-tabs.merge-request-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.fa.fa-comment %i.fa.fa-comments
Discussion Discussion
%span.badge= @merge_request.mr_and_commit_notes.count %span.badge= @merge_request.mr_and_commit_notes.count
%li.commits-tab{data: {action: 'commits'}}
= link_to project_merge_request_path(@project, @merge_request), title: 'Commits' do
%i.fa.fa-database
Commits
%span.badge= @commits.size
%li.diffs-tab{data: {action: 'diffs'}} %li.diffs-tab{data: {action: 'diffs'}}
= link_to diffs_project_merge_request_path(@project, @merge_request) do = link_to diffs_project_merge_request_path(@project, @merge_request) do
%i.fa.fa-list-alt %i.fa.fa-list-alt
Changes Changes
%span.badge= @merge_request.diffs.size %span.badge= @merge_request.diffs.size
- content_for :note_actions do .notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" }
- if can?(current_user, :modify_merge_request, @merge_request) = render "projects/merge_requests/discussion"
- if @merge_request.open? .commits.tab-content
= link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :close }), method: :put, class: "btn btn-grouped btn-close close-mr-link js-note-target-close", title: "Close merge request" = render "projects/merge_requests/show/commits"
- if @merge_request.closed?
= link_to 'Reopen', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-grouped btn-reopen reopen-mr-link js-note-target-reopen", title: "Reopen merge request"
.diffs.tab-content .diffs.tab-content
- if current_page?(action: 'diffs') - if current_page?(action: 'diffs')
= render "projects/merge_requests/show/diffs" = render "projects/merge_requests/show/diffs"
.notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" }
.row
.col-sm-9
= render "projects/notes/notes_with_form"
.mr-loading-status .mr-loading-status
= spinner = spinner
......
%h3.page-title %h4.page-title
.issue-box{ class: issue_box_class(@merge_request) } .issue-box{ class: issue_box_class(@merge_request) }
- if @merge_request.merged? - if @merge_request.merged?
Merged Merged
...@@ -7,5 +7,16 @@ ...@@ -7,5 +7,16 @@
- else - else
Open Open
= "Merge Request ##{@merge_request.iid}" = "Merge Request ##{@merge_request.iid}"
.pull-right.creator %small.creator
%small Created by #{link_to_member(@project, @merge_request.author)} #{time_ago_with_tooltip(@merge_request.created_at)} &middot;
created by #{link_to_member(@project, @merge_request.author)} #{time_ago_with_tooltip(@merge_request.created_at)}
.issue-btn-group.pull-right
- if can?(current_user, :modify_merge_request, @merge_request)
- if @merge_request.open?
= link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: { state_event: :close }), method: :put, class: "btn btn-grouped btn-close", title: "Close merge request"
= link_to edit_project_merge_request_path(@project, @merge_request), class: "btn btn-grouped issuable-edit", id: "edit_merge_request" do
%i.fa.fa-pencil-square-o
Edit
- if @merge_request.closed?
= link_to 'Reopen', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :reopen }), method: :put, class: "btn btn-grouped btn-reopen reopen-mr-link", title: "Close merge request"
...@@ -2,8 +2,3 @@ ...@@ -2,8 +2,3 @@
%cite.cgray #{@merge_request.participants.count} participants %cite.cgray #{@merge_request.participants.count} participants
- @merge_request.participants.each do |participant| - @merge_request.participants.each do |participant|
= link_to_member(@project, participant, name: false, size: 24) = link_to_member(@project, participant, name: false, size: 24)
.merge-request-show-labels.pull-right
- @merge_request.labels.each do |label|
= link_to project_merge_requests_path(@project, label_name: label.name) do
= render_colored_label(label)
...@@ -4,4 +4,5 @@ if Rails.env == 'development' ...@@ -4,4 +4,5 @@ if Rails.env == 'development'
# initialization is skipped so trigger it # initialization is skipped so trigger it
Rack::MiniProfilerRails.initialize!(Rails.application) Rack::MiniProfilerRails.initialize!(Rails.application)
Rack::MiniProfiler.config.position = 'right' Rack::MiniProfiler.config.position = 'right'
Rack::MiniProfiler.config.start_hidden = true
end end
...@@ -78,14 +78,14 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps ...@@ -78,14 +78,14 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
end end
step 'I click side-by-side diff button' do step 'I click side-by-side diff button' do
click_link "Side-by-side Diff" click_link "Side-by-side"
end end
step 'I see side-by-side diff button' do step 'I see side-by-side diff button' do
page.should have_content "Side-by-side Diff" page.should have_content "Side-by-side"
end end
step 'I see inline diff button' do step 'I see inline diff button' do
page.should have_content "Inline Diff" page.should have_content "Inline"
end end
end end
...@@ -109,6 +109,10 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -109,6 +109,10 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end end
step 'I click on the commit in the merge request' do step 'I click on the commit in the merge request' do
within '.merge-request-tabs' do
click_link 'Commits'
end
within '.mr-commits' do within '.mr-commits' do
click_link Commit.truncate_sha(sample_commit.id) click_link Commit.truncate_sha(sample_commit.id)
end end
...@@ -261,7 +265,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -261,7 +265,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end end
step 'I click Side-by-side Diff tab' do step 'I click Side-by-side Diff tab' do
click_link 'Side-by-side Diff' click_link 'Side-by-side'
end end
step 'I should see comments on the side-by-side diff page' do step 'I should see comments on the side-by-side diff page' do
......
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