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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
e882455a
Commit
e882455a
authored
Nov 23, 2017
by
Jose Ivan Vargas Lopez
Committed by
Tim Zallmann
Nov 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change star, filter and settings icons to the their sprite based replacements
parent
9fefb6c2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
10 deletions
+15
-10
app/assets/javascripts/groups/components/item_actions.vue
app/assets/javascripts/groups/components/item_actions.vue
+5
-3
app/assets/javascripts/star.js
app/assets/javascripts/star.js
+6
-3
app/views/projects/buttons/_star.html.haml
app/views/projects/buttons/_star.html.haml
+3
-3
app/views/shared/groups/_group.html.haml
app/views/shared/groups/_group.html.haml
+1
-1
No files found.
app/assets/javascripts/groups/components/item_actions.vue
View file @
e882455a
...
@@ -4,9 +4,11 @@ import tooltip from '../../vue_shared/directives/tooltip';
...
@@ -4,9 +4,11 @@ import tooltip from '../../vue_shared/directives/tooltip';
import
PopupDialog
from
'
../../vue_shared/components/popup_dialog.vue
'
;
import
PopupDialog
from
'
../../vue_shared/components/popup_dialog.vue
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
import
{
COMMON_STR
}
from
'
../constants
'
;
import
{
COMMON_STR
}
from
'
../constants
'
;
import
Icon
from
'
../../vue_shared/components/icon.vue
'
;
export
default
{
export
default
{
components
:
{
components
:
{
Icon
,
PopupDialog
,
PopupDialog
,
},
},
directives
:
{
directives
:
{
...
@@ -63,9 +65,9 @@ export default {
...
@@ -63,9 +65,9 @@ export default {
:aria-label=
"editBtnTitle"
:aria-label=
"editBtnTitle"
data-container=
"body"
data-container=
"body"
class=
"edit-group btn no-expand"
>
class=
"edit-group btn no-expand"
>
<i
<i
con
class=
"fa fa-cogs"
name=
"settings"
>
aria-hidden=
"true"
/
>
</icon
>
</a>
</a>
<a
<a
v-tooltip
v-tooltip
...
...
app/assets/javascripts/star.js
View file @
e882455a
import
Flash
from
'
./flash
'
;
import
Flash
from
'
./flash
'
;
import
{
__
,
s__
}
from
'
./locale
'
;
import
{
__
,
s__
}
from
'
./locale
'
;
import
{
spriteIcon
}
from
'
./lib/utils/common_utils
'
;
export
default
class
Star
{
export
default
class
Star
{
constructor
()
{
constructor
()
{
...
@@ -7,16 +8,18 @@ export default class Star {
...
@@ -7,16 +8,18 @@ export default class Star {
.
on
(
'
ajax:success
'
,
function
handleSuccess
(
e
,
data
)
{
.
on
(
'
ajax:success
'
,
function
handleSuccess
(
e
,
data
)
{
const
$this
=
$
(
this
);
const
$this
=
$
(
this
);
const
$starSpan
=
$this
.
find
(
'
span
'
);
const
$starSpan
=
$this
.
find
(
'
span
'
);
const
$star
Icon
=
$this
.
find
(
'
i
'
);
const
$star
tIcon
=
$this
.
find
(
'
svg
'
);
function
toggleStar
(
isStarred
)
{
function
toggleStar
(
isStarred
)
{
$this
.
parent
().
find
(
'
.star-count
'
).
text
(
data
.
star_count
);
$this
.
parent
().
find
(
'
.star-count
'
).
text
(
data
.
star_count
);
if
(
isStarred
)
{
if
(
isStarred
)
{
$starSpan
.
removeClass
(
'
starred
'
).
text
(
s__
(
'
StarProject|Star
'
));
$starSpan
.
removeClass
(
'
starred
'
).
text
(
s__
(
'
StarProject|Star
'
));
$starIcon
.
removeClass
(
'
fa-star
'
).
addClass
(
'
fa-star-o
'
);
$startIcon
.
remove
();
$this
.
prepend
(
spriteIcon
(
'
star-o
'
));
}
else
{
}
else
{
$starSpan
.
addClass
(
'
starred
'
).
text
(
__
(
'
Unstar
'
));
$starSpan
.
addClass
(
'
starred
'
).
text
(
__
(
'
Unstar
'
));
$starIcon
.
removeClass
(
'
fa-star-o
'
).
addClass
(
'
fa-star
'
);
$startIcon
.
remove
();
$this
.
prepend
(
spriteIcon
(
'
star
'
));
}
}
}
}
...
...
app/views/projects/buttons/_star.html.haml
View file @
e882455a
-
if
current_user
-
if
current_user
=
link_to
toggle_star_project_path
(
@project
),
{
class:
'btn star-btn toggle-star'
,
method: :post
,
remote:
true
}
do
=
link_to
toggle_star_project_path
(
@project
),
{
class:
'btn star-btn toggle-star'
,
method: :post
,
remote:
true
}
do
-
if
current_user
.
starred?
(
@project
)
-
if
current_user
.
starred?
(
@project
)
=
icon
(
'star'
)
=
sprite_
icon
(
'star'
)
%span
.starred
=
_
(
'Unstar'
)
%span
.starred
=
_
(
'Unstar'
)
-
else
-
else
=
icon
(
'star-o'
)
=
sprite_
icon
(
'star-o'
)
%span
=
s_
(
'StarProject|Star'
)
%span
=
s_
(
'StarProject|Star'
)
.count-with-arrow
.count-with-arrow
%span
.arrow
%span
.arrow
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
-
else
-
else
=
link_to
new_user_session_path
,
class:
'btn has-tooltip star-btn'
,
title:
_
(
'You must sign in to star a project'
)
do
=
link_to
new_user_session_path
,
class:
'btn has-tooltip star-btn'
,
title:
_
(
'You must sign in to star a project'
)
do
=
icon
(
'star'
)
=
sprite_
icon
(
'star'
)
#{
s_
(
'StarProject|Star'
)
}
#{
s_
(
'StarProject|Star'
)
}
.count-with-arrow
.count-with-arrow
%span
.arrow
%span
.arrow
...
...
app/views/shared/groups/_group.html.haml
View file @
e882455a
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
.controls.hidden-xs
.controls.hidden-xs
-
if
can?
(
current_user
,
:admin_group
,
group
)
-
if
can?
(
current_user
,
:admin_group
,
group
)
=
link_to
edit_group_path
(
group
),
class:
"btn"
do
=
link_to
edit_group_path
(
group
),
class:
"btn"
do
=
icon
(
'co
gs'
)
=
sprite_icon
(
'settin
gs'
)
=
link_to
leave_group_group_members_path
(
group
),
data:
{
confirm:
leave_confirmation_message
(
group
)
},
method: :delete
,
class:
"btn"
,
title:
s_
(
"GroupsTree|Leave this group"
)
do
=
link_to
leave_group_group_members_path
(
group
),
data:
{
confirm:
leave_confirmation_message
(
group
)
},
method: :delete
,
class:
"btn"
,
title:
s_
(
"GroupsTree|Leave this group"
)
do
=
icon
(
'sign-out'
)
=
icon
(
'sign-out'
)
...
...
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