BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
2eb1220f
Commit
2eb1220f
authored
Jan 11, 2014
by
Jeroen van Baarsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed expiration from snippets
* Removed the expiration from the project snippets * Fixed the layout for the project snippets
parent
753a2f17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
_form.html.haml
app/views/projects/snippets/_form.html.haml
+7
-9
project_snippets.rb
features/steps/project/project_snippets.rb
+0
-1
No files found.
app/views/projects/snippets/_form.html.haml
View file @
2eb1220f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
=
@snippet
.
new_record?
?
"New Snippet"
:
"Edit Snippet #
#{
@snippet
.
id
}
"
=
@snippet
.
new_record?
?
"New Snippet"
:
"Edit Snippet #
#{
@snippet
.
id
}
"
%hr
%hr
.snippet-form-holder
.snippet-form-holder
=
form_for
[
@project
,
@snippet
],
as: :project_snippet
,
url:
url
do
|
f
|
=
form_for
[
@project
,
@snippet
],
as: :project_snippet
,
url:
url
,
html:
{
class:
"form-horizontal snippet-form"
}
do
|
f
|
-
if
@snippet
.
errors
.
any?
-
if
@snippet
.
errors
.
any?
.alert.alert-danger
.alert.alert-danger
%ul
%ul
...
@@ -10,14 +10,11 @@
...
@@ -10,14 +10,11 @@
%li
=
msg
%li
=
msg
.form-group
.form-group
=
f
.
label
:title
=
f
.
label
:title
,
class:
'control-label'
.col-sm-10
=
f
.
text_field
:title
,
placeholder:
"Example Snippet"
,
class:
'form-control'
,
required:
true
.col-sm-10
=
f
.
text_field
:title
,
placeholder:
"Example Snippet"
,
class:
'form-control'
,
required:
true
.form-group
.form-group
=
f
.
label
"Lifetime"
.col-sm-10
=
f
.
select
:expires_at
,
lifetime_select_options
,
{},
{
class:
'select2 span2'
}
.form-group
.file-editor
.file-editor
=
f
.
label
:file_name
,
"File"
=
f
.
label
:file_name
,
"File"
,
class:
'control-label'
.col-sm-10
.col-sm-10
.file-holder.snippet
.file-holder.snippet
.file-title
.file-title
...
@@ -31,10 +28,11 @@
...
@@ -31,10 +28,11 @@
=
f
.
submit
'Create snippet'
,
class:
"btn-create btn"
=
f
.
submit
'Create snippet'
,
class:
"btn-create btn"
-
else
-
else
=
f
.
submit
'Save'
,
class:
"btn-save btn"
=
f
.
submit
'Save'
,
class:
"btn-save btn"
=
link_to
"Cancel"
,
project_snippets_path
(
@project
),
class:
"btn btn-cancel"
-
unless
@snippet
.
new_record?
-
unless
@snippet
.
new_record?
=
link_to
'Remove snippet'
,
project_snippet_path
(
@project
,
@snippet
),
data:
{
confirm:
'Are you sure?'
},
method: :delete
,
class:
"btn pull-right btn-remove delete-snippet prepend-left-10"
,
id:
"destroy_snippet_
#{
@snippet
.
id
}
"
.pull-right.prepend-left-20
=
link_to
'Remove snippet'
,
project_snippet_path
(
@project
,
@snippet
),
data:
{
confirm:
'Are you sure?'
},
method: :delete
,
class:
"btn pull-right btn-remove delete-snippet prepend-left-10"
,
id:
"destroy_snippet_
#{
@snippet
.
id
}
"
=
link_to
"Cancel"
,
project_snippets_path
(
@project
),
class:
"btn btn-cancel"
:javascript
:javascript
var
editor
=
ace
.
edit
(
"editor"
);
var
editor
=
ace
.
edit
(
"editor"
);
...
...
features/steps/project/project_snippets.rb
View file @
2eb1220f
...
@@ -53,7 +53,6 @@ class ProjectSnippets < Spinach::FeatureSteps
...
@@ -53,7 +53,6 @@ class ProjectSnippets < Spinach::FeatureSteps
And
'I submit new snippet "Snippet three"'
do
And
'I submit new snippet "Snippet three"'
do
fill_in
"project_snippet_title"
,
:with
=>
"Snippet three"
fill_in
"project_snippet_title"
,
:with
=>
"Snippet three"
select
"forever"
,
:from
=>
"project_snippet_expires_at"
fill_in
"project_snippet_file_name"
,
:with
=>
"my_snippet.rb"
fill_in
"project_snippet_file_name"
,
:with
=>
"my_snippet.rb"
within
(
'.file-editor'
)
do
within
(
'.file-editor'
)
do
find
(
:xpath
,
"//input[@id='project_snippet_content']"
).
set
'Content of snippet three'
find
(
:xpath
,
"//input[@id='project_snippet_content']"
).
set
'Content of snippet three'
...
...
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