Skip to content

Commit

Permalink
Merge branch 'DES/enhancement/732-vlc-refactor/tabs' into DES/enhance…
Browse files Browse the repository at this point in the history
…ment/#732-vlc-refactor
  • Loading branch information
brenner-company committed Apr 19, 2021
2 parents 37f5130 + 7dacd1e commit 3ce025c
Show file tree
Hide file tree
Showing 20 changed files with 253 additions and 441 deletions.
35 changes: 11 additions & 24 deletions app/components/agenda/agenda-header.hbs
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
<div class="auk-toolbar-complex">
<div class="auk-toolbar-complex__left">
<div class="auk-toolbar-complex__item">
<h1 class="vlc-page-header__title auk-u-pb vlc-page-header__title--bordered"
data-test-agenda-header-title>
{{t "agenda-of"}}
{{moment-format currentSession.plannedStart "DD MMMM YYYY"}}
{{t "at"}}
{{moment-format currentSession.plannedStart "HH:mm"}}
<span class="vlc-page-header__subtitle auk-u-muted" style="font-size:1.6rem;">
- {{await currentSession.kindToShow.label}}
</span>
</h1>
<div class="vlc-page-header__sub">
<div class="auk-toolbar-complex auk-toolbar-complex--auto">
<div class="auk-toolbar-complex__left">
<div class="auk-toolbar-complex__item">
{{!-- TODO: Fix this symbol into a custom icon based of the figma file --}}
{{!-- template-lint-disable no-bare-strings --}}
<LinkTo @route="agendas.overview" class="vlc-backlink auk-button-link">
&#8629;
</LinkTo>
{{!-- template-lint-enable no-bare-strings --}}
</div>
<Sessions::SessionAgendaNav
@currentAgenda={{currentAgenda}} />
</div>
<div class="auk-u-flex auk-u-flex--vertical auk-u-mt-2">
<div class="auk-u-flex auk-u-flex--vertical-center">
<h4 class="auk-toolbar-complex__title" data-test-agenda-header-title>
{{t "agenda-of"}}
{{moment-format currentSession.plannedStart "DD MMMM YYYY"}}
{{t "at"}}
{{moment-format currentSession.plannedStart "HH:mm"}}
</h4>
<span class="auk-u-muted auk-body-1 ">- {{await currentSession.kindToShow.label}}</span>
</div>
<Sessions::SessionAgendaNav
@currentAgenda={{currentAgenda}} />
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/components/agenda/agenda-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import moment from 'moment';
import { A } from '@ember/array';

export default Component.extend(FileSaverMixin, {
classNames: ['vlc-page-header'],
classNames: ['auk-navbar', 'auk-navbar--bordered-bottom', 'auk-navbar--gray-100', 'auk-navbar--auto'],

store: service(),
// These 2 can be very confusing, session-service is for meetings, current-session is for checking admin etc.
Expand Down
132 changes: 66 additions & 66 deletions app/components/newsletter/newsletter-header-overview.hbs
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
<div class="auk-toolbar-complex">
<div class="auk-toolbar-complex__left">
<div class="auk-toolbar-complex__item">
<h1
class="vlc-page-header__title vlc-page-header__title--bordered vlc-page-header__title--max-width auk-u-pb"
data-test-newsletter-overview-header-title
>
{{t "newsletter-overview-pdf-name"}}
-
{{await agenda.createdFor.kindToShow.label}}
{{moment-format agenda.createdFor.plannedStart "DD MMMM YYYY"}}
</h1>
<div class="vlc-page-header__sub">
<div class="auk-toolbar-complex auk-toolbar-complex--auto">
<div class="auk-toolbar-complex__left">
<div class="auk-toolbar-complex__item">
<div class="auk-u-flex auk-u-flex--vertical auk-u-mt-2">
<div class="auk-u-flex auk-u-flex--vertical-center">
<h4 class="auk-toolbar-complex__title auk-u-text-capitalize" data-test-newsletter-overview-header-title>
{{t "newsletter-overview-pdf-name"}}
-
{{await agenda.createdFor.kindToShow.label}}
{{moment-format agenda.createdFor.plannedStart "DD MMMM YYYY"}}
</h4>
</div>
<ul class="auk-tabs auk-tabs--reversed" role="tablist">
<li class="auk-tabs__tab">
<LinkTo @route="newsletters">
<span class="auk-tabs__tab-inner">
<div class="auk-icon auk-icon--hierarchical-back auk-icon--default">
<i class="ki ki-hierarchical-back"></i>
</div>
</span>
</LinkTo>
</li>
{{#if currentSession.isEditor}}
<li class="auk-tabs__tab">
<LinkTo
@route="newsletters"
class="vlc-backlink auk-button-link" >
{{!-- template-lint-disable no-bare-strings --}}
&#8629;
{{!-- template-lint-enable no-bare-strings --}}
@route="newsletter.index"
@model={{await agenda.createdFor.id}}
@activeClass="active"
>
<span class="auk-tabs__tab-inner">
{{t "overview"}}
</span>
</LinkTo>
</div>
{{#if currentSession.isEditor}}
<div class="auk-toolbar-complex__item">
<ul class="vlc-tabs-reverse" role="tablist">
<li class="vlc-tabs-reverse__item">
<LinkTo
class="border-left vlc-tabs-reverse__link"
@route="newsletter.index"
@model={{await agenda.createdFor.id}}
@activeClass="vlc-tabs-reverse__link--active"
>
{{t "overview"}}
</LinkTo>
</li>
<li class="vlc-tabs-reverse__item">
<LinkTo
@route="newsletter.print"
@model={{await agenda.createdFor.id}}
@query={{hash showDraft=true}}
class="vlc-tabs-reverse__link"
@activeClass="vlc-tabs-reverse__link--active" >
{{t "design"}}
</LinkTo>
</li>
<li class="vlc-tabs-reverse__item">
<LinkTo
@route="newsletter.print"
@model={{await agenda.createdFor.id}}
@query={{hash showDraft=false}}
class="vlc-tabs-reverse__link"
@activeClass="vlc-tabs-reverse__link--active" >
{{t "definite"}}
</LinkTo>
</li>
<li class="vlc-tabs-reverse__item">
<LinkTo
data-test-nota-updates
@route="newsletter.nota-updates"
class="vlc-tabs-reverse__link"
@activeClass="vlc-tabs-reverse__link--active" >
{{t "newsletter-update-notas"}}
</LinkTo>
</li>
</ul>
</div>
{{/if}}
</div>
</div>
</li>
<li class="auk-tabs__tab">
<LinkTo
@route="newsletter.print"
@model={{await agenda.createdFor.id}}
@query={{hash showDraft=true}}
@activeClass="active"
>
<span class="auk-tabs__tab-inner">
{{t "design"}}
</span>
</LinkTo>
</li>
<li class="auk-tabs__tab">
<LinkTo
@route="newsletter.print"
@model={{await agenda.createdFor.id}}
@query={{hash showDraft=false}}
@activeClass="active"
>
<span class="auk-tabs__tab-inner">
{{t "definite"}}
</span>
</LinkTo>
</li>
<li class="auk-tabs__tab">
<LinkTo
data-test-nota-updates
@route="newsletter.nota-updates"
@activeClass="active"
>
<span class="auk-tabs__tab-inner">
{{t "newsletter-update-notas"}}
</span>
</LinkTo>
</li>
{{/if}}
</ul>
</div>
</div>
</div>
Expand Down
46 changes: 30 additions & 16 deletions app/components/sessions/session-agenda-nav.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
<ul class="vlc-tabs-reverse" role="tablist">
<li class="vlc-tabs-reverse__item">
<ul class="auk-tabs auk-tabs--reversed" role="tablist">
<li class="auk-tabs__tab">
<LinkTo @route="agendas.overview">
<span class="auk-tabs__tab-inner">
<div class="auk-icon auk-icon--hierarchical-back auk-icon--default">
<i class="ki ki-hierarchical-back"></i>
</div>
</span>
</LinkTo>
</li>
<li class="auk-tabs__tab">
<LinkTo
class="border-left vlc-tabs-reverse__link"
@route="agenda.agendaitems.index"
@activeClass="vlc-tabs-reverse__link--active"
@activeClass="active"
>
{{t "overview"}}
<span class="auk-tabs__tab-inner">
{{t "overview"}}
</span>
</LinkTo>
</li>
<li class="vlc-tabs-reverse__item">
<li class="auk-tabs__tab">
{{!-- TODO: get rid of async computed, so this wrapping if and the await can go --}}
{{#if (await firstAgendaitemOfAgenda.id)}}
<Link
Expand All @@ -17,32 +27,36 @@
as |l|>
<a
href={{l.url}}
class="vlc-tabs-reverse__link {{if l.isActiveWithoutModels "vlc-tabs-reverse__link--active"}}"
class="{{if l.isActiveWithoutModels "active"}}"
{{on "click" l.transitionTo}}
>
{{t "detail"}}
<span class="auk-tabs__tab-inner">
{{t "detail"}}
</span>
</a>
</Link>
{{/if}}
</li>
{{#if currentSession.isEditor}}
<li class="vlc-tabs-reverse__item">
<li class="auk-tabs__tab">
<LinkTo
class="vlc-tabs-reverse__link"
@route="agenda.compare"
@activeClass="vlc-tabs-reverse__link--active"
@activeClass="active"
>
{{t "compare"}}
<span class="auk-tabs__tab-inner">
{{t "compare"}}
</span>
</LinkTo>
</li>
{{/if}}
<li class="vlc-tabs-reverse__item">
<li class="auk-tabs__tab">
<LinkTo
class="vlc-tabs-reverse__link"
@route="agenda.documents"
@activeClass="vlc-tabs-reverse__link--active"
@activeClass="active"
>
{{t "documents"}}
<span class="auk-tabs__tab-inner">
{{t "documents"}}
</span>
</LinkTo>
</li>
</ul>
90 changes: 44 additions & 46 deletions app/components/subcases/subcase-detail-nav.hbs
Original file line number Diff line number Diff line change
@@ -1,46 +1,44 @@
<div class="auk-toolbar-complex auk-toolbar-complex--auto">
<div class="auk-toolbar-complex__left">
<div class="auk-toolbar-complex__item">
<LinkTo
data-test-navigation-walk-up
@route="cases.case.subcases"
class="vlc-backlink auk-button-link"
>
{{!-- template-lint-disable no-bare-strings --}}
&#8629;
{{!-- template-lint-enable no-bare-strings --}}
</LinkTo>
</div>
<div class="auk-toolbar-complex__item">
<ul class="vlc-tabs-reverse" role="tablist">
<li class="vlc-tabs-reverse__item">
<LinkTo
@route="cases.case.subcases.subcase.overview"
class="border-left vlc-tabs-reverse__link"
@activeClass="vlc-tabs-reverse__link--active"
>
{{t "overview"}}
</LinkTo>
</li>
<li class="vlc-tabs-reverse__item">
<LinkTo
@route="cases.case.subcases.subcase.documents"
class="vlc-tabs-reverse__link"
@activeClass="vlc-tabs-reverse__link--active"
>
{{t "documents"}}
</LinkTo>
</li>
<li class="vlc-tabs-reverse__item">
<LinkTo
@route="cases.case.subcases.subcase.decision"
class="vlc-tabs-reverse__link"
@activeClass="vlc-tabs-reverse__link--active"
>
{{capitalize (t "decision")}}
</LinkTo>
</li>
</ul>
</div>
</div>
</div>
<ul class="auk-tabs auk-tabs--reversed" role="tablist">
<li class="auk-tabs__tab">
<LinkTo
@route="cases.case.subcases.overview"
data-test-navigation-walk-up
>
<span class="auk-tabs__tab-inner">
<div class="auk-icon auk-icon--hierarchical-back auk-icon--default">
<i class="ki ki-hierarchical-back"></i>
</div>
</span>
</LinkTo>
</li>
<li class="auk-tabs__tab">
<LinkTo
@route="cases.case.subcases.subcase.overview"
@activeClass="active"
>
<span class="auk-tabs__tab-inner">
{{t "overview"}}
</span>
</LinkTo>
</li>
<li class="auk-tabs__tab">
<LinkTo
@route="cases.case.subcases.subcase.documents"
@activeClass="active"
>
<span class="auk-tabs__tab-inner">
{{t "documents"}}
</span>
</LinkTo>
</li>
<li class="auk-tabs__tab">
<LinkTo
@route="cases.case.subcases.subcase.decision"
@activeClass="active"
>
<span class="auk-tabs__tab-inner">
{{capitalize (t "decision")}}
</span>
</LinkTo>
</li>
</ul>
4 changes: 1 addition & 3 deletions app/components/subcases/subcase-detail-nav.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Component from '@ember/component';

export default Component.extend({
classNames: ['vlc-page-header__sub'],
});
export default Component.extend({});
10 changes: 6 additions & 4 deletions app/components/subcases/subcase-header.hbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<div class="auk-toolbar-complex">
<div class="auk-toolbar-complex__left">
<div class="auk-toolbar-complex__item">
<h1 class="vlc-page-header__title vlc-page-header__title--bordered vlc-page-header__title--max-width auk-u-text-capitalize auk-u-pb">
{{subcase.shortTitle}}
</h1>
<Subcases::SubcaseDetailNav/>
<div class="auk-u-flex auk-u-flex--vertical auk-u-mt-2">
<div class="auk-u-flex auk-u-flex--vertical-center">
<h4 class="auk-toolbar-complex__title auk-u-text-capitalize">{{subcase.shortTitle}}</h4>
</div>
<Subcases::SubcaseDetailNav/>
</div>
</div>
</div>
<div class="auk-toolbar-complex__right">
Expand Down
2 changes: 1 addition & 1 deletion app/components/subcases/subcase-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default Component.extend({
agendaService: inject(),
router: inject(),
currentSession: inject(),
classNames: ['vlc-page-header'],
classNames: ['auk-navbar auk-navbar--bordered-bottom auk-navbar--gray-100 auk-navbar--auto'],
isAssigningToOtherAgenda: false,
isAssigningToOtherCase: false,
promptDeleteCase: false,
Expand Down
Loading

0 comments on commit 3ce025c

Please sign in to comment.