Added default value for title on entry view

This commit is contained in:
Nicolas Lœuillet 2017-12-26 15:40:38 +01:00
parent 8ffcee8aff
commit c04bde29a3
No known key found for this signature in database
GPG key ID: 68C7E8049A047DF7
2 changed files with 4 additions and 4 deletions

View file

@ -1,11 +1,11 @@
{% extends "WallabagCoreBundle::layout.html.twig" %} {% extends "WallabagCoreBundle::layout.html.twig" %}
{% block title %}{{ entry.title|e|raw }} ({{ entry.domainName|removeWww }}){% endblock %} {% block title %}{{ entry.title|e|raw|default('entry.default_title'|trans) }} ({{ entry.domainName|removeWww }}){% endblock %}
{% block content %} {% block content %}
<div id="article"> <div id="article">
<header class="mbm"> <header class="mbm">
<h1>{{ entry.title|e|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" class="nostyle" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> <h1>{{ entry.title|e|raw |default('entry.default_title'|trans) }} <a href="{{ path('edit', { 'id': entry.id }) }}" class="nostyle" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
</header> </header>
<div id="article_toolbar"> <div id="article_toolbar">

View file

@ -1,6 +1,6 @@
{% extends "WallabagCoreBundle::layout.html.twig" %} {% extends "WallabagCoreBundle::layout.html.twig" %}
{% block title %}{{ entry.title|striptags|raw }} ({{ entry.domainName|removeWww }}){% endblock %} {% block title %}{{ entry.title|striptags|raw|default('entry.default_title'|trans) }} ({{ entry.domainName|removeWww }}){% endblock %}
{% block body_class %}entry{% endblock %} {% block body_class %}entry{% endblock %}
@ -223,7 +223,7 @@
{% block content %} {% block content %}
<div id="article"> <div id="article">
<header class="mbm"> <header class="mbm">
<h1>{{ entry.title|striptags|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> <h1>{{ entry.title|striptags|raw|default('entry.default_title'|trans) }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
</header> </header>
<aside> <aside>
<div class="tools"> <div class="tools">