Commit 9140f1ec authored by Clement Ho's avatar Clement Ho

Add epics list

parent a3f2766b
- type = local_assigns.fetch(:type, :issues)
- page_context_word = type.to_s.humanize(capitalize: false)
- issuables = @issues || @merge_requests
- issuables = @issues || @merge_requests || @epics
%ul.nav-links.issues-state-filters
%li{ class: active_when(params[:state] == 'opened') }>
= link_to page_filter_path(state: 'opened', label: true), id: 'state-opened', title: "Filter by #{page_context_word} that are currently opened.", data: { state: 'opened' } do
#{issuables_state_counter_text(type, :opened)}
- if type != :epics
%li{ class: active_when(params[:state] == 'opened') }>
= link_to page_filter_path(state: 'opened', label: true), id: 'state-opened', title: "Filter by #{page_context_word} that are currently opened.", data: { state: 'opened' } do
#{issuables_state_counter_text(type, :opened)}
- if type == :merge_requests
%li{ class: active_when(params[:state] == 'merged') }>
......@@ -15,7 +16,7 @@
%li{ class: active_when(params[:state] == 'closed') }>
= link_to page_filter_path(state: 'closed', label: true), id: 'state-closed', title: 'Filter by merge requests that are currently closed and unmerged.', data: { state: 'closed' } do
#{issuables_state_counter_text(type, :closed)}
- else
- elsif type != :epics
%li{ class: active_when(params[:state] == 'closed') }>
= link_to page_filter_path(state: 'closed', label: true), id: 'state-closed', title: 'Filter by issues that are currently closed.', data: { state: 'closed' } do
#{issuables_state_counter_text(type, :closed)}
......
%li
.issue-box
.issue-info-container
.issue-main-info
.issue-title.title
%span.issue-title-text
= link_to epic.title, epic_path(epic)
.issuable-info
%span.issuable-reference
-# TODO: Use to_reference
= "&#{epic.iid}"
%span.issuable-authored.hidden-xs
·
opened #{time_ago_with_tooltip(epic.created_at, placement: 'bottom')}
by #{link_to_member(@group, epic.author, avatar: false)}
- page_title "Epics"
- if @epics.to_a.any?
-# TODO: Add epics list
= render 'shared/epics'
- else
= render 'shared/empty_states/epics'
.top-area
-# TODO: Auto highlight All state on page load
= render 'shared/issuable/nav', type: :epics
.panel.panel-default.panel-small.panel-without-border
%ul.content-list.issuable-list
= render partial: 'groups/epics/epic', collection: @epics
-# TODO: Test pagination
= paginate @epics, theme: "gitlab"
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