mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Upgrade to Twig 3
This commit is contained in:
parent
e62a9d05cc
commit
28abfe264a
10 changed files with 313 additions and 58 deletions
|
@ -3,7 +3,7 @@
|
|||
<i class="grey-text text-darken-4 activator material-icons right">more_vert</i>
|
||||
{% endif %}
|
||||
<a href="{{ path('view', {'id': entry.id}) }}" title="{{ entry.title|striptags|e('html_attr') }}" class="card-title dot-ellipsis dot-resize-update">
|
||||
{{ entry.title|striptags|truncate(80, true, '…')|default('entry.default_title'|trans)|raw }}
|
||||
{{ entry.title|striptags|u.truncate(80, '…', false)|default('entry.default_title'|trans)|raw }}
|
||||
</a>
|
||||
|
||||
<div class="{{ subClass|default('original grey-text') }}">
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<i class="card-title activator grey-text text-darken-4 material-icons right">clear</i>
|
||||
<span class="card-title">
|
||||
<a href="{{ path('view', {'id': entry.id}) }}" title="{{ entry.title|striptags|e('html_attr') }}">
|
||||
{{ entry.title|striptags|truncate(80, true, '…')|raw }}
|
||||
{{ entry.title|striptags|u.truncate(80, '…', false)|raw }}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@
|
|||
<li>
|
||||
<i class="material-icons grey-text" title="{{ 'entry.view.provided_by'|trans }}">launch</i>
|
||||
<a href="{{ entry.originUrl|e }}" target="_blank" rel="noopener" class="tool grey-text">
|
||||
{{ entry.originUrl|striptags|removeSchemeAndWww|truncate(32) }}
|
||||
{{ entry.originUrl|striptags|removeSchemeAndWww|u.truncate(32) }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
|
|
@ -31,7 +31,7 @@ class WallabagExtension extends AbstractExtension implements GlobalsInterface
|
|||
$this->rootDir = $rootDir;
|
||||
}
|
||||
|
||||
public function getGlobals()
|
||||
public function getGlobals(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ class AuthCodeMailer implements AuthCodeMailerInterface
|
|||
*/
|
||||
public function sendAuthCode(TwoFactorInterface $user): void
|
||||
{
|
||||
$template = $this->twig->loadTemplate('@WallabagUser/TwoFactor/email_auth_code.html.twig');
|
||||
$template = $this->twig->load('@WallabagUser/TwoFactor/email_auth_code.html.twig');
|
||||
|
||||
$subject = $template->renderBlock('subject', []);
|
||||
$bodyHtml = $template->renderBlock('body_html', [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue