diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2017-12-26 16:00:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-26 16:00:58 +0100 |
commit | 3473e600b1d0ae0695b8c15342a6a1f76e2bc973 (patch) | |
tree | cb75c9e3ac7bccdffcad97c2aa637a6717bf25e4 /src/Wallabag | |
parent | 11ed735c09391f244dfa45b93cdbfded11196866 (diff) | |
parent | c04bde29a36e4a60c596808d0ac45dc23476db44 (diff) | |
download | wallabag-3473e600b1d0ae0695b8c15342a6a1f76e2bc973.tar.gz wallabag-3473e600b1d0ae0695b8c15342a6a1f76e2bc973.tar.zst wallabag-3473e600b1d0ae0695b8c15342a6a1f76e2bc973.zip |
Merge pull request #3525 from Simounet/fix/empty-card-title-link
Fix empty card title link
Diffstat (limited to 'src/Wallabag')
23 files changed, 53 insertions, 83 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 27dbb388..e1384675 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' | 161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | # default_title: 'Title of the entry' | ||
164 | page_titles: | 165 | page_titles: |
165 | # unread: 'Unread entries' | 166 | # unread: 'Unread entries' |
166 | # starred: 'Starred entries' | 167 | # starred: 'Starred entries' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index d47986e5..c297ffb5 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | notmatches: 'Testet, ob ein <i>Titel</i> nicht auf eine <i>Suche</i> zutrifft (Groß- und Kleinschreibung wird nicht berücksichtigt).<br />Beispiel: <code>title notmatches "Fußball"</code>' | 161 | notmatches: 'Testet, ob ein <i>Titel</i> nicht auf eine <i>Suche</i> zutrifft (Groß- und Kleinschreibung wird nicht berücksichtigt).<br />Beispiel: <code>title notmatches "Fußball"</code>' |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | default_title: 'Titel des Eintrags' | ||
164 | page_titles: | 165 | page_titles: |
165 | unread: 'Ungelesene Einträge' | 166 | unread: 'Ungelesene Einträge' |
166 | starred: 'Favorisierte Einträge' | 167 | starred: 'Favorisierte Einträge' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index bbaecb24..0a65ce9f 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' | 161 | notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | default_title: 'Title of the entry' | ||
164 | page_titles: | 165 | page_titles: |
165 | unread: 'Unread entries' | 166 | unread: 'Unread entries' |
166 | starred: 'Starred entries' | 167 | starred: 'Starred entries' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index e3b625f7..700190a6 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' | 161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | default_title: 'Título del artículo' | ||
164 | page_titles: | 165 | page_titles: |
165 | unread: 'Artículos no leídos' | 166 | unread: 'Artículos no leídos' |
166 | starred: 'Artículos favoritos' | 167 | starred: 'Artículos favoritos' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index c03cca46..83645933 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' | 161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | # default_title: 'Title of the entry' | ||
164 | page_titles: | 165 | page_titles: |
165 | unread: 'مقالههای خواندهنشده' | 166 | unread: 'مقالههای خواندهنشده' |
166 | starred: 'مقالههای برگزیده' | 167 | starred: 'مقالههای برگزیده' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index b0037ad2..edf29654 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | notmatches: "Teste si un <i>sujet</i> ne correspond pas à une <i>recherche</i> (non sensible à la casse).<br />Exemple : <code>title notmatches \"football\"</code>" | 161 | notmatches: "Teste si un <i>sujet</i> ne correspond pas à une <i>recherche</i> (non sensible à la casse).<br />Exemple : <code>title notmatches \"football\"</code>" |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | default_title: "Titre de l’article" | ||
164 | page_titles: | 165 | page_titles: |
165 | unread: "Articles non lus" | 166 | unread: "Articles non lus" |
166 | starred: "Articles favoris" | 167 | starred: "Articles favoris" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 56cf341b..47292116 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' | 161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | default_title: "Titolo del contenuto" | ||
164 | page_titles: | 165 | page_titles: |
165 | unread: 'Contenuti non letti' | 166 | unread: 'Contenuti non letti' |
166 | starred: 'Contenuti preferiti' | 167 | starred: 'Contenuti preferiti' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 1b5b221f..6130eee2 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | notmatches: 'Teste se <i>subjècte</i> correspond pas a una <i>recèrca</i> (sensibla a la cassa).<br />Example : <code>title notmatches "football"</code>' | 161 | notmatches: 'Teste se <i>subjècte</i> correspond pas a una <i>recèrca</i> (sensibla a la cassa).<br />Example : <code>title notmatches "football"</code>' |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | default_title: "Títol de l'article" | ||
164 | page_titles: | 165 | page_titles: |
165 | unread: 'Articles pas legits' | 166 | unread: 'Articles pas legits' |
166 | starred: 'Articles favorits' | 167 | starred: 'Articles favorits' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 84823308..a64e60b0 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | notmatches: 'Sprawdź czy <i>temat</i> nie zawiera <i>szukaj</i> (duże lub małe litery).<br />Przykład: <code>tytuł nie zawiera "piłka nożna"</code>' | 161 | notmatches: 'Sprawdź czy <i>temat</i> nie zawiera <i>szukaj</i> (duże lub małe litery).<br />Przykład: <code>tytuł nie zawiera "piłka nożna"</code>' |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | default_title: 'Tytuł wpisu' | ||
164 | page_titles: | 165 | page_titles: |
165 | unread: 'Nieprzeczytane wpisy' | 166 | unread: 'Nieprzeczytane wpisy' |
166 | starred: 'Wpisy oznaczone gwiazdką' | 167 | starred: 'Wpisy oznaczone gwiazdką' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index 3987cec3..7aef9694 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' | 161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | default_title: 'Título da entrada' | ||
164 | page_titles: | 165 | page_titles: |
165 | unread: 'Entradas não lidas' | 166 | unread: 'Entradas não lidas' |
166 | starred: 'Entradas destacadas' | 167 | starred: 'Entradas destacadas' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 4d2fd569..9b7068c6 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' | 161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | # default_title: 'Title of the entry' | ||
164 | page_titles: | 165 | page_titles: |
165 | # unread: 'Unread entries' | 166 | # unread: 'Unread entries' |
166 | # starred: 'Starred entries' | 167 | # starred: 'Starred entries' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml index a560e58d..5f210c93 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml | |||
@@ -156,6 +156,7 @@ config: | |||
156 | matches: 'Тесты, в которых <i> тема </i> соответствует <i> поиску </i> (без учета регистра). Пример: <code> title matches "футбол" </code>' | 156 | matches: 'Тесты, в которых <i> тема </i> соответствует <i> поиску </i> (без учета регистра). Пример: <code> title matches "футбол" </code>' |
157 | 157 | ||
158 | entry: | 158 | entry: |
159 | default_title: 'Название записи' | ||
159 | page_titles: | 160 | page_titles: |
160 | unread: 'Непрочитанные записи' | 161 | unread: 'Непрочитанные записи' |
161 | starred: 'Помеченные записи' | 162 | starred: 'Помеченные записи' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml index ad832202..9d22f90d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | notmatches: 'ทดสอบว่า <i>เรื่อง</i> นี้ไม่ตรงกับ <i>การต้นหา</i> (กรณีไม่ทราบ).<br />ตัวอย่าง: <code>หัวข้อทีไม่ตรงกับ "football"</code>' | 161 | notmatches: 'ทดสอบว่า <i>เรื่อง</i> นี้ไม่ตรงกับ <i>การต้นหา</i> (กรณีไม่ทราบ).<br />ตัวอย่าง: <code>หัวข้อทีไม่ตรงกับ "football"</code>' |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | default_title: 'หัวข้อรายการ' | ||
164 | page_titles: | 165 | page_titles: |
165 | unread: 'รายการที่ไม่ได้อ่าน' | 166 | unread: 'รายการที่ไม่ได้อ่าน' |
166 | starred: 'รายการที่แสดง' | 167 | starred: 'รายการที่แสดง' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 0fd6e989..5c95fe63 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -161,6 +161,7 @@ config: | |||
161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' | 161 | # notmatches: 'Tests that a <i>subject</i> is not matches a <i>search</i> (case-insensitive).<br />Example: <code>title notmatches "football"</code>' |
162 | 162 | ||
163 | entry: | 163 | entry: |
164 | default_title: 'Makalenin başlığı' | ||
164 | page_titles: | 165 | page_titles: |
165 | # unread: 'Unread entries' | 166 | # unread: 'Unread entries' |
166 | # starred: 'Starred entries' | 167 | # starred: 'Starred entries' |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index 12cead48..27c8e8a2 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | {% for entry in entries %} | 39 | {% for entry in entries %} |
40 | <div id="entry-{{ entry.id|e }}" class="{% if listMode == 0 %}entry{% else %}listmode entry{% endif %}"> | 40 | <div id="entry-{{ entry.id|e }}" class="{% if listMode == 0 %}entry{% else %}listmode entry{% endif %}"> |
41 | <h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|e|raw }}">{{ entry.title|e|raw }}</a></h2> | 41 | <h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|e|raw }}">{{ entry.title | striptags | truncate(80, true, '…') | raw | default('entry.default_title'|trans) }}</a></h2> |
42 | 42 | ||
43 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} | 43 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} |
44 | <div class="estimatedTime"> | 44 | <div class="estimatedTime"> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index 7ff24dfd..f18e32ca 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig | |||
@@ -1,11 +1,11 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title %}{{ entry.title|e|raw }} ({{ entry.domainName|removeWww }}){% endblock %} | 3 | {% block title %}{{ entry.title|e|raw|default('entry.default_title'|trans) }} ({{ entry.domainName|removeWww }}){% endblock %} |
4 | 4 | ||
5 | {% block content %} | 5 | {% block content %} |
6 | <div id="article"> | 6 | <div id="article"> |
7 | <header class="mbm"> | 7 | <header class="mbm"> |
8 | <h1>{{ entry.title|e|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" class="nostyle" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> | 8 | <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> |
9 | </header> | 9 | </header> |
10 | 10 | ||
11 | <div id="article_toolbar"> | 11 | <div id="article_toolbar"> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig new file mode 100644 index 00000000..ab7295d5 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig | |||
@@ -0,0 +1,15 @@ | |||
1 | <div class="card-content"> | ||
2 | {% if withPreview is defined %} | ||
3 | <i class="grey-text text-darken-4 activator material-icons right">more_vert</i> | ||
4 | {% endif %} | ||
5 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title| striptags | e('html_attr') }}" class="card-title dot-ellipsis dot-resize-update"> | ||
6 | {{ entry.title | striptags | truncate(80, true, '…') | raw | default('entry.default_title'|trans) }} | ||
7 | </a> | ||
8 | |||
9 | <div class="{{ subClass|default('original grey-text') }}"> | ||
10 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool grey-text">{{ entry.domainName|removeWww }}</a> | ||
11 | {% if withTags is defined %} | ||
12 | {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags | slice(0, 3), 'listClass': ' hide-on-med-and-down'} only %} | ||
13 | {% endif %} | ||
14 | </div> | ||
15 | </div> | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig index a4958b58..ceb95381 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig | |||
@@ -10,20 +10,7 @@ | |||
10 | <span class="preview" style="background-image: url({{ entry.previewPicture }})"></span> | 10 | <span class="preview" style="background-image: url({{ entry.previewPicture }})"></span> |
11 | </a> | 11 | </a> |
12 | </div> | 12 | </div> |
13 | 13 | {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry} only %} | |
14 | <div class="card-content"> | ||
15 | <span class="card-title dot-ellipsis dot-resize-update"> | ||
16 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title| striptags | e('html_attr') }}"> | ||
17 | {{ entry.title | striptags | truncate(80, true, '…') | raw }} | ||
18 | </a> | ||
19 | </span> | ||
20 | |||
21 | <div class="original grey-text"> | ||
22 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text"> | ||
23 | <span>{{ entry.domainName|removeWww }}</span> | ||
24 | </a> | ||
25 | </div> | ||
26 | </div> | ||
27 | </div> | 14 | </div> |
28 | 15 | ||
29 | {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %} | 16 | {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig index 08f5b0e2..7c83c3bb 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig | |||
@@ -6,24 +6,7 @@ | |||
6 | </a> | 6 | </a> |
7 | {% endif %} | 7 | {% endif %} |
8 | </div> | 8 | </div> |
9 | <div class="card-content"> | 9 | {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withTags': true, 'subClass': 'metadata'} only %} |
10 | <span class="card-title dot-ellipsis dot-resize-update"> | ||
11 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}"> | ||
12 | {{ entry.title| striptags | truncate(120, true, '…') | raw }} | ||
13 | </a> | ||
14 | </span> | ||
15 | |||
16 | <div class="metadata"> | ||
17 | <a href="{{ entry.url|e }}" class="grey-text domain" target="_blank" title="{{ entry.domainName|removeWww }}"> | ||
18 | <span>{{ entry.domainName|removeWww }}</span> | ||
19 | </a> | ||
20 | {% for tag in entry.tags | slice(0, 3) %} | ||
21 | <span class="chip hide-on-med-and-down"> | ||
22 | <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> | ||
23 | </span> | ||
24 | {% endfor %} | ||
25 | </div> | ||
26 | </div> | ||
27 | <ul class="tools-list hide-on-small-only"> | 10 | <ul class="tools-list hide-on-small-only"> |
28 | <li> | 11 | <li> |
29 | <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i></a> | 12 | <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i></a> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig index eb158659..8e6bbae0 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig | |||
@@ -1,25 +1,6 @@ | |||
1 | <div class="card"> | 1 | <div class="card"> |
2 | <div class="card-body"> | 2 | <div class="card-body"> |
3 | <div class="card-content"> | 3 | {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry} only %} |
4 | <span class="card-title dot-ellipsis dot-resize-update"> | ||
5 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}"> | ||
6 | {{ entry.title | striptags | truncate(80, true, '…') | raw }} | ||
7 | </a> | ||
8 | </span> | ||
9 | |||
10 | <div class="original grey-text"> | ||
11 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text"> | ||
12 | <span>{{ entry.domainName|removeWww }}</span> | ||
13 | </a> | ||
14 | </div> | ||
15 | |||
16 | <p>{{ entry.content|striptags|slice(0, 250)|raw }}…</p> | ||
17 | <ul class="card-entry-labels-hidden"> | ||
18 | {% for tag in entry.tags | slice(0, 2) %} | ||
19 | <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li> | ||
20 | {% endfor %} | ||
21 | </ul> | ||
22 | </div> | ||
23 | </div> | 4 | </div> |
24 | 5 | ||
25 | {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %} | 6 | {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig index c77e716b..e93646dc 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig | |||
@@ -10,22 +10,7 @@ | |||
10 | <span class="preview" style="background-image: url({{ entry.previewPicture }})"></span> | 10 | <span class="preview" style="background-image: url({{ entry.previewPicture }})"></span> |
11 | </a> | 11 | </a> |
12 | </div> | 12 | </div> |
13 | 13 | {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withPreview': true} only %} | |
14 | <div class="card-content"> | ||
15 | <i class="grey-text text-darken-4 activator material-icons right">more_vert</i> | ||
16 | |||
17 | <span class="card-title dot-ellipsis dot-resize-update"> | ||
18 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}"> | ||
19 | {{ entry.title | striptags | truncate(80, true, '…') | raw }} | ||
20 | </a> | ||
21 | </span> | ||
22 | |||
23 | <div class="original grey-text"> | ||
24 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text"> | ||
25 | <span>{{ entry.domainName|removeWww }}</span> | ||
26 | </a> | ||
27 | </div> | ||
28 | </div> | ||
29 | </div> | 14 | </div> |
30 | 15 | ||
31 | <div class="card-reveal"> | 16 | <div class="card-reveal"> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig new file mode 100644 index 00000000..144a105e --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig | |||
@@ -0,0 +1,14 @@ | |||
1 | {% if tags is iterable and tags is not empty %} | ||
2 | <ul class="tags{{ listClass|default("")}}"> | ||
3 | {% for tag in tags %} | ||
4 | <li class="chip"> | ||
5 | <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> | ||
6 | {% if withRemove %} | ||
7 | <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')"> | ||
8 | <i class="material-icons vertical-align-middle">delete</i> | ||
9 | </a> | ||
10 | {% endif %} | ||
11 | </li> | ||
12 | {% endfor %} | ||
13 | </ul> | ||
14 | {% endif %} | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index 86588a7b..bebe29a2 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | |||
@@ -1,6 +1,6 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title %}{{ entry.title|striptags|raw }} ({{ entry.domainName|removeWww }}){% endblock %} | 3 | {% block title %}{{ entry.title|striptags|raw|default('entry.default_title'|trans) }} ({{ entry.domainName|removeWww }}){% endblock %} |
4 | 4 | ||
5 | {% block body_class %}entry{% endblock %} | 5 | {% block body_class %}entry{% endblock %} |
6 | 6 | ||
@@ -223,7 +223,7 @@ | |||
223 | {% block content %} | 223 | {% block content %} |
224 | <div id="article"> | 224 | <div id="article"> |
225 | <header class="mbm"> | 225 | <header class="mbm"> |
226 | <h1>{{ entry.title|striptags|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> | 226 | <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> |
227 | </header> | 227 | </header> |
228 | <aside> | 228 | <aside> |
229 | <div class="tools"> | 229 | <div class="tools"> |
@@ -268,16 +268,7 @@ | |||
268 | </li> | 268 | </li> |
269 | {% endif %} | 269 | {% endif %} |
270 | </ul> | 270 | </ul> |
271 | <ul class="tags"> | 271 | {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags, 'withRemove': true} only %} |
272 | {% for tag in entry.tags %} | ||
273 | <li class="chip"> | ||
274 | <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> | ||
275 | <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')"> | ||
276 | <i class="material-icons vertical-align-middle">delete</i> | ||
277 | </a> | ||
278 | </li> | ||
279 | {% endfor %} | ||
280 | </ul> | ||
281 | </div> | 272 | </div> |
282 | 273 | ||
283 | <div class="input-field nav-panel-add-tag" style="display: none"> | 274 | <div class="input-field nav-panel-add-tag" style="display: none"> |