Added pages to view the list of potential jobs
TODO: add ability to run a job & view queued jobs
This commit is contained in:
10
templates/navigation/sidebar-menu.html.twig
Normal file
10
templates/navigation/sidebar-menu.html.twig
Normal file
@@ -0,0 +1,10 @@
|
||||
{% extends "@admin/navigation/sidebar-menu.html.twig" %}
|
||||
|
||||
{% block navigation %}
|
||||
{{ parent() }}
|
||||
{% if checkAccess('uri_jobs') %}
|
||||
<li>
|
||||
<a href="{{site.uri.public}}/jobs"><i class="fas fa-tasks fa-fw"></i> <span>{{ translate("JOB", 2) }}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
41
templates/pages/jobs.html.twig
Normal file
41
templates/pages/jobs.html.twig
Normal file
@@ -0,0 +1,41 @@
|
||||
{% extends "pages/abstract/dashboard.html.twig" %}
|
||||
|
||||
{% block stylesheets_page %}
|
||||
<!-- Page-specific CSS asset bundle -->
|
||||
{{ assets.css('css/form-widgets') | raw }}
|
||||
{% endblock %}
|
||||
|
||||
{# Overrides blocks in head of base template #}
|
||||
{% block page_title %}{{ translate("JOB", 2)}}{% endblock %}
|
||||
|
||||
{% block page_description %}{{ translate("JOB.PAGE_DESCRIPTION")}}{% endblock %}
|
||||
|
||||
{% block body_matter %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div id="widget-jobs" class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title pull-left"><i class="fas fa-jobs fa-fw"></i> {{translate('JOB', 2)}}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{% include "tables/jobs.html.twig" with {
|
||||
"table" : {
|
||||
"id" : "table-jobs"
|
||||
}
|
||||
}
|
||||
%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block scripts_page %}
|
||||
<!-- Include validation rules -->
|
||||
<script>
|
||||
{% include "pages/partials/page.js.twig" %}
|
||||
</script>
|
||||
|
||||
<!-- Include form widgets JS -->
|
||||
{{ assets.js('js/form-widgets') | raw }}
|
||||
|
||||
{% endblock %}
|
||||
39
templates/tables/jobs.html.twig
Normal file
39
templates/tables/jobs.html.twig
Normal file
@@ -0,0 +1,39 @@
|
||||
{# This partial template renders a table of permissions, to be populated with rows via an AJAX request.
|
||||
# This extends a generic template for paginated tables.
|
||||
#
|
||||
# Note that this template contains a "skeleton" table with an empty table body, and then a block of Handlebars templates which are used
|
||||
# to render the table cells with the data from the AJAX request.
|
||||
#}
|
||||
|
||||
{% extends "tables/table-paginated.html.twig" %}
|
||||
|
||||
{% block table %}
|
||||
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-column-name="name" data-priority="1">{{translate('NAME')}}</th>
|
||||
<th data-column-name="sprinkle" data-priority="1">{{translate('SPRINKLE')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for job in jobs %}
|
||||
<tr>
|
||||
<td data-text="{{job.sprinkle}}/{{job.name}}">
|
||||
<div>
|
||||
<strong>
|
||||
<!--<a href="{{site.uri.public}}/jobs/t/{{job.sprinkle}}/{{job.name}}">{{job.name}}</a>-->
|
||||
{{job.name}}
|
||||
</strong>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td data-text="{{job.sprinkle}}">
|
||||
{{job.sprinkle}}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
{% block table_pager_controls %}{% endblock %}
|
||||
Reference in New Issue
Block a user