Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
1dc00173
Commit
1dc00173
authored
Jun 08, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup and imrpove issue/mr buttons
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
366ad9ff
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
20 deletions
+27
-20
app/assets/stylesheets/framework/buttons.scss
app/assets/stylesheets/framework/buttons.scss
+13
-2
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+3
-0
app/views/projects/issues/_new_branch.html.haml
app/views/projects/issues/_new_branch.html.haml
+6
-6
app/views/projects/issues/index.html.haml
app/views/projects/issues/index.html.haml
+0
-1
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+2
-4
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+1
-3
app/views/projects/merge_requests/index.html.haml
app/views/projects/merge_requests/index.html.haml
+0
-1
app/views/projects/merge_requests/show/_mr_title.html.haml
app/views/projects/merge_requests/show/_mr_title.html.haml
+2
-3
No files found.
app/assets/stylesheets/framework/buttons.scss
View file @
1dc00173
...
...
@@ -142,15 +142,26 @@
}
&
.btn-grouped
{
margin-right
:
7px
;
margin-right
:
$btn-side-margin
;
float
:
left
;
&
.inline
{
float
:
none
;
}
&
:last-child
{
margin-right
:
0
;
}
&
.btn-sm
{
margin-right
:
$btn-sm-side-margin
;
}
&
.btn-xs
{
margin-right
:
3px
;
margin-right
:
$btn-xs-side-margin
;
}
}
&
.disabled
{
pointer-events
:
auto
!
important
;
}
...
...
app/assets/stylesheets/framework/variables.scss
View file @
1dc00173
...
...
@@ -79,6 +79,9 @@ $provider-btn-not-active-color: #4688f1;
$link-underline-blue
:
#4a8bee
;
$layout-link-gray
:
#7e7c7c
;
$todo-alert-blue
:
#428bca
;
$btn-side-margin
:
7px
;
$btn-sm-side-margin
:
5px
;
$btn-xs-side-margin
:
5px
;
/*
* Color schema
...
...
app/views/projects/issues/_new_branch.html.haml
View file @
1dc00173
-
if
can?
(
current_user
,
:push_code
,
@project
)
.pull-right
#new-branch
{
'data-path'
=>
can_create_branch_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
)}
=
link_to
namespace_project_branches_path
(
@project
.
namespace
,
@project
,
branch_name:
@issue
.
to_branch_name
,
issue_iid:
@issue
.
iid
),
method: :post
,
class:
'btn has-tooltip'
,
title:
@issue
.
to_branch_name
,
disabled:
'disabled'
do
=
link_to
namespace_project_branches_path
(
@project
.
namespace
,
@project
,
branch_name:
@issue
.
to_branch_name
,
issue_iid:
@issue
.
iid
),
method: :post
,
class:
'btn has-tooltip'
,
title:
@issue
.
to_branch_name
,
disabled:
'disabled'
do
.checking
%i
.fa.fa-spinner.fa-spin
=
icon
(
'spinner spin'
)
Checking branches
.available
(
style=
"display: none"
)
%i
.fa.fa-code-fork
.available.hide
New branch
.unavailable
(
style=
"display: none"
)
%i
.fa.fa-exclamation-triangle
.unavailable
.hide
=
icon
(
'exclamation-triangle'
)
New branch unavailable
app/views/projects/issues/index.html.haml
View file @
1dc00173
...
...
@@ -15,7 +15,6 @@
=
render
'shared/issuable/search_form'
,
path:
namespace_project_issues_path
(
@project
.
namespace
,
@project
)
-
if
can?
current_user
,
:create_issue
,
@project
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
issue:
{
assignee_id:
@issuable_finder
.
assignee
.
try
(
:id
),
milestone_id:
@issuable_finder
.
milestones
.
try
(
:first
).
try
(
:id
)
}),
class:
"btn btn-new"
,
title:
"New Issue"
,
id:
"new_issue_link"
do
=
icon
(
'plus'
)
New Issue
=
render
'shared/issuable/filter'
,
type: :issues
...
...
app/views/projects/issues/show.html.haml
View file @
1dc00173
...
...
@@ -39,13 +39,11 @@
=
link_to
'Edit'
,
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
)
-
if
can?
(
current_user
,
:create_issue
,
@project
)
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
),
class:
'hidden-xs hidden-sm btn btn-grouped new-issue-link btn-success'
,
title:
'New issue'
,
id:
'new_issue_link'
do
=
icon
(
'plus'
)
New issue
-
if
can?
(
current_user
,
:update_issue
,
@issue
)
=
link_to
'Reopen issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"hidden-xs hidden-sm btn btn-gr
ay btn-gr
ouped btn-reopen
#{
issue_button_visibility
(
@issue
,
false
)
}
"
,
title:
'Reopen issue'
=
link_to
'Reopen issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :reopen
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"hidden-xs hidden-sm btn btn-grouped btn-reopen
#{
issue_button_visibility
(
@issue
,
false
)
}
"
,
title:
'Reopen issue'
=
link_to
'Close issue'
,
issue_path
(
@issue
,
issue:
{
state_event: :close
},
status_only:
true
,
format:
'json'
),
data:
{
no_turbolink:
true
},
class:
"hidden-xs hidden-sm btn btn-grouped btn-close
#{
issue_button_visibility
(
@issue
,
true
)
}
"
,
title:
'Close issue'
=
link_to
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
),
class:
'hidden-xs hidden-sm btn btn-gray btn-grouped issuable-edit'
do
=
icon
(
'pencil-square-o'
)
=
link_to
edit_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
),
class:
'hidden-xs hidden-sm btn btn-grouped issuable-edit'
do
Edit
...
...
app/views/projects/merge_requests/_show.html.haml
View file @
1dc00173
...
...
@@ -14,13 +14,11 @@
-
if
@merge_request
.
open?
.pull-right
-
if
@merge_request
.
source_branch_exists?
=
link_to
"#modal_merge_info"
,
class:
"btn btn-sm"
,
"data-toggle"
=>
"modal"
do
=
icon
(
'cloud-download fw'
)
=
link_to
"#modal_merge_info"
,
class:
"btn inline btn-grouped btn-sm"
,
"data-toggle"
=>
"modal"
do
Check out branch
%span
.dropdown
%a
.btn.btn-sm.dropdown-toggle
{
data:
{
toggle: :dropdown
}
}
=
icon
(
'download'
)
Download as
%span
.caret
%ul
.dropdown-menu
...
...
app/views/projects/merge_requests/index.html.haml
View file @
1dc00173
...
...
@@ -10,7 +10,6 @@
-
merge_project
=
can?
(
current_user
,
:create_merge_request
,
@project
)
?
@project
:
(
current_user
&&
current_user
.
fork_of
(
@project
))
-
if
merge_project
=
link_to
new_namespace_project_merge_request_path
(
merge_project
.
namespace
,
merge_project
),
class:
"btn btn-new"
,
title:
"New Merge Request"
do
=
icon
(
'plus'
)
New Merge Request
=
render
'shared/issuable/filter'
,
type: :merge_requests
...
...
app/views/projects/merge_requests/show/_mr_title.html.haml
View file @
1dc00173
...
...
@@ -26,7 +26,6 @@
%li
=
link_to
'Edit'
,
edit_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
'issuable-edit'
=
link_to
'Close'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
"hidden-xs hidden-sm btn btn-grouped btn-close
#{
issue_button_visibility
(
@merge_request
,
true
)
}
"
,
title:
'Close merge request'
=
link_to
'Reopen'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
"hidden-xs hidden-sm btn btn-gray btn-grouped btn-reopen reopen-mr-link
#{
issue_button_visibility
(
@merge_request
,
false
)
}
"
,
title:
'Reopen merge request'
=
link_to
edit_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
"hidden-xs hidden-sm btn btn-gray btn-grouped issuable-edit"
do
=
icon
(
'pencil-square-o'
)
=
link_to
'Reopen'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
"hidden-xs hidden-sm btn btn-grouped btn-reopen reopen-mr-link
#{
issue_button_visibility
(
@merge_request
,
false
)
}
"
,
title:
'Reopen merge request'
=
link_to
edit_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
class:
"hidden-xs hidden-sm btn btn-grouped issuable-edit"
do
Edit
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment