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
9c1e5649
Commit
9c1e5649
authored
Oct 21, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds CSS for children rows to be indented
parent
d873a3bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
app/assets/javascripts/environments/components/environment_item.js.es6
...vascripts/environments/components/environment_item.js.es6
+11
-1
app/assets/stylesheets/pages/environments.scss
app/assets/stylesheets/pages/environments.scss
+1
-1
app/views/projects/environments/components/_environment.html.haml
...s/projects/environments/components/_environment.html.haml
+8
-4
No files found.
app/assets/javascripts/environments/components/environment_item.js.es6
View file @
9c1e5649
...
...
@@ -16,7 +16,7 @@
window.gl = window.gl || {};
window.gl.environmentsList = window.gl.environmentsList || {};
gl.environmentsList.EnvironmentItem = Vue.component(
"environment-item"
, {
gl.environmentsList.EnvironmentItem = Vue.component(
'environment-item'
, {
template: '#environment-item-template',
...
...
@@ -41,6 +41,16 @@
*/
isFolder () {
return this.model.children && this.model.children.length
},
/**
* If an item is inside a folder structure will return true.
* Used for css purposes.
*
* @returns {Boolean|undefined}
*/
isChildren () {
return this.model['vue-isChildren'];
}
},
...
...
app/assets/stylesheets/pages/environments.scss
View file @
9c1e5649
...
...
@@ -64,7 +64,7 @@
}
}
.children-name
{
.children-
row
.environment-
name
{
margin-left
:
17px
;
margin-right
:
-17px
;
}
...
...
app/views/projects/environments/components/_environment.html.haml
View file @
9c1e5649
%script
#environment-item-template
{
"type"
=>
"text/x-template"
}
%tr
%td
.folder-name
%a
{
"v-if"
=>
"!isFolder"
,
%td
{
"v-bind:class"
=>
"{ 'children-row': isChildren}"
}
%a
.environment-name
{
"v-if"
=>
"!isFolder"
,
":href"
=>
"'#{namespace_project_environments_path(@project.namespace, @project)}/' + model.id"
}
{{model.name}}
%span
{
"v-if"
=>
"isFolder"
,
%span
.folder-name
{
"v-if"
=>
"isFolder"
,
"@click"
=>
"toggle"
}
%i
.folder-icon
{
"v-show"
=>
"open"
}
...
...
@@ -49,4 +50,7 @@
.pull-right
{
"v-if"
=>
"!isFolder"
}
actions will go here
%tr
{
"v-if"
=>
"open && isFolder"
,
"is"
=>
"environment-item"
,
"v-for"
=>
"model in model.children"
,
":model"
=>
"model"
}
%tr
{
"v-if"
=>
"open && isFolder"
,
"is"
=>
"environment-item"
,
"v-for"
=>
"model in model.children"
,
":model"
=>
"model"
}
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