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
Tatuya Kamada
gitlab-ce
Commits
b1fbd658
Commit
b1fbd658
authored
Jul 18, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve UI for project snippets
parent
bbb06e50
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
+7
-12
app/views/projects/snippets/_snippet.html.haml
app/views/projects/snippets/_snippet.html.haml
+6
-10
app/views/projects/snippets/show.html.haml
app/views/projects/snippets/show.html.haml
+0
-1
db/fixtures/development/12_snippets.rb
db/fixtures/development/12_snippets.rb
+1
-1
No files found.
app/views/projects/snippets/_snippet.html.haml
View file @
b1fbd658
%li
.snippet-title
-
if
snippet
.
private?
%i
.icon-lock.cgreen
-
else
%i
.icon-globe.cblue
%h4
.snippet-title
=
link_to
reliable_snippet_path
(
snippet
)
do
%h5
.inline
=
truncate
(
snippet
.
title
,
length:
60
)
%span
.cgray
=
truncate
(
snippet
.
title
,
length:
60
)
%span
.cgray.monospace.tiny.pull-right
=
snippet
.
file_name
%small
.pull-right.cgray
...
...
@@ -17,9 +12,10 @@
-
else
Never
.snippet-info
.prepend-left-20
.snippet-info
=
"#
#{
snippet
.
id
}
"
%span
.light
%span
by
=
image_tag
gravatar_icon
(
snippet
.
author_email
),
class:
"avatar avatar-inline s16"
=
snippet
.
author_name
%span
.light
#{
time_ago_in_words
(
snippet
.
created_at
)
}
ago
app/views/projects/snippets/show.html.haml
View file @
b1fbd658
%h3
.page-title
%i
.icon-lock.cgreen
=
@snippet
.
title
%small
.pull-right
...
...
db/fixtures/development/12_snippets.rb
View file @
b1fbd658
...
...
@@ -13,7 +13,7 @@ Gitlab::Seeder.quiet do
PersonalSnippet
.
seed
(
:id
,
[{
id:
i
,
author_id:
user
.
id
,
title:
Faker
::
Lorem
.
sentence
(
6
),
title:
Faker
::
Lorem
.
sentence
(
3
),
file_name:
Faker
::
Internet
.
domain_word
+
'.sh'
,
private:
[
true
,
false
].
sample
,
content:
contents
.
sample
,
...
...
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