-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
228 additions
and
113 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 |
---|---|---|
@@ -1 +1 @@ | ||
<rss xmlns:dc=http://purl.org/dc/elements/1.1/ xmlns:atom=http://www.w3.org/2005/Atom version=2.0><channel><title>Pushword - Modern CMS to build rapidly Websites (powered by Symfony)</title> <link>https://pushword.piedweb.com/ <description></description> <link href=https://pushword.piedweb.com/feed.xml rel=self type=application/rss+xml> <item><title></title> <link>https://pushword.piedweb.com/architecture <guid>https://pushword.piedweb.com/architecture</guid> <pubdate>Tue, 02 Feb 2021 10:18:28 +0100</pubdate></item> <item><title></title> <link>https://pushword.piedweb.com/command <guid>https://pushword.piedweb.com/command</guid> <pubdate>Tue, 02 Feb 2021 10:18:28 +0100</pubdate></item> <item><title></title> <link>https://pushword.piedweb.com/component/entity-filter <guid>https://pushword.piedweb.com/component/entity-filter</guid> <pubdate>Tue, 02 Feb 2021 10:18:28 +0100</pubdate></item> <item><title></title> <link>https://pushword.piedweb.com/configuration <guid>https://pushword.piedweb.com/configuration</guid> <pubdate>Tue, 02 Feb 2021 10:18:28 +0100</pubdate></item> <item><title></title> <link>https://pushword.piedweb.com/contribute <guid>https://pushword.piedweb.com/contribute</guid> <pubdate>Tue, 02 Feb 2021 10:18:28 +0100</pubdate></item></channel> </rss> | ||
<rss xmlns:dc=http://purl.org/dc/elements/1.1/ xmlns:atom=http://www.w3.org/2005/Atom version=2.0><channel><title>Pushword - Modern CMS to build rapidly Websites (powered by Symfony)</title> <link>https://pushword.piedweb.com/ <description></description> <link href=https://pushword.piedweb.com/feed.xml rel=self type=application/rss+xml> <item><title></title> <link>https://pushword.piedweb.com/architecture <guid>https://pushword.piedweb.com/architecture</guid> <pubdate>Thu, 04 Feb 2021 15:09:12 +0100</pubdate></item> <item><title></title> <link>https://pushword.piedweb.com/command <guid>https://pushword.piedweb.com/command</guid> <pubdate>Thu, 04 Feb 2021 15:09:12 +0100</pubdate></item> <item><title></title> <link>https://pushword.piedweb.com/component/entity-filter <guid>https://pushword.piedweb.com/component/entity-filter</guid> <pubdate>Thu, 04 Feb 2021 15:09:12 +0100</pubdate></item> <item><title></title> <link>https://pushword.piedweb.com/configuration <guid>https://pushword.piedweb.com/configuration</guid> <pubdate>Thu, 04 Feb 2021 15:09:12 +0100</pubdate></item> <item><title></title> <link>https://pushword.piedweb.com/contribute <guid>https://pushword.piedweb.com/contribute</guid> <pubdate>Thu, 04 Feb 2021 15:09:12 +0100</pubdate></item></channel> </rss> |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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,25 @@ | ||
<?php | ||
|
||
namespace Pushword\Core\Controller; | ||
|
||
use Twig\Environment as Twig; | ||
|
||
trait RenderTrait | ||
{ | ||
private Twig $twig; | ||
|
||
/** @required */ | ||
public function setTwig(Twig $twig) | ||
{ | ||
$this->twig = $twig; | ||
} | ||
|
||
/** | ||
* Returns a rendered view. | ||
* Use by abstract controller without de deprecation message. | ||
*/ | ||
protected function renderView(string $view, array $parameters = []): string | ||
{ | ||
return $this->twig->render($view, $parameters); | ||
} | ||
} |
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
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,116 @@ | ||
{# todo: drop pagerfanta #} | ||
{%- block pager_widget -%} | ||
<nav role="navigation" class="flex items-center justify-between"><div class="flex items-center justify-between flex-1"><div><span class="relative z-0 inline-flex shadow-sm"> | ||
{{- block('pager') -}} | ||
</nav> | ||
{%- endblock pager_widget -%} | ||
|
||
{%- block pager -%} | ||
{# Previous Page Link #} | ||
{%- if pagerfanta.hasPreviousPage() -%} | ||
{%- set path = route_generator.route(pagerfanta.getPreviousPage()) -%} | ||
{{- block('previous_page_link') -}} | ||
{%- else -%} | ||
{{- block('previous_page_link_disabled') -}} | ||
{%- endif -%} | ||
|
||
{# First Page Link #} | ||
{%- if start_page > 1 -%} | ||
{%- set page = 1 -%} | ||
{%- set path = route_generator.route(page) -%} | ||
{{- block('page_link') -}} | ||
{%- endif -%} | ||
|
||
{# Second Page Link, displays if we are on page 3 #} | ||
{%- if start_page == 3 -%} | ||
{%- set page = 2 -%} | ||
{%- set path = route_generator.route(page) -%} | ||
{{- block('page_link') -}} | ||
{%- endif -%} | ||
|
||
{# Separator, creates a "..." separator to limit the number of items if we are starting beyond page 3 #} | ||
{%- if start_page > 3 -%} | ||
{{- block('ellipsis') -}} | ||
{%- endif -%} | ||
|
||
{# Page Links #} | ||
{%- for page in range(start_page, end_page) -%} | ||
{%- set path = route_generator.route(page) -%} | ||
{%- if page == current_page -%} | ||
{{- block('current_page_link') -}} | ||
{%- else -%} | ||
{{- block('page_link') -}} | ||
{%- endif -%} | ||
{%- endfor -%} | ||
|
||
{# Separator, creates a "..." separator to limit the number of items if we are over 3 pages away from the last page #} | ||
{%- if end_page < (nb_pages - 2) -%} | ||
{{- block('ellipsis') -}} | ||
{%- endif -%} | ||
|
||
{# Second to Last Page Link, displays if we are on the third from last page #} | ||
{%- if end_page == (nb_pages - 2) -%} | ||
{%- set page = (nb_pages - 1) -%} | ||
{%- set path = route_generator.route(page) -%} | ||
{{- block('page_link') -}} | ||
{%- endif -%} | ||
|
||
{# Last Page Link #} | ||
{%- if nb_pages > end_page -%} | ||
{%- set page = nb_pages -%} | ||
{%- set path = route_generator.route(page) -%} | ||
{{- block('page_link') -}} | ||
{%- endif -%} | ||
|
||
{# Next Page Link #} | ||
{%- if pagerfanta.hasNextPage() -%} | ||
{%- set path = route_generator.route(pagerfanta.getNextPage()) -%} | ||
{{- block('next_page_link') -}} | ||
{%- else -%} | ||
{{- block('next_page_link_disabled') -}} | ||
{%- endif -%} | ||
{%- endblock pager -%} | ||
|
||
{%- block page_link -%} | ||
<a href="{{- path -}}" class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium leading-5 text-gray-700 transition duration-150 ease-in-out bg-white border border-gray-300 hover:text-gray-500 focus:z-10 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-100 active:text-gray-700">{{- page -}}</a> | ||
{%- endblock page_link -%} | ||
|
||
{%- block current_page_link -%} | ||
<span aria-current="page"><span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium leading-5 text-gray-500 bg-white border border-gray-300 cursor-default">{{- page -}}</span></span> | ||
{%- endblock current_page_link -%} | ||
|
||
{%- block previous_page_link -%} | ||
<a href="{{- path -}}" rel="prev" class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium leading-5 text-gray-700 transition duration-150 ease-in-out bg-white border border-gray-300 rounded-l-md hover:text-gray-500 focus:z-10 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-100 active:text-gray-700">{{- block('previous_page_message') -}}</a> | ||
{%- endblock previous_page_link -%} | ||
|
||
{%- block previous_page_link_disabled -%} | ||
<span aria-disabled="true"><span class="relative inline-flex items-center px-4 py-2 text-sm font-medium leading-5 text-gray-500 bg-white border border-gray-300 cursor-default rounded-l-md">{{- block('previous_page_message') -}}</span></span> | ||
{%- endblock previous_page_link_disabled -%} | ||
|
||
{%- block previous_page_message -%} | ||
{%- if options['prev_message'] is defined -%} | ||
{{- options['prev_message'] -}} | ||
{%- else -%} | ||
Previous | ||
{%- endif -%} | ||
{%- endblock previous_page_message -%} | ||
|
||
{%- block next_page_link -%} | ||
<a href="{{- path -}}" rel="next" class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium leading-5 text-gray-700 transition duration-150 ease-in-out bg-white border border-gray-300 rounded-r-md hover:text-gray-500 focus:z-10 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-100 active:text-gray-700">Next</a> | ||
{%- endblock next_page_link -%} | ||
|
||
{%- block next_page_link_disabled -%} | ||
<span aria-disabled="true"><span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium leading-5 text-gray-500 bg-white border border-gray-300 cursor-default rounded-r-md">{{- block('next_page_message') -}}</span></span> | ||
{%- endblock next_page_link_disabled -%} | ||
|
||
{%- block next_page_message -%} | ||
{%- if options['next_message'] is defined -%} | ||
{{- options['next_message'] -}} | ||
{%- else -%} | ||
Next | ||
{%- endif -%} | ||
{%- endblock next_page_message -%} | ||
|
||
{%- block ellipsis -%} | ||
<span aria-disabled="true"><span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium leading-5 text-gray-700 bg-white border border-gray-300 cursor-default">…</span></span> | ||
{%- endblock ellipsis -%} |
Oops, something went wrong.