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
Boxiang Sun
gitlab-ce
Commits
0608ecbc
Commit
0608ecbc
authored
Dec 09, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conditionally display assoc project info in snippets index
parent
7f3fc26e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
+13
-4
app/views/dashboard/snippets/index.html.haml
app/views/dashboard/snippets/index.html.haml
+1
-1
app/views/explore/snippets/index.html.haml
app/views/explore/snippets/index.html.haml
+1
-1
app/views/shared/snippets/_snippet.html.haml
app/views/shared/snippets/_snippet.html.haml
+9
-1
app/views/snippets/_snippets.html.haml
app/views/snippets/_snippets.html.haml
+2
-1
No files found.
app/views/dashboard/snippets/index.html.haml
View file @
0608ecbc
...
...
@@ -33,4 +33,4 @@
=
link_to
new_snippet_path
,
class:
"btn btn-new btn-block"
,
title:
"New snippet"
do
New snippet
=
render
'snippets/snippets'
=
render
partial:
'snippets/snippets'
,
locals:
{
link_project:
true
}
app/views/explore/snippets/index.html.haml
View file @
0608ecbc
...
...
@@ -6,4 +6,4 @@
-
else
=
render
'explore/head'
=
render
'snippets/snippets'
=
render
partial:
'snippets/snippets'
,
locals:
{
link_project:
true
}
app/views/shared/snippets/_snippet.html.haml
View file @
0608ecbc
-
link_project
=
local_assigns
.
fetch
(
:link_project
,
false
)
%li
.snippet-row
=
image_tag
avatar_icon
(
snippet
.
author_email
),
class:
"avatar s40 hidden-xs"
,
alt:
''
...
...
@@ -21,9 +23,15 @@
.snippet-info
#{
snippet
.
to_reference
}
·
authored
#{
time_ago_with_tooltip
(
snippet
.
created_at
,
placement:
'bottom'
,
html_class:
'snippet-created-ago'
)
}
by
authored
#{
time_ago_with_tooltip
(
snippet
.
created_at
,
placement:
'bottom'
,
html_class:
'snippet-created-ago'
)
}
by
=
link_to
user_snippets_path
(
snippet
.
author
)
do
=
snippet
.
author_name
-
if
link_project
&&
snippet
.
project_id?
%span
.hidden-xs
in
=
link_to
namespace_project_path
(
snippet
.
project
.
namespace
,
snippet
.
project
)
do
=
snippet
.
project
.
name_with_namespace
.pull-right.snippet-updated-at
%span
updated
#{
time_ago_with_tooltip
(
snippet
.
updated_at
,
placement:
'bottom'
)
}
app/views/snippets/_snippets.html.haml
View file @
0608ecbc
-
remote
=
local_assigns
.
fetch
(
:remote
,
false
)
-
link_project
=
local_assigns
.
fetch
(
:link_project
,
false
)
.snippets-list-holder
%ul
.content-list
=
render
partial:
'shared/snippets/snippet'
,
collection:
@snippets
=
render
partial:
'shared/snippets/snippet'
,
collection:
@snippets
,
locals:
{
link_project:
link_project
}
-
if
@snippets
.
empty?
%li
.nothing-here-block
Nothing here.
...
...
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