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
58bf62bc
Commit
58bf62bc
authored
Sep 18, 2018
by
Winnie Hellmann
Committed by
Kamil Trzciński
Oct 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restyle empty state for feature flags
parent
55e4c7ca
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
29 deletions
+40
-29
app/views/projects/feature_flags/_empty_state.html.haml
app/views/projects/feature_flags/_empty_state.html.haml
+11
-0
app/views/projects/feature_flags/_new_feature_flag_button.html.haml
...projects/feature_flags/_new_feature_flag_button.html.haml
+3
-0
app/views/projects/feature_flags/_table.html.haml
app/views/projects/feature_flags/_table.html.haml
+20
-25
app/views/projects/feature_flags/index.html.haml
app/views/projects/feature_flags/index.html.haml
+6
-4
No files found.
app/views/projects/feature_flags/_empty_state.html.haml
0 → 100644
View file @
58bf62bc
.border-top
.row.empty-state
.col-12
.text-content
%h4
.text-center
=
s_
(
'FeatureFlags|Get started with feature flags'
)
%p
.text-center
=
s_
(
'FeatureFlags|Feature flags allow you to configure your code into different flavors by dynamically toggling certain functionality.'
)
=
link_to
'More information'
,
'#'
.text-center
=
render
'new_feature_flag_button'
app/views/projects/feature_flags/_new_feature_flag_button.html.haml
0 → 100644
View file @
58bf62bc
-
if
can?
(
current_user
,
:create_feature_flags
,
@project
)
=
link_to
new_project_feature_flag_path
(
@project
),
class:
'btn btn-new'
do
=
s_
(
'FeatureFlags|New Feature Flag'
)
app/views/projects/feature_flags/_table.html.haml
View file @
58bf62bc
.table-holder.border-top
.gl-responsive-table-row.table-row-header
{
role:
'row'
}
.table-section.section-10
{
role:
'columnheader'
}=
s_
(
'FeatureFlags|Status'
)
.table-section.section-50
{
role:
'columnheader'
}=
s_
(
'FeatureFlags|Feature flag'
)
-
if
@feature_flags
.
empty?
.nothing-here-block
=
s_
(
'FeatureFlags|No feature flags found.'
)
-
else
-
@feature_flags
.
each
do
|
feature_flag
|
=
render
'delete_feature_flag_modal'
,
{
feature_flag:
feature_flag
}
-
@feature_flags
.
each
do
|
feature_flag
|
=
render
'delete_feature_flag_modal'
,
{
feature_flag:
feature_flag
}
.gl-responsive-table-row
{
role:
'row'
}
.table-section.section-10
{
role:
'gridcell'
}
=
check_box_tag
'feature_flag_status'
,
nil
,
feature_flag
.
active?
,
disabled:
true
.gl-responsive-table-row
{
role:
'row'
}
.table-section.section-10
{
role:
'gridcell'
}
=
check_box_tag
'feature_flag_status'
,
nil
,
feature_flag
.
active?
,
disabled:
true
.table-section.section-50.d-flex.flex-column
{
role:
'gridcell'
}
.text-monospace
=
feature_flag
.
name
.text-secondary
=
feature_flag
.
description
.table-section.section-50.d-flex.flex-column
{
role:
'gridcell'
}
.text-monospace
=
feature_flag
.
name
.text-secondary
=
feature_flag
.
description
.table-section.section-40.table-button-footer
{
role:
'gridcell'
}
.table-action-buttons
=
link_to
edit_project_feature_flag_path
(
@project
,
feature_flag
),
class:
'btn btn-default has-tooltip'
,
type:
'button'
,
title:
_
(
'Edit'
)
do
=
sprite_icon
(
'pencil'
,
size:
16
)
.table-section.section-40.table-button-footer
{
role:
'gridcell'
}
.table-action-buttons
=
link_to
edit_project_feature_flag_path
(
@project
,
feature_flag
),
class:
'btn btn-default has-tooltip'
,
type:
'button'
,
title:
_
(
'Edit'
)
do
=
sprite_icon
(
'pencil'
,
size:
16
)
%button
.btn.btn-danger.has-tooltip.ml-2
{
type:
'button'
,
data:
{
toggle:
'modal'
,
target:
"#delete-feature-flag-modal-#{feature_flag.id}"
},
title:
_
(
'Delete'
)
}
=
sprite_icon
(
'remove'
,
size:
16
)
%button
.btn.btn-danger.has-tooltip.ml-2
{
type:
'button'
,
data:
{
toggle:
'modal'
,
target:
"#delete-feature-flag-modal-#{feature_flag.id}"
},
title:
_
(
'Delete'
)
}
=
sprite_icon
(
'remove'
,
size:
16
)
app/views/projects/feature_flags/index.html.haml
View file @
58bf62bc
...
...
@@ -7,9 +7,11 @@
%button
.btn.btn-default
{
type:
'button'
,
data:
{
toggle:
'modal'
,
target:
'#configure-feature-flags-modal'
}
}
=
s_
(
'FeatureFlags|Configure'
)
-
if
can?
(
current_user
,
:create_feature_flags
,
@project
)
=
link_to
new_project_feature_flag_path
(
@project
),
class:
'btn btn-new'
do
=
s_
(
'FeatureFlags|New Feature Flag'
)
=
render
'new_feature_flag_button'
=
render
'configure_feature_flags_modal'
=
render
'table'
-
if
@feature_flags
.
empty?
=
render
'empty_state'
-
else
=
render
'table'
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