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,80 +30,81 @@
v-model="board.name"
>
</div>
<div
v-if="canAdminBoard"
class="media append-bottom-10"
>
<label class="form-section-title label-light media-body">
Board scope
</label>
<button
type="button"
class="btn"
@click="expanded = !expanded"
v-if="collapseScope"
<div v-if="scopedIssueBoardFeatureEnabled">
<div
v-if="canAdminBoard"
class="media append-bottom-10"
>
{{ expandButtonText }}
</button>
</div>
<div v-if="!collapseScope || expanded">
<p class="light append-bottom-10">
Board scope affects which issues are displayed for anyone who visits this board
</p>
<label class="form-section-title label-light media-body">
Board scope
</label>
<button
type="button"
class="btn"
@click="expanded = !expanded"
v-if="collapseScope"
>
{{ expandButtonText }}
</button>
</div>
<div v-if="!collapseScope || expanded">
<p class="light append-bottom-10">
Board scope affects which issues are displayed for anyone who visits this board
</p>
<!-- TODO: if current_board_parent.issue_board_milestone_available?(current_user) -->
<form-block
>
<div
v-if="board.milestone"
slot="currentValue"
<form-block
>
{{ board.milestone.title }}
</div>
<board-milestone-select
:board="board"
:milestone-path="milestonePath"
v-model="board.milestone_id"
title="Milestone"
defaultText="Any milestone"
:canEdit="canAdminBoard"
/>
</form-block>
<div
v-if="board.milestone"
slot="currentValue"
>
{{ board.milestone.title }}
</div>
<board-milestone-select
:board="board"
:milestone-path="milestonePath"
v-model="board.milestone_id"
title="Milestone"
defaultText="Any milestone"
:canEdit="canAdminBoard"
/>
</form-block>
<form-block>
<board-labels-select
:board="board"
title="Labels"
defaultText="Any label"
:canEdit="canAdminBoard"
:labelsPath="labelsPath"
/>
</form-block>
<form-block>
<board-labels-select
:board="board"
title="Labels"
defaultText="Any label"
:canEdit="canAdminBoard"
:labelsPath="labelsPath"
/>
</form-block>
<form-block>
<div>Author</div>
<input v-model="board.author_id" />
</form-block>
<form-block>
<div>Author</div>
<input v-model="board.author_id" />
</form-block>
<form-block>
<div>Assignee</div>
<input v-model="board.assignee_id" />
</form-block>
<form-block>
<div>Assignee</div>
<input v-model="board.assignee_id" />
</form-block>
<form-block
title="Weight"
defaultText="Any weight"
:fieldName="'board_filter[weight]'"
:canEdit="canAdminBoard"
>
<board-weight-select
:board="board"
v-model="board.weight"
<form-block
title="Weight"
defaultText="Any weight"
:fieldName="'board_filter[weight]'"
:canEdit="canAdminBoard"
/>
</form-block>
>
<board-weight-select
:board="board"
v-model="board.weight"
title="Weight"
defaultText="Any weight"
:canEdit="canAdminBoard"
/>
</form-block>
</div>
</div>
</form>
<div
......@@ -142,6 +143,11 @@ export default Vue.extend({
type: Boolean,
required: true,
},
scopedIssueBoardFeatureEnabled: {
type: Boolean,
required: false,
default: false,
},
},
data() {
return {
......
<template>
<div class="block labels">
<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 class="value issuable-show-labels">
<span v-if="board.labels.length === 0" class="no-value">
......
......@@ -38,4 +38,5 @@
%board-form{ ":milestone-path" => "milestonePath",
"labels-path" => labels_filter_path,
":can-admin-board" => can?(current_user, :admin_board, parent),
":scoped-issue-board-feature-enabled" => parent.feature_available?(:scoped_issue_board),
"v-if" => "currentPage" }
......@@ -124,7 +124,8 @@
= icon('times')
.filter-dropdown-container
- if type == :boards
.js-board-config{ data: { can_admin_list: can?(current_user, :admin_list, board.parent).to_s } }
- if parent.feature_available?(:scoped_issue_board)
.js-board-config{ data: { can_admin_list: can?(current_user, :admin_list, board.parent).to_s } }
- if can?(current_user, :admin_list, board.parent)
.dropdown.prepend-left-10#js-add-list
%button.btn.btn-create.btn-inverted.js-new-board-list{ type: "button", data: board_list_data }
......
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