Commit a26f3e59 authored by Simon Knox's avatar Simon Knox

don't render button or scope section if scoped boards feature disabled

parent 303d4aef
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
v-model="board.name" v-model="board.name"
> >
</div> </div>
<div v-if="scopedIssueBoardFeatureEnabled">
<div <div
v-if="canAdminBoard" v-if="canAdminBoard"
class="media append-bottom-10" class="media append-bottom-10"
...@@ -51,7 +52,6 @@ ...@@ -51,7 +52,6 @@
Board scope affects which issues are displayed for anyone who visits this board Board scope affects which issues are displayed for anyone who visits this board
</p> </p>
<!-- TODO: if current_board_parent.issue_board_milestone_available?(current_user) -->
<form-block <form-block
> >
<div <div
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
/> />
</form-block> </form-block>
</div> </div>
</div>
</form> </form>
<div <div
slot="footer" slot="footer"
...@@ -142,6 +143,11 @@ export default Vue.extend({ ...@@ -142,6 +143,11 @@ export default Vue.extend({
type: Boolean, type: Boolean,
required: true, required: true,
}, },
scopedIssueBoardFeatureEnabled: {
type: Boolean,
required: false,
default: false,
},
}, },
data() { data() {
return { return {
......
<template> <template>
<div class="block labels"> <div class="block labels">
<div class="title append-bottom-10"> <div class="title append-bottom-10">
Labels <i aria-hidden="true" class="fa fa-spinner fa-spin block-loading" data-hidden="true" style="display: none;"></i> <a class="edit-link pull-right" href="#">Edit</a> Labels
<i aria-hidden="true" class="fa fa-spinner fa-spin block-loading" data-hidden="true" style="display: none;"></i>
<a
v-if="canEdit"
class="edit-link pull-right"
href="#"
>
Edit
</a>
</div> </div>
<div class="value issuable-show-labels"> <div class="value issuable-show-labels">
<span v-if="board.labels.length === 0" class="no-value"> <span v-if="board.labels.length === 0" class="no-value">
......
...@@ -38,4 +38,5 @@ ...@@ -38,4 +38,5 @@
%board-form{ ":milestone-path" => "milestonePath", %board-form{ ":milestone-path" => "milestonePath",
"labels-path" => labels_filter_path, "labels-path" => labels_filter_path,
":can-admin-board" => can?(current_user, :admin_board, parent), ":can-admin-board" => can?(current_user, :admin_board, parent),
":scoped-issue-board-feature-enabled" => parent.feature_available?(:scoped_issue_board),
"v-if" => "currentPage" } "v-if" => "currentPage" }
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
= icon('times') = icon('times')
.filter-dropdown-container .filter-dropdown-container
- if type == :boards - if type == :boards
- if parent.feature_available?(:scoped_issue_board)
.js-board-config{ data: { can_admin_list: can?(current_user, :admin_list, board.parent).to_s } } .js-board-config{ data: { can_admin_list: can?(current_user, :admin_list, board.parent).to_s } }
- if can?(current_user, :admin_list, board.parent) - if can?(current_user, :admin_list, board.parent)
.dropdown.prepend-left-10#js-add-list .dropdown.prepend-left-10#js-add-list
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment