-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#24: Content List Tab under SQLI Admin
- Loading branch information
1 parent
6fb6b1f
commit 5b12fb8
Showing
2 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
|
||
namespace SQLI\EzToolboxBundle\Controller; | ||
|
||
|
||
class SQLIAllContentList extends \Controller | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{% extends '@ezdesign/ui/layout.html.twig' %} | ||
|
||
{% block title %}{{ 'Content List'|trans }}{% endblock %} | ||
|
||
{%- block breadcrumbs -%} | ||
{% include '@ezdesign/ui/breadcrumbs.html.twig' with { items: [ | ||
{ value: 'url.list'|trans|desc('Content List') } | ||
]} %} | ||
{%- endblock -%} | ||
|
||
{%- block page_title -%} | ||
{% include '@ezdesign/ui/page_title.html.twig' with { | ||
title: 'url.list'|trans|desc('Content List'), | ||
icon_name: 'article' | ||
} %} | ||
{%- endblock -%} | ||
|
||
{% block javascripts %} | ||
<script src="{{ asset('sqli-eztoolbox/Resources/asset/js/dropdown.js')}}"></script> | ||
{% endblock %} | ||
|
||
{%- block content -%} | ||
|
||
<section class="container my-4"> | ||
<div class="my-4"> | ||
<div class="dropdown"> | ||
<button class="btn btn-secondary dropdown-toggle" type="button" id="contentTypeFilter" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
{% if app.request.get('contentTypeIdentifier') == false %} | ||
Content Type | ||
{% else %} | ||
{% for group, types in contentTypes %} | ||
{% for type in types %} | ||
{% if type.identifier == app.request.get('contentTypeIdentifier') %} | ||
{{ type.name }} | ||
{% endif %} | ||
{% endfor %} | ||
{% endfor %} | ||
{% endif %} | ||
</button> | ||
<div class="dropdown-menu" aria-labelledby="contentTypeFilter"> | ||
{% for group, types in contentTypes %} | ||
<h6 class="dropdown-header">{{ group }}</h6> | ||
{% for type in types %} | ||
<a class="dropdown-item" href="{{ path('sqli_eztoolbox_all_content_list', { 'contentTypeIdentifier': type.identifier }) }}">{{ type.name }}</a> | ||
{% endfor %} | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="ez-table-header"> | ||
<div class="ez-table-header__headline">{{ "Content List"|trans }} -- | ||
{% if totalCount > 1 %} | ||
{{ totalCount }}{{ "entity.content_list_total_objects"|trans}} | ||
{% else %} | ||
{{ totalCount }}{{ "content_list_total_object"|trans}} | ||
{% endif %} | ||
</div> | ||
</div> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>{{ 'Content name'|trans }}</th> | ||
<th>{{ 'Content Type'|trans }}</th> | ||
<th>{{ 'Modified'|trans }}</th> | ||
<th>{{ 'Published'|trans }}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for article in articles %} | ||
<tr> | ||
<td><a href={{ez_path(article)}}>{{ ez_content_name(article.contentInfo) }}</a></td> | ||
<td>{{ article.contentInfo.contentTypeId }}</td> | ||
<td>{{ article.contentInfo.modificationDate|ez_full_datetime }}</td> | ||
<td>{{ article.contentInfo.publishedDate|ez_full_datetime }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{{ pagerfanta(articles, 'ez') }} | ||
</section> | ||
|
||
<script> | ||
$(".dropdown-menu a ").click(function () { | ||
let x = $(this).text(); | ||
alert(x); | ||
}); | ||
</script> | ||
|
||
{%- endblock -%} |