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
Jérome Perrin
gitlab-ce
Commits
af7bed2a
Commit
af7bed2a
authored
Nov 07, 2011
by
Aleksei Kvitinskii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tag links to project page
parent
060a2e22
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
6 deletions
+30
-6
app/assets/stylesheets/tags.css.css
app/assets/stylesheets/tags.css.css
+14
-0
app/helpers/tags_helper.rb
app/helpers/tags_helper.rb
+10
-0
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+3
-0
app/views/projects/_list.html.haml
app/views/projects/_list.html.haml
+2
-3
app/views/projects/_tile.html.haml
app/views/projects/_tile.html.haml
+1
-3
No files found.
app/assets/stylesheets/tags.css.css
View file @
af7bed2a
...
@@ -28,3 +28,17 @@
...
@@ -28,3 +28,17 @@
text-shadow
:
none
;
text-shadow
:
none
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.medium-tags
a
{
font-size
:
12px
;
display
:
inline-block
;
padding
:
3px
4px
2px
4px
;
margin
:
0px
7px
8px
0px
;
border-radius
:
3px
;
background-color
:
#72bbdf
;
color
:
#FFF
;
text-shadow
:
none
;
font-weight
:
bold
;
}
\ No newline at end of file
app/helpers/tags_helper.rb
View file @
af7bed2a
...
@@ -2,4 +2,14 @@ module TagsHelper
...
@@ -2,4 +2,14 @@ module TagsHelper
def
tag_path
tag
def
tag_path
tag
"/tags/
#{
tag
}
"
"/tags/
#{
tag
}
"
end
end
def
tag_list
project
html
=
''
project
.
tag_list
.
each
do
|
tag
|
html
+=
link_to
tag
,
tag_path
(
tag
)
end
html
.
html_safe
end
end
end
app/views/layouts/project.html.haml
View file @
af7bed2a
...
@@ -40,5 +40,8 @@
...
@@ -40,5 +40,8 @@
-
if
@commit
-
if
@commit
=
link_to
truncate
(
commit_name
(
@project
,
@commit
),
:length
=>
15
),
project_commit_path
(
@project
,
:id
=>
@commit
.
id
),
:class
=>
current_page?
(
:controller
=>
"commits"
,
:action
=>
"show"
,
:project_id
=>
@project
,
:id
=>
@commit
.
id
)
?
"current"
:
nil
=
link_to
truncate
(
commit_name
(
@project
,
@commit
),
:length
=>
15
),
project_commit_path
(
@project
,
:id
=>
@commit
.
id
),
:class
=>
current_page?
(
:controller
=>
"commits"
,
:action
=>
"show"
,
:project_id
=>
@project
,
:id
=>
@commit
.
id
)
?
"current"
:
nil
.medium-tags
{
:style
=>
'padding: 10px 0 0 10px; width: 210px;'
}=
tag_list
@project
.project-content
.project-content
=
yield
=
yield
app/views/projects/_list.html.haml
View file @
af7bed2a
...
@@ -12,9 +12,8 @@
...
@@ -12,9 +12,8 @@
%tr
{
:class
=>
"project"
,
:url
=>
project_path
(
project
)
}
%tr
{
:class
=>
"project"
,
:url
=>
project_path
(
project
)
}
%td
%td
=
project
.
name
=
project
.
name
.small-tags
.small-tags
=
tag_list
project
-
project
.
tag_list
.
each
do
|
tag
|
=
link_to
tag
,
tag_path
(
tag
)
%td
=
truncate
project
.
url_to_repo
%td
=
truncate
project
.
url_to_repo
%td
=
project
.
code
%td
=
project
.
code
...
...
app/views/projects/_tile.html.haml
View file @
af7bed2a
...
@@ -13,9 +13,7 @@
...
@@ -13,9 +13,7 @@
-
last_note
=
project
.
notes
.
last
-
last_note
=
project
.
notes
.
last
=
last_note
?
last_note
.
created_at
.
stamp
(
"24 Aug, 2011"
)
:
"Never"
=
last_note
?
last_note
.
created_at
.
stamp
(
"24 Aug, 2011"
)
:
"Never"
%p
.small-tags
%p
.small-tags
=
tag_list
project
-
project
.
tag_list
.
each
do
|
tag
|
=
link_to
tag
,
"/tags/
#{
tag
}
"
.buttons
.buttons
%a
.browse-code.button.yellow
{
:href
=>
tree_project_path
(
project
)}
Browse code
%a
.browse-code.button.yellow
{
:href
=>
tree_project_path
(
project
)}
Browse code
...
...
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