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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2c1cbde7
Commit
2c1cbde7
authored
Jul 07, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use respond_to
parent
6361e8e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/views/ci/variables/_content.html.haml
app/views/ci/variables/_content.html.haml
+1
-1
app/views/ci/variables/_form.html.haml
app/views/ci/variables/_form.html.haml
+1
-1
app/views/ci/variables/_table.html.haml
app/views/ci/variables/_table.html.haml
+2
-2
No files found.
app/views/ci/variables/_content.html.haml
View file @
2c1cbde7
%h4
.prepend-top-0
Secret variables
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'ci/variables/README'
,
anchor:
'secret-variables'
),
target:
'_blank'
-
if
@variable
.
is_a?
(
Ci
::
VariablePresenter
)
&&
@project
.
feature_available?
(
:variable_environment_scope
)
-
if
@variable
.
respond_to?
(
:environment_scope
)
&&
@project
.
feature_available?
(
:variable_environment_scope
)
%p
These variables will be set to environment by the runner, and could be protected by exposing only to protected branches or tags, or some particular environments.
-
else
...
...
app/views/ci/variables/_form.html.haml
View file @
2c1cbde7
...
...
@@ -7,7 +7,7 @@
.form-group
=
f
.
label
:value
,
"Value"
,
class:
"label-light"
=
f
.
text_area
:value
,
class:
"form-control"
,
placeholder:
@variable
.
placeholder
-
if
@variable
.
is_a?
(
Ci
::
VariablePresenter
)
-
if
@variable
.
respond_to?
(
:environment_scope
)
=
render
'projects/variables/ee/environment_scope'
,
f:
f
.form-group
.checkbox
...
...
app/views/ci/variables/_table.html.haml
View file @
2c1cbde7
...
...
@@ -9,7 +9,7 @@
%th
Key
%th
Value
%th
Protected
-
if
@variable
.
is_a?
(
Ci
::
VariablePresenter
)
&&
@project
.
feature_available?
(
:variable_environment_scope
)
-
if
@variable
.
respond_to?
(
:environment_scope
)
&&
@project
.
feature_available?
(
:variable_environment_scope
)
%th
Environment scope
%th
%tbody
...
...
@@ -19,7 +19,7 @@
%td
.variable-key
=
variable
.
key
%td
.variable-value
{
"data-value"
=>
variable
.
value
}
******
%td
.variable-protected
=
Gitlab
::
Utils
.
boolean_to_yes_no
(
variable
.
protected
)
-
if
@variable
.
is_a?
(
Ci
::
VariablePresenter
)
&&
@project
.
feature_available?
(
:variable_environment_scope
)
-
if
@variable
.
respond_to?
(
:environment_scope
)
&&
@project
.
feature_available?
(
:variable_environment_scope
)
%td
.variable-environment-scope
=
variable
.
environment_scope
%td
.variable-menu
=
link_to
variable
.
edit_path
,
class:
"btn btn-transparent btn-variable-edit"
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