diff --git a/src/templates/flamenco/index.pug b/src/templates/flamenco/index.pug index e55179d3..e637ccaf 100644 --- a/src/templates/flamenco/index.pug +++ b/src/templates/flamenco/index.pug @@ -1,4 +1,4 @@ -| {% extends 'flamenco/layout.html' %} +| {% extends 'flamenco/projects/view.html' %} | {% block bodyattrs %}{{ super() }} data-context='dashboard'{% endblock %} | {% block page_title %}Dashboard{% endblock %} diff --git a/src/templates/flamenco/jobs/edit_rna_overrides.pug b/src/templates/flamenco/jobs/edit_rna_overrides.pug index e662df24..e4108859 100644 --- a/src/templates/flamenco/jobs/edit_rna_overrides.pug +++ b/src/templates/flamenco/jobs/edit_rna_overrides.pug @@ -1,4 +1,4 @@ -| {% extends 'flamenco/layout.html' %} +| {% extends 'flamenco/projects/view.html' %} | {% block bodyattrs %}{{ super() }} data-context='rna-overrides'{% endblock %} | {% block page_title %}RNA overrides - {{ project.name }}{% endblock %} | {% block flamencobody %} diff --git a/src/templates/flamenco/jobs/list_for_project.pug b/src/templates/flamenco/jobs/list_for_project.pug index 6cf3e208..0147e4ec 100644 --- a/src/templates/flamenco/jobs/list_for_project.pug +++ b/src/templates/flamenco/jobs/list_for_project.pug @@ -1,4 +1,4 @@ -| {% extends 'flamenco/layout.html' %} +| {% extends 'flamenco/projects/view.html' %} | {% block bodyattrs %}{{ super() }} data-context='{{ page_context }}'{% endblock %} | {% block page_title %}Jobs - {{ project.name }}{% endblock %} | {% block flamencobody %} diff --git a/src/templates/flamenco/layout.pug b/src/templates/flamenco/layout.pug index 8e2e4e8b..904463f4 100644 --- a/src/templates/flamenco/layout.pug +++ b/src/templates/flamenco/layout.pug @@ -1,49 +1 @@ -| {% extends 'projects/view.html' %} -include ../../../../pillar/src/templates/mixins/components - -| {% set title = 'production-tools' %} - -| {% block css %} -| {{ super() }} -link(href="{{ url_for('static_flamenco', filename='assets/css/main.css') }}", rel="stylesheet") -link(href="{{ url_for('static_flamenco', filename='assets/img/favicon.png') }}", rel="shortcut icon") -| {% endblock css %} - -| {% block head %} -script(src="{{ url_for('static_flamenco', filename='assets/js/generated/tutti.min.js') }}") -script(src="{{ url_for('static_pillar', filename='assets/js/vendor/clipboard.min.js')}}") -| {% endblock head %} - -| {% block body %} -#app-main - #col_sidebar - nav.sidebar(role='navigation') - ul - li - a.navbar-item.flamenco(href="{{ url_for('flamenco.index') }}", - title='Flamenco') - i.pi-flamenco - li - a.navbar-item.managers(href="{{ url_for('flamenco.managers.index') }}", - title='Your Flamenco Managers') Mngrs - | {% if session.get('flamenco_last_project') %} - | {% set flamenco_last_project = session.get('flamenco_last_project') %} - li - a.navbar-item.jobs(href="{{ url_for('flamenco.jobs.perproject.index', project_url=flamenco_last_project.url) }}", - title='Jobs for project {{ flamenco_last_project.name }}') Jobs - li - a.navbar-item.archive(href="{{ url_for('flamenco.jobs.archive.perproject.index', project_url=flamenco_last_project.url) }}", - title='Jobs archive for project {{ flamenco_last_project.name }}') Archive - | {% endif %} - - | {% block flamencobody %} - | {% endblock flamencobody %} -| {% endblock body %} - -| {% block footer_scripts_pre %} -script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.select2.min.js') }}", async=true) -| {% if project %} -script. - ProjectUtils.setProjectAttributes({projectId: "{{project._id}}", projectUrl: "{{project.url}}"}); -| {% endif %} -| {% endblock footer_scripts_pre %} +| {% extends 'layout.html' %} diff --git a/src/templates/flamenco/managers/index.pug b/src/templates/flamenco/managers/index.pug index 137e5bab..4816b747 100644 --- a/src/templates/flamenco/managers/index.pug +++ b/src/templates/flamenco/managers/index.pug @@ -1,4 +1,4 @@ -| {% extends 'flamenco/layout.html' %} +| {% extends 'flamenco/projects/view.html' %} | {% block bodyattrs %}{{ super() }} data-context='manager'{% endblock %} | {% block page_title %}Flamenco Managers{% endblock %} diff --git a/src/templates/flamenco/managers/linking/layout.pug b/src/templates/flamenco/managers/linking/layout.pug index 7984fd78..e544357c 100644 --- a/src/templates/flamenco/managers/linking/layout.pug +++ b/src/templates/flamenco/managers/linking/layout.pug @@ -2,7 +2,7 @@ | {% block bodyattrs %}{{ super() }} data-context='manager'{% endblock %} | {% block page_title %}Flamenco - Link Manager{% endblock %} -| {% block flamencobody %} +| {% block body %} .container .row .col-lg-8.mx-auto diff --git a/src/templates/flamenco/projects/view.pug b/src/templates/flamenco/projects/view.pug new file mode 100644 index 00000000..a8ee7743 --- /dev/null +++ b/src/templates/flamenco/projects/view.pug @@ -0,0 +1,49 @@ +| {% extends 'projects/view.html' %} +include ../../../../../pillar/src/templates/mixins/components + +| {% set title = 'production-tools' %} + +| {% block css %} +| {{ super() }} +link(href="{{ url_for('static_flamenco', filename='assets/css/main.css') }}", rel="stylesheet") +link(href="{{ url_for('static_flamenco', filename='assets/img/favicon.png') }}", rel="shortcut icon") +| {% endblock css %} + +| {% block head %} +script(src="{{ url_for('static_flamenco', filename='assets/js/generated/tutti.min.js') }}") +script(src="{{ url_for('static_pillar', filename='assets/js/vendor/clipboard.min.js')}}") +| {% endblock head %} + +| {% block body %} +#app-main + #col_sidebar + nav.sidebar(role='navigation') + ul + li + a.navbar-item.flamenco(href="{{ url_for('flamenco.index') }}", + title='Flamenco') + i.pi-flamenco + li + a.navbar-item.managers(href="{{ url_for('flamenco.managers.index') }}", + title='Your Flamenco Managers') Mngrs + | {% if session.get('flamenco_last_project') %} + | {% set flamenco_last_project = session.get('flamenco_last_project') %} + li + a.navbar-item.jobs(href="{{ url_for('flamenco.jobs.perproject.index', project_url=flamenco_last_project.url) }}", + title='Jobs for project {{ flamenco_last_project.name }}') Jobs + li + a.navbar-item.archive(href="{{ url_for('flamenco.jobs.archive.perproject.index', project_url=flamenco_last_project.url) }}", + title='Jobs archive for project {{ flamenco_last_project.name }}') Archive + | {% endif %} + + | {% block flamencobody %} + | {% endblock flamencobody %} +| {% endblock body %} + +| {% block footer_scripts_pre %} +script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.select2.min.js') }}", async=true) +| {% if project %} +script. + ProjectUtils.setProjectAttributes({projectId: "{{project._id}}", projectUrl: "{{project.url}}"}); +| {% endif %} +| {% endblock footer_scripts_pre %} diff --git a/src/templates/flamenco/tasks/list_for_project.pug b/src/templates/flamenco/tasks/list_for_project.pug index 06267052..a2caf82f 100644 --- a/src/templates/flamenco/tasks/list_for_project.pug +++ b/src/templates/flamenco/tasks/list_for_project.pug @@ -1,4 +1,4 @@ -| {% extends 'flamenco/layout.html' %} +| {% extends 'flamenco/projects/view.html' %} | {% block bodyattrs %}{{ super() }} data-context='task'{% endblock %} | {% block page_title %}Tasks - {{ project.name }} {% endblock %} | {% block flamencobody %}