Commit 0a38a9b6 authored by Justin Ho's avatar Justin Ho

Add Open/Closed/All nav buttons to Jira issues

- Move setting of default_state to controller action since it's
used to determine which of the tabs is active by default.
- Add Open/Closed/All nav buttons to Jira issues and align
"Create new Jira issue" button to follow mocks.
- Update Vue app to handle `state` gracefully.
parent 2122dbcc
......@@ -293,7 +293,7 @@ export default {
this.filters = filters;
},
refetchIssuables() {
const ignored = ['utf8', 'state'];
const ignored = ['utf8'];
const params = omit(this.filters, ignored);
historyPushState(setUrlParams(params, window.location.href, true, true));
......
......@@ -18,6 +18,8 @@ module Projects
rescue_from ::Projects::Integrations::Jira::IssuesFinder::RequestError, with: :render_request_error
def index
params[:state] = default_state if params[:state].blank?
respond_to do |format|
format.html
format.json do
......@@ -46,7 +48,6 @@ module Projects
end
def finder_options
params[:state] = default_state if params[:state].blank?
options = { sort: set_sort_order }
# Used by view to highlight active option
......
.nav-controls.issues-nav-controls.gl-my-5
= link_to @project.external_issue_tracker.new_issue_url, class: 'btn gl-button', target: '_blank', rel: 'noopener noreferrer' do
.nav-controls.issues-nav-controls
= link_to @project.external_issue_tracker.new_issue_url, class: 'btn gl-button gl-align-self-start', target: '_blank', rel: 'noopener noreferrer' do
= _('Create new issue in Jira')
= sprite_icon('external-link', css_class: 'gl-ml-1')
- page_title _('Jira Issues')
.top-area.gl-border-b-0.gl-justify-content-end
.top-area.gl-border-b-0.gl-mt-6
= render 'shared/issuable/nav', type: :issues, display_count: false
= render 'projects/integrations/jira/issues/nav_btns'
.js-issuables-list{ data: { endpoint: expose_path(project_integrations_jira_issues_path(@project, format: :json)),
......
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