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
083990c7
Commit
083990c7
authored
Aug 12, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor UI improvements
parent
0175e665
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
12 deletions
+29
-12
app/assets/stylesheets/sections/snippets.scss
app/assets/stylesheets/sections/snippets.scss
+1
-0
app/views/projects/merge_requests/index.html.haml
app/views/projects/merge_requests/index.html.haml
+1
-0
app/views/projects/merge_requests/show/_mr_accept.html.haml
app/views/projects/merge_requests/show/_mr_accept.html.haml
+1
-1
app/views/projects/snippets/_form.html.haml
app/views/projects/snippets/_form.html.haml
+5
-2
app/views/projects/snippets/index.html.haml
app/views/projects/snippets/index.html.haml
+5
-3
app/views/snippets/_form.html.haml
app/views/snippets/_form.html.haml
+3
-2
app/views/snippets/current_user_index.html.haml
app/views/snippets/current_user_index.html.haml
+12
-3
features/steps/project/project_snippets.rb
features/steps/project/project_snippets.rb
+1
-1
No files found.
app/assets/stylesheets/sections/snippets.scss
View file @
083990c7
.snippet.file-holder
{
.file-title
{
.snippet-file-name
{
padding
:
4px
10px
;
position
:
relative
;
top
:
-4px
;
left
:
-4px
;
...
...
app/views/projects/merge_requests/index.html.haml
View file @
083990c7
...
...
@@ -4,6 +4,7 @@
New Merge Request
%h3
.page-title
Merge Requests
%span
(
#{
@merge_requests
.
total_count
}
)
.row
...
...
app/views/projects/merge_requests/show/_mr_accept.html.haml
View file @
083990c7
...
...
@@ -32,7 +32,7 @@
.automerge_widget.cannot_be_merged
{
style:
"display:none"
}
.alert.alert-disabled
%span
=
link_to
"Show how to merge"
,
"#modal_merge_info"
,
class:
"how_to_merge_link btn
btn-small
padded"
,
title:
"How To Merge"
,
"data-toggle"
=>
"modal"
=
link_to
"Show how to merge"
,
"#modal_merge_info"
,
class:
"how_to_merge_link btn padded"
,
title:
"How To Merge"
,
"data-toggle"
=>
"modal"
%strong
This request can't be merged with GitLab. You should do it manually
...
...
app/views/projects/snippets/_form.html.haml
View file @
083990c7
...
...
@@ -27,8 +27,11 @@
=
f
.
hidden_field
:content
,
class:
'snippet-file-content'
.form-actions
-
if
@snippet
.
new_record?
=
f
.
submit
'Create snippet'
,
class:
"btn-create btn"
-
else
=
f
.
submit
'Save'
,
class:
"btn-save btn"
=
link_to
"Cancel"
,
project_snippets_path
(
@project
),
class:
" btn"
=
link_to
"Cancel"
,
project_snippets_path
(
@project
),
class:
" btn
btn-cancel
"
-
unless
@snippet
.
new_record?
.pull-right
=
link_to
'Destroy'
,
project_snippet_path
(
@project
,
@snippet
),
confirm:
'Are you sure?'
,
method: :delete
,
class:
"btn pull-right danger delete-snippet"
,
id:
"destroy_snippet_
#{
@snippet
.
id
}
"
...
...
app/views/projects/snippets/index.html.haml
View file @
083990c7
%h3
.page-title
Snippets
%small
share code pastes with others out of git repository
-
if
can?
current_user
,
:write_project_snippet
,
@project
=
link_to
new_project_snippet_path
(
@project
),
class:
"btn btn-
small add_
new pull-right"
,
title:
"New Snippet"
do
=
link_to
new_project_snippet_path
(
@project
),
class:
"btn btn-new pull-right"
,
title:
"New Snippet"
do
Add new snippet
%p
.light
Share code pastes with others out of git repository
%hr
%ul
.bordered-list
=
render
partial:
"projects/snippets/snippet"
,
collection:
@snippets
...
...
app/views/snippets/_form.html.haml
View file @
083990c7
...
...
@@ -14,7 +14,8 @@
.controls
=
f
.
text_field
:title
,
placeholder:
"Example Snippet"
,
class:
'input-xlarge'
,
required:
true
.control-group
=
f
.
label
"Private?"
.controls
=
f
.
check_box
:private
,
{
class:
''
}
.controls
=
f
.
check_box
:private
,
{
class:
''
}
.control-group
.file-editor
=
f
.
label
:file_name
,
"File"
...
...
@@ -32,7 +33,7 @@
-
else
=
f
.
submit
'Save'
,
class:
"btn-save btn"
=
link_to
"Cancel"
,
snippets_path
(
@project
),
class:
"
btn
"
=
link_to
"Cancel"
,
snippets_path
(
@project
),
class:
"
btn btn-cancel
"
-
unless
@snippet
.
new_record?
.pull-right
=
link_to
'Destroy'
,
snippet_path
(
@snippet
),
confirm:
'Removed snippet cannot be restored! Are you sure?'
,
method: :delete
,
class:
"btn pull-right danger delete-snippet"
,
id:
"destroy_snippet_
#{
@snippet
.
id
}
"
...
...
app/views/snippets/current_user_index.html.haml
View file @
083990c7
...
...
@@ -14,11 +14,20 @@
.span3
%ul
.nav.nav-pills.nav-stacked
=
nav_tab
:scope
,
nil
do
=
link_to
"All"
,
user_snippets_path
(
@user
)
=
link_to
user_snippets_path
(
@user
)
do
All
%span
.pull-right
=
@user
.
snippets
.
count
=
nav_tab
:scope
,
'private'
do
=
link_to
"Private"
,
user_snippets_path
(
@user
,
scope:
'private'
)
=
link_to
user_snippets_path
(
@user
,
scope:
'private'
)
do
Private
%span
.pull-right
=
@user
.
snippets
.
private
.
count
=
nav_tab
:scope
,
'public'
do
=
link_to
"Public"
,
user_snippets_path
(
@user
,
scope:
'public'
)
=
link_to
user_snippets_path
(
@user
,
scope:
'public'
)
do
Public
%span
.pull-right
=
@user
.
snippets
.
public
.
count
.span9.my-snippets
=
render
'snippets'
...
...
features/steps/project/project_snippets.rb
View file @
083990c7
...
...
@@ -58,7 +58,7 @@ class ProjectSnippets < Spinach::FeatureSteps
within
(
'.file-editor'
)
do
find
(
:xpath
,
"//input[@id='project_snippet_content']"
).
set
'Content of snippet three'
end
click_button
"
Save
"
click_button
"
Create snippet
"
end
Then
'I should see snippet "Snippet three"'
do
...
...
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