forked from wallabag/wallabag
Move templates
This commit is contained in:
18
templates/Entry/Card/_content.html.twig
Normal file
18
templates/Entry/Card/_content.html.twig
Normal file
@ -0,0 +1,18 @@
|
||||
<div class="card-content">
|
||||
{% if withPreview is defined %}
|
||||
<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|u.truncate(80, '…', false)|default('entry.default_title'|trans)|raw }}
|
||||
</a>
|
||||
|
||||
<div class="{{ subClass|default('original grey-text') }}">
|
||||
<a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool grey-text">{{ entry.domainName|removeWww }}</a>
|
||||
{% if withMetadata is defined %}
|
||||
{% include "Entry/_tags.html.twig" with {'tags': entry.tags|slice(0, 3), 'entryId': entry.id, 'listClass': ' hide-on-med-and-down'} only %}
|
||||
<div class="reading-time grey-text">
|
||||
<div class="card-reading-time">{% include "Entry/_reading_time.html.twig" with {'entry': entry} only %}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
3
templates/Entry/Card/_mass_checkbox.html.twig
Normal file
3
templates/Entry/Card/_mass_checkbox.html.twig
Normal file
@ -0,0 +1,3 @@
|
||||
<label class="entry-checkbox">
|
||||
<input type="checkbox" class="entry-checkbox-input" data-js="entry-checkbox" name="entry-checkbox[]" value="{{ entry.id }}" />
|
||||
</label>
|
||||
26
templates/Entry/_card_actions.html.twig
Normal file
26
templates/Entry/_card_actions.html.twig
Normal file
@ -0,0 +1,26 @@
|
||||
<div class="card-action">
|
||||
<div class="reading-time grey-text">
|
||||
<div class="card-reading-time">{% include "Entry/_reading_time.html.twig" with {'entry': entry} only %}</div>
|
||||
<div class="card-created-at">
|
||||
<i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i>
|
||||
<span> {{ entry.createdAt|date('Y-m-d') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% set current_path = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
|
||||
|
||||
<ul class="tools right">
|
||||
<li>
|
||||
<a title="{{ 'entry.list.show_same_domain'|trans }}" class="tool grey-text" href="{{ path('same_domain', {'id': entry.id, redirect: current_path}) }}" data-action="same_domain" data-entry-id="{{ entry.id }}"><i class="material-icons">language</i></a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', {'id': entry.id, redirect: current_path}) }}" data-action="archived" data-entry-id="{{ entry.id }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i></a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', {'id': entry.id, redirect: current_path}) }}" data-action="star" data-entry-id="{{ entry.id }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="{{ 'entry.list.delete'|trans }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" data-action-confirm="{{ 'entry.confirm.delete'|trans }}" class="tool grey-text delete" href="{{ path('delete_entry', {'id': entry.id, redirect: current_path}) }}" data-action="delete" data-entry-id="{{ entry.id }}"><i class="material-icons">delete</i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
19
templates/Entry/_card_full_image.html.twig
Normal file
19
templates/Entry/_card_full_image.html.twig
Normal file
@ -0,0 +1,19 @@
|
||||
<div class="card entry-card{% if currentRoute in routes and entry.isArchived %} archived{% endif %}">
|
||||
<div class="card-body">
|
||||
<div class="card-fullimage">
|
||||
<ul class="card-entry-labels">
|
||||
{% for tag in entry.tags|slice(0, 3) %}
|
||||
<li title="{{ tag.label }}"><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if app.user.config.displayThumbnails %}
|
||||
<a href="{{ path('view', {'id': entry.id}) }}">
|
||||
<span class="preview" style="background-image: url({{ entry.previewPicture }})"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include "Entry/Card/_content.html.twig" with {'entry': entry} only %}
|
||||
</div>
|
||||
|
||||
{% include "Entry/_card_actions.html.twig" with {'entry': entry} only %}
|
||||
</div>
|
||||
23
templates/Entry/_card_list.html.twig
Normal file
23
templates/Entry/_card_list.html.twig
Normal file
@ -0,0 +1,23 @@
|
||||
<div class="card-stacked{% if currentRoute in routes and entry.isArchived %} archived{% endif %}">
|
||||
{% include "Entry/Card/_mass_checkbox.html.twig" with {'entry': entry} only %}
|
||||
{% if app.user.config.displayThumbnails %}
|
||||
<div class="card-preview">
|
||||
<a href="{{ path('view', {'id': entry.id}) }}">
|
||||
{% set preview_class_modifier = entry.previewPicture ? '' : ' preview--default' %}
|
||||
<span class="preview{{ preview_class_modifier }}" style="background-image: url({{ entry.previewPicture|default(asset('img/logo-square.svg')) }})"></span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include "Entry/Card/_content.html.twig" with {'entry': entry, 'withMetadata': true, 'subClass': 'metadata'} only %}
|
||||
|
||||
{% set current_path = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
|
||||
|
||||
<ul class="tools-list hide-on-small-only">
|
||||
<li>
|
||||
<a title="{{ 'entry.list.show_same_domain'|trans }}" class="tool grey-text" href="{{ path('same_domain', {'id': entry.id, redirect: current_path}) }}"><i class="material-icons">language</i></a>
|
||||
<a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', {'id': entry.id, redirect: current_path}) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i></a>
|
||||
<a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', {'id': entry.id, redirect: current_path}) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
|
||||
<a title="{{ 'entry.list.delete'|trans }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" class="tool grey-text delete" href="{{ path('delete_entry', {'id': entry.id, redirect: current_path}) }}"><i class="material-icons">delete</i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
38
templates/Entry/_card_preview.html.twig
Normal file
38
templates/Entry/_card_preview.html.twig
Normal file
@ -0,0 +1,38 @@
|
||||
<div class="card entry-card{% if currentRoute in routes and entry.isArchived %} archived{% endif %}">
|
||||
{% include "Entry/Card/_mass_checkbox.html.twig" with {'entry': entry} only %}
|
||||
<div class="card-body">
|
||||
<div class="{% if app.user.config.displayThumbnails %}card-image{% endif %} waves-effect waves-block waves-light">
|
||||
<ul class="card-entry-labels">
|
||||
{% for tag in entry.tags|slice(0, 3) %}
|
||||
<li title="{{ tag.label }}"><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if app.user.config.displayThumbnails %}
|
||||
<a href="{{ path('view', {'id': entry.id}) }}">
|
||||
{% set preview_class_modifier = entry.previewPicture ? '' : ' preview--default' %}
|
||||
<span class="preview{{ preview_class_modifier }}" style="background-image: url({{ entry.previewPicture|default(asset('img/logo-square.svg')) }})"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include "Entry/Card/_content.html.twig" with {'entry': entry, 'withPreview': true} only %}
|
||||
</div>
|
||||
|
||||
<div class="card-reveal">
|
||||
<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|u.truncate(80, '…', false)|raw }}
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<p>{{ entry.content|striptags|slice(0, 250)|raw }}…</p>
|
||||
|
||||
<ul class="card-entry-labels-hidden">
|
||||
{% for tag in entry.tags %}
|
||||
<li title="{{ tag.label }}"><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% include "Entry/_card_actions.html.twig" with {'entry': entry} only %}
|
||||
</div>
|
||||
14
templates/Entry/_feed_link.html.twig
Normal file
14
templates/Entry/_feed_link.html.twig
Normal file
@ -0,0 +1,14 @@
|
||||
{% if tag is defined %}
|
||||
{% set feed_route = 'tag_feed' %}
|
||||
{% set slug = tag.slug %}
|
||||
{% elseif current_route in ['homepage', 'unread', 'starred', 'archive', 'all'] %}
|
||||
{% set feed_route = current_route %}
|
||||
{% if current_route == 'homepage' %}
|
||||
{% set feed_route = 'unread' %}
|
||||
{% endif %}
|
||||
{% set feed_route = feed_route ~ '_feed' %}
|
||||
{% set slug = null %}
|
||||
{% endif %}
|
||||
{% if feed_route is defined %}
|
||||
<a rel="alternate" type="application/atom+xml" href="{{ path(feed_route, {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': slug}) }}" class="results-item"><i class="material-icons">rss_feed</i></a>
|
||||
{% endif %}
|
||||
7
templates/Entry/_reading_time.html.twig
Normal file
7
templates/Entry/_reading_time.html.twig
Normal file
@ -0,0 +1,7 @@
|
||||
{% set reading_time = entry.readingTime / app.user.config.readingSpeed * 200 %}
|
||||
<i class="material-icons grey-text">timer</i>
|
||||
{% if reading_time > 0 %}
|
||||
<span>{{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': reading_time|round}) }}</span>
|
||||
{% else %}
|
||||
<span>{{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}</span>
|
||||
{% endif %}
|
||||
15
templates/Entry/_tags.html.twig
Normal file
15
templates/Entry/_tags.html.twig
Normal file
@ -0,0 +1,15 @@
|
||||
{% if tags is iterable and tags is not empty %}
|
||||
<ul class="tags{{ listClass|default("") }}">
|
||||
{% for tag in tags %}
|
||||
<li class="chip">
|
||||
<a class="chip-label" href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a>
|
||||
{% if withRemove is defined and withRemove == true %}
|
||||
{% set current_path = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
|
||||
<a class="chip-action" href="{{ path('remove_tag', {'entry': entryId, 'tag': tag.id, redirect: current_path}) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')">
|
||||
<i class="material-icons vertical-align-middle">delete</i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
21
templates/Entry/_title.html.twig
Normal file
21
templates/Entry/_title.html.twig
Normal file
@ -0,0 +1,21 @@
|
||||
{% set current_route = app.request.attributes.get('_route') %}
|
||||
|
||||
{% if current_route == 'starred' %}
|
||||
{{ 'entry.page_titles.starred'|trans }}
|
||||
{% elseif current_route == 'archive' %}
|
||||
{{ 'entry.page_titles.archived'|trans }}
|
||||
{% elseif current_route == 'all' %}
|
||||
{{ isFiltered ? 'entry.page_titles.filtered'|trans : 'entry.page_titles.all'|trans }}
|
||||
{% elseif current_route == 'search' %}
|
||||
{{ 'entry.page_titles.filtered_search'|trans }} {{ filter }}
|
||||
{% elseif current_route == 'tag_entries' %}
|
||||
{{ 'entry.page_titles.filtered_tags'|trans }} {{ filter }}
|
||||
{% elseif current_route == 'untagged' %}
|
||||
{{ 'entry.page_titles.untagged'|trans }}
|
||||
{% elseif current_route == 'same_domain' %}
|
||||
{{ 'entry.page_titles.same_domain'|trans }}
|
||||
{% elseif current_route == 'annotated' %}
|
||||
{{ 'entry.page_titles.with_annotations'|trans }}
|
||||
{% else %}
|
||||
{{ 'entry.page_titles.unread'|trans }}
|
||||
{% endif %}
|
||||
46
templates/Entry/edit.html.twig
Normal file
46
templates/Entry/edit.html.twig
Normal file
@ -0,0 +1,46 @@
|
||||
{% extends "layout.html.twig" %}
|
||||
|
||||
{% block title %}{{ 'entry.edit.page_title'|trans }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card-panel">
|
||||
|
||||
<form name="entry" method="post" action="">
|
||||
<div class="card-content">
|
||||
{% if form_errors(form) %}
|
||||
<span class="black-text">{{ form_errors(form) }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if form_errors(form.title) %}
|
||||
<span class="black-text">{{ form_errors(form.title) }}</span>
|
||||
{% endif %}
|
||||
|
||||
<div class="input-field s12">
|
||||
{{ form_label(form.title) }}
|
||||
{{ form_widget(form.title) }}
|
||||
</div>
|
||||
|
||||
<div class="input-field s12">
|
||||
{{ form_label(form.url) }}
|
||||
{{ form_widget(form.url) }}
|
||||
</div>
|
||||
|
||||
<div class="input-field s12">
|
||||
{{ form_label(form.origin_url) }}
|
||||
{{ form_widget(form.origin_url) }}
|
||||
</div>
|
||||
<br>
|
||||
|
||||
{{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
|
||||
</div>
|
||||
{{ form_rest(form) }}
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
233
templates/Entry/entries.html.twig
Normal file
233
templates/Entry/entries.html.twig
Normal file
@ -0,0 +1,233 @@
|
||||
{% extends "layout.html.twig" %}
|
||||
|
||||
{% block head %}
|
||||
{{ parent() }}
|
||||
{% if tag is defined and app.user.config.feedToken %}
|
||||
<link rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" />
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{% set filter = '' %}
|
||||
{% if tag is defined %}
|
||||
{% set filter = tag.slug %}
|
||||
{% endif %}
|
||||
{% if searchTerm is defined and searchTerm is not empty %}
|
||||
{% set filter = searchTerm %}
|
||||
{% endif %}
|
||||
{% include "Entry/_title.html.twig" with {'filter': filter} %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% set current_path = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
|
||||
{% set list_mode = app.user.config.listMode %}
|
||||
{% set entries_with_archived_class_routes = ['tag_entries', 'search', 'all'] %}
|
||||
{% set current_route = app.request.attributes.get('_route') %}
|
||||
{% if current_route == 'homepage' %}
|
||||
{% set current_route = 'unread' %}
|
||||
{% endif %}
|
||||
<form name="form_mass_action" action="{{ path('mass_action', {redirect: current_path}) }}" method="post">
|
||||
<div class="results">
|
||||
<div class="nb-results">
|
||||
{{ 'entry.list.number_on_the_page'|trans({'%count%': entries.count}) }}
|
||||
{% if entries.count > 0 %}
|
||||
<a class="results-item" href="{{ path('switch_view_mode', {redirect: current_path}) }}"><i class="material-icons">{% if list_mode == 0 %}view_list{% else %}view_module{% endif %}</i></a>
|
||||
{% endif %}
|
||||
{% if entries.count > 0 %}
|
||||
<label for="mass-action-inputs-displayed" class="mass-action-toggle results-item tooltipped" data-position="right" data-delay="50" data-tooltip="{{ 'entry.list.toggle_mass_action'|trans }}"><i class="material-icons">library_add_check</i></label>
|
||||
{% endif %}
|
||||
{% if app.user.config.feedToken %}
|
||||
{% include "Entry/_feed_link.html.twig" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if current_route == 'search' %}<div><a href="{{ path('tag_this_search', {'filter': searchTerm, 'currentRoute': app.request.get('currentRoute'), redirect: current_path}) }}" title="{{ 'entry.list.assign_search_tag'|trans }}">{{ 'entry.list.assign_search_tag'|trans }}</a></div>{% endif %}
|
||||
{% if entries.getNbPages > 1 %}
|
||||
{{ pagerfanta(entries, 'default_wallabag') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if entries.count > 0 %}
|
||||
<input id="mass-action-inputs-displayed" class="toggle-checkbox" type="checkbox" />
|
||||
<div class="mass-action">
|
||||
<div class="mass-action-group">
|
||||
<input type="checkbox" class="entry-checkbox-input" data-toggle="[data-js='entry-checkbox']" data-js="checkboxes-toggle" />
|
||||
<button class="mass-action-button btn cyan darken-1" type="submit" name="toggle-read" title="{{ 'entry.list.toogle_as_read'|trans }}"><i class="material-icons">done</i></button>
|
||||
<button class="mass-action-button btn cyan darken-1" type="submit" name="toggle-star" title="{{ 'entry.list.toogle_as_star'|trans }}" ><i class="material-icons">star</i></button>
|
||||
<button class="mass-action-button btn cyan darken-1" type="submit" name="delete" onclick="return confirm('{{ 'entry.confirm.delete_entries'|trans|escape('js') }}')" title="{{ 'entry.list.delete'|trans }}"><i class="material-icons">delete</i></button>
|
||||
</div>
|
||||
|
||||
<div class="mass-action-tags">
|
||||
<button class="btn cyan darken-1 mass-action-button mass-action-button--tags" type="submit" name="tag" title="{{ 'entry.list.add_tags'|trans }}"><i class="material-icons">label</i></button>
|
||||
<input type="text" class="mass-action-tags-input" name="tags" placeholder="{{ 'entry.list.mass_action_tags_input_placeholder'|trans }}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ol class="entries {% if list_mode == 1 %}collection{% else %}row entries-row data{% endif %}">
|
||||
|
||||
{% for entry in entries %}
|
||||
<li id="entry-{{ entry.id|e }}" class="{% if list_mode != 0 %}col collection-item{% endif %} s12" data-entry-id="{{ entry.id|e }}" data-test="entry">
|
||||
{% if list_mode == 1 %}
|
||||
{% include "Entry/_card_list.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %}
|
||||
{% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %}
|
||||
{% include "Entry/_card_full_image.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %}
|
||||
{% else %}
|
||||
{% include "Entry/_card_preview.html.twig" with {'entry': entry, 'currentRoute': current_route, 'routes': entries_with_archived_class_routes} only %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% endif %}
|
||||
</form>
|
||||
|
||||
{% if entries.getNbPages > 1 %}
|
||||
<div class="results">
|
||||
{{ pagerfanta(entries, 'default_wallabag') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Export -->
|
||||
<div id="export" class="side-nav right-aligned">
|
||||
{% set current_tag = null %}
|
||||
{% if tag is defined %}
|
||||
{% set current_tag = tag.slug %}
|
||||
{% endif %}
|
||||
{% set export_search_term = null %}
|
||||
{% if searchTerm is defined %}
|
||||
{% set export_search_term = searchTerm %}
|
||||
{% endif %}
|
||||
{% set entry = app.request.attributes.get('id') %}
|
||||
{% set previous_route = app.request.attributes.get('currentRoute') %}
|
||||
<h4 class="center">{{ 'entry.list.export_title'|trans }}</h4>
|
||||
<ul>
|
||||
{% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', {'category': current_route, 'format': 'epub', 'tag': current_tag, 'search_entry[term]': export_search_term, 'currentRoute': previous_route, 'entry': entry}) }}">EPUB</a></li>{% endif %}
|
||||
{% if craue_setting('export_pdf') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', {'category': current_route, 'format': 'pdf', 'tag': current_tag, 'search_entry[term]': export_search_term, 'currentRoute': previous_route, 'entry': entry}) }}">PDF</a></li>{% endif %}
|
||||
{% if craue_setting('export_json') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', {'category': current_route, 'format': 'json', 'tag': current_tag, 'search_entry[term]': export_search_term, 'currentRoute': previous_route, 'entry': entry}) }}">JSON</a></li>{% endif %}
|
||||
{% if craue_setting('export_csv') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', {'category': current_route, 'format': 'csv', 'tag': current_tag, 'search_entry[term]': export_search_term, 'currentRoute': previous_route, 'entry': entry}) }}">CSV</a></li>{% endif %}
|
||||
{% if craue_setting('export_txt') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', {'category': current_route, 'format': 'txt', 'tag': current_tag, 'search_entry[term]': export_search_term, 'currentRoute': previous_route, 'entry': entry}) }}">TXT</a></li>{% endif %}
|
||||
{% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', {'category': current_route, 'format': 'xml', 'tag': current_tag, 'search_entry[term]': export_search_term, 'currentRoute': previous_route, 'entry': entry}) }}">XML</a></li>{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- Filters -->
|
||||
{% if form is not null %}
|
||||
<div id="filters" class="side-nav right-aligned">
|
||||
<form action="{{ path('all') }}">
|
||||
|
||||
<h4 class="center">{{ 'entry.filters.title'|trans }}</h4>
|
||||
|
||||
<div class="row">
|
||||
{% if current_route != 'untagged' %}
|
||||
<div class="col s12 center-align">
|
||||
<a href="{{ path('untagged') }}">{{ 'tag.list.see_untagged_entries'|trans }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="col s12">
|
||||
<label>{{ 'entry.filters.status_label'|trans }}</label>
|
||||
</div>
|
||||
|
||||
<div class="input-field col s6 with-checkbox">
|
||||
{{ form_widget(form.isArchived) }}
|
||||
{{ form_label(form.isArchived) }}
|
||||
</div>
|
||||
|
||||
<div class="input-field col s6 with-checkbox">
|
||||
{{ form_widget(form.isStarred) }}
|
||||
{{ form_label(form.isStarred) }}
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12 with-checkbox">
|
||||
{{ form_widget(form.isUnread) }}
|
||||
{{ form_label(form.isUnread) }}
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12 with-checkbox">
|
||||
{{ form_widget(form.isAnnotated) }}
|
||||
{{ form_label(form.isAnnotated) }}
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12 with-checkbox">
|
||||
{{ form_widget(form.isNotParsed) }}
|
||||
{{ form_label(form.isNotParsed) }}
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
<label>{{ 'entry.filters.preview_picture_help'|trans }}</label>
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12 with-checkbox">
|
||||
{{ form_widget(form.previewPicture) }}
|
||||
{{ form_label(form.previewPicture) }}
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
<label>{{ 'entry.filters.is_public_help'|trans }}</label>
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12 with-checkbox">
|
||||
{{ form_widget(form.isPublic) }}
|
||||
{{ form_label(form.isPublic) }}
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
{{ form_label(form.language) }}
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12">
|
||||
{{ form_widget(form.language) }}
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
{{ form_label(form.httpStatus) }}
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12">
|
||||
{{ form_widget(form.httpStatus) }}
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
{{ form_label(form.readingTime) }}
|
||||
</div>
|
||||
|
||||
<div class="input-field col s6">
|
||||
{{ form_widget(form.readingTime.left_number, {'type': 'number'}) }}
|
||||
<label for="entry_filter_readingTime_left_number">{{ 'entry.filters.reading_time.from'|trans }}</label>
|
||||
</div>
|
||||
|
||||
<div class="input-field col s6">
|
||||
{{ form_widget(form.readingTime.right_number, {'type': 'number'}) }}
|
||||
<label for="entry_filter_readingTime_right_number">{{ 'entry.filters.reading_time.to'|trans }}</label>
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12">
|
||||
{{ form_widget(form.domainName, {'type': 'text', 'attr': {'placeholder': 'website.com'}}) }}
|
||||
{{ form_label(form.domainName) }}
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
{{ form_label(form.createdAt) }}
|
||||
</div>
|
||||
|
||||
<div class="input-field col s6">
|
||||
{{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value}}) }}
|
||||
<label for="entry_filter_createdAt_left_date" class="active">{{ 'entry.filters.created_at.from'|trans }}</label>
|
||||
</div>
|
||||
<div class="input-field col s6">
|
||||
{{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value}}) }}
|
||||
<label for="entry_filter_createdAt_right_date" class="active">{{ 'entry.filters.created_at.to'|trans }}</label>
|
||||
</div>
|
||||
|
||||
<div class="col s6">
|
||||
<a href="#!" class="center waves-effect waves-green btn-flat" id="clear_form_filters">{{ 'entry.filters.action.clear'|trans }}</a>
|
||||
</div>
|
||||
|
||||
<div class="col s6">
|
||||
<button class="btn waves-effect waves-light" type="submit" id="submit-filter" value="filter">{{ 'entry.filters.action.filter'|trans }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
55
templates/Entry/entries.xml.twig
Normal file
55
templates/Entry/entries.xml.twig
Normal file
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
{% if type != 'tag' %}
|
||||
<title>wallabag — {{ type }} feed</title>
|
||||
<subtitle type="html">Atom feed for {{ type }} entries</subtitle>
|
||||
<id>wallabag:{{ domainName|removeScheme|removeWww }}:{{ user }}:{{ type }}</id>
|
||||
<link rel="alternate" type="text/html" href="{{ url(type) }}"/>
|
||||
{% else %}
|
||||
<id>wallabag:{{ domainName|removeScheme|removeWww }}:{{ user }}:{{ type }}:{{ tag }}</id>
|
||||
<link rel="alternate" type="text/html" href="{{ url('tag_entries', {'slug': tag}) }}"/>
|
||||
<title>wallabag — {{ type }} {{ tag }} feed</title>
|
||||
<subtitle type="html">Atom feed for entries tagged with {{ tag }}</subtitle>
|
||||
{% endif %}
|
||||
{% if updated %}
|
||||
<updated>{{ updated|date('c') }}</updated> {# Indicates the last time the feed was modified in a significant way. #}
|
||||
{% endif %}
|
||||
<link rel="self" type="application/atom+xml" href="{{ app.request.uri }}"/>
|
||||
{% if entries.hasPreviousPage %}
|
||||
<link rel="previous" href="{{ url }}/{{ entries.previousPage }}"/>
|
||||
{% endif -%}
|
||||
{% if entries.hasNextPage %}
|
||||
<link rel="next" href="{{ url }}/{{ entries.nextPage }}"/>
|
||||
{% endif -%}
|
||||
<link rel="last" href="{{ url }}/{{ entries.nbPages }}"/>
|
||||
<generator uri="https://wallabag.org" version="{{ version }}">wallabag</generator>
|
||||
<author>
|
||||
<name>{{ user }}</name>
|
||||
</author>
|
||||
<icon>{{ asset('favicon.ico') }}</icon>
|
||||
<logo>{{ asset('bundles/wallabagcore/themes/_global/img/logo-square.png') }}</logo>
|
||||
{% for entry in entries %}
|
||||
<entry>
|
||||
<title><![CDATA[{{ entry.title|e }}]]></title>
|
||||
<link href="{{ entry.url }}"/>
|
||||
<link rel="alternate" type="text/html"
|
||||
href="{{ url('view', {'id': entry.id}) }}"/>
|
||||
<link rel="via"
|
||||
href="{{ entry.url }}"/>
|
||||
<id>wallabag:{{ domainName|removeScheme|removeWww }}:{{ user }}:entry:{{ entry.id }}</id>
|
||||
<updated>{{ entry.updatedAt|date('c') }}</updated>
|
||||
<published>{{ entry.createdAt|date('c') }}</published>
|
||||
{% for tag in entry.tags %}
|
||||
<category term="{{ tag.slug }}" label="{{ tag.label }}" />
|
||||
{% endfor %}
|
||||
{% for author in entry.publishedBy %}
|
||||
<author>
|
||||
<name>{{ author }}</name>
|
||||
</author>
|
||||
{% endfor %}
|
||||
<content type="html" {% if entry.language %}xml:lang="{{ entry.language[:2] }}"{% endif %}>
|
||||
<![CDATA[{%- if entry.readingTime > 0 -%}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}{%- else -%}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{%- endif %}{{ entry.content|raw -}}]]>
|
||||
</content>
|
||||
</entry>
|
||||
{% endfor %}
|
||||
</feed>
|
||||
329
templates/Entry/entry.html.twig
Normal file
329
templates/Entry/entry.html.twig
Normal file
@ -0,0 +1,329 @@
|
||||
{% extends "layout.html.twig" %}
|
||||
|
||||
{% block title %}{{ entry.title|striptags|default('entry.default_title'|trans)|raw }} ({{ entry.domainName|removeWww }}){% endblock %}
|
||||
|
||||
{% block body_class %}entry{% endblock %}
|
||||
|
||||
{% set current_path = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
|
||||
|
||||
{% block menu %}
|
||||
<div class="progress">
|
||||
<div class="determinate"></div>
|
||||
</div>
|
||||
<nav class="hide-on-large-only js-entry-nav-top">
|
||||
<div class="nav-panel-item cyan darken-1">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#" data-activates="slide-out" class="button-collapse">
|
||||
<i class="material-icons">menu</i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="waves-effect" href="{{ path('homepage') }}">
|
||||
<i class="material-icons">arrow_back</i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="right">
|
||||
<li>
|
||||
<a class="waves-effect" title="{{ 'entry.view.left_menu.set_as_read'|trans }}" href="{{ path('archive_entry', {'id': entry.id, redirect: current_path}) }}" id="markAsRead">
|
||||
<i class="material-icons small">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="waves-effect" title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" href="{{ path('star_entry', {'id': entry.id, redirect: current_path}) }}" id="setFav">
|
||||
<i class="material-icons small">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<ul id="slide-out" class="left-bar collapsible side-nav fixed reader-mode" data-collapsible="accordion">
|
||||
<li class="bold border-bottom hide-on-med-and-down">
|
||||
<a class="waves-effect collapsible-header" href="{{ path('homepage') }}">
|
||||
<i class="material-icons small">arrow_back</i>
|
||||
<span>{{ 'entry.view.left_menu.back_to_homepage'|trans }}</span>
|
||||
</a>
|
||||
<div class="collapsible-body"></div>
|
||||
</li>
|
||||
|
||||
<li class="bold border-bottom hide-on-med-and-down">
|
||||
<a class="waves-effect collapsible-header original" href="{{ entry.url|e }}" target="_blank" rel="noopener">
|
||||
<i class="material-icons small">link</i>
|
||||
<span>{{ 'entry.view.left_menu.view_original_article'|trans }}</span>
|
||||
</a>
|
||||
<div class="collapsible-body"></div>
|
||||
</li>
|
||||
|
||||
<li class="bold">
|
||||
<a class="waves-effect collapsible-header" onclick="return confirm('{{ 'entry.confirm.reload'|trans|escape('js') }}')" title="{{ 'entry.view.left_menu.re_fetch_content'|trans }}" href="{{ path('reload_entry', {'id': entry.id}) }}" id="reload">
|
||||
<i class="material-icons small">refresh</i>
|
||||
<span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span>
|
||||
</a>
|
||||
<div class="collapsible-body"></div>
|
||||
</li>
|
||||
|
||||
{% set mark_as_read_label = 'entry.view.left_menu.set_as_unread' %}
|
||||
{% if entry.isArchived == 0 %}
|
||||
{% set mark_as_read_label = 'entry.view.left_menu.set_as_read' %}
|
||||
{% endif %}
|
||||
|
||||
<li class="bold hide-on-med-and-down">
|
||||
<a class="waves-effect collapsible-header markasread" title="{{ mark_as_read_label|trans }}" href="{{ path('archive_entry', {'id': entry.id, redirect: current_path}) }}" id="markAsRead">
|
||||
<i class="material-icons small">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i>
|
||||
<span>{{ mark_as_read_label|trans }}</span>
|
||||
</a>
|
||||
<div class="collapsible-body"></div>
|
||||
</li>
|
||||
|
||||
<li class="bold hide-on-med-and-down">
|
||||
<a class="waves-effect collapsible-header favorite" title="{{ 'entry.view.left_menu.set_as_starred'|trans }}" href="{{ path('star_entry', {'id': entry.id, redirect: current_path}) }}" id="setFav">
|
||||
<i class="material-icons spall">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i>
|
||||
<span>{{ 'entry.view.left_menu.set_as_starred'|trans }}</span>
|
||||
</a>
|
||||
<div class="collapsible-body"></div>
|
||||
</li>
|
||||
<li class="bold border-bottom">
|
||||
<a class="waves-effect collapsible-header delete" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" title="{{ 'entry.view.left_menu.delete'|trans }}" href="{{ path('delete_entry', {'id': entry.id, redirect: current_path}) }}">
|
||||
<i class="material-icons small">delete</i>
|
||||
<span>{{ 'entry.view.left_menu.delete'|trans }}</span>
|
||||
</a>
|
||||
<div class="collapsible-body"></div>
|
||||
</li>
|
||||
|
||||
<li class="bold border-bottom">
|
||||
<a class="waves-effect collapsible-header" id="nav-btn-add-tag">
|
||||
<i class="material-icons small">label_outline</i>
|
||||
<span>{{ 'entry.view.left_menu.add_a_tag'|trans }}</span>
|
||||
</a>
|
||||
<div class="collapsible-body"></div>
|
||||
</li>
|
||||
|
||||
<li class="bold">
|
||||
<a class="waves-effect collapsible-header">
|
||||
<i class="material-icons small">brightness_medium</i>
|
||||
<span>{{ 'entry.view.left_menu.theme_toggle'|trans }}</span>
|
||||
</a>
|
||||
<ul class="collapsible-body">
|
||||
<li>
|
||||
<a href="#" class="js-theme-toggle" data-theme="light">
|
||||
<i class="theme-toggle-icon material-icons tiny">brightness_high</i>
|
||||
<span>{{ 'entry.view.left_menu.theme_toggle_light'|trans }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="js-theme-toggle" data-theme="dark">
|
||||
<i class="theme-toggle-icon material-icons tiny">brightness_low</i>
|
||||
<span>{{ 'entry.view.left_menu.theme_toggle_dark'|trans }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="js-theme-toggle" data-theme="auto">
|
||||
<i class="theme-toggle-icon material-icons tiny">brightness_auto</i>
|
||||
<span>{{ 'entry.view.left_menu.theme_toggle_auto'|trans }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{% if craue_setting('share_public') or craue_setting('share_twitter') or craue_setting('share_shaarli') or craue_setting('share_diaspora') or craue_setting('share_unmark') or craue_setting('share_mail') %}
|
||||
<li class="bold">
|
||||
<a class="waves-effect collapsible-header">
|
||||
<i class="material-icons small">share</i>
|
||||
<span>{{ 'entry.view.left_menu.share_content'|trans }}</span>
|
||||
</a>
|
||||
<div class="collapsible-body">
|
||||
<ul>
|
||||
{% if craue_setting('share_public') %}
|
||||
<li>
|
||||
<a href="{{ path('share', {'id': entry.id}) }}" target="_blank" title="{{ 'entry.view.left_menu.public_link'|trans }}" class="tool icon-eye">
|
||||
<span>{{ 'entry.view.left_menu.public_link'|trans }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('delete_share', {'id': entry.id}) }}" title="{{ 'entry.view.left_menu.delete_public_link'|trans }}" class="tool icon-no-eye">
|
||||
<span>{{ 'entry.view.left_menu.delete_public_link'|trans }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if craue_setting('share_twitter') %}
|
||||
<li>
|
||||
<a href="https://twitter.com/share?text={{ entry.title|striptags|url_encode }}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" rel="noopener" class="tool icon-twitter" title="twitter">
|
||||
<span>twitter</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if craue_setting('share_shaarli') %}
|
||||
<li>
|
||||
<a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|striptags|url_encode }}&tags={{ entry.tags|join(',')|striptags|url_encode }}{% if craue_setting('shaarli_share_origin_url') %}&original_url={{ entry.originUrl|url_encode }}{% endif %}" target="_blank" rel="noopener" title="shaarli" class="tool icon-image shaarli">
|
||||
<span>shaarli</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if craue_setting('share_diaspora') %}
|
||||
<li>
|
||||
<a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|striptags|url_encode }}&notes=&v=1&noui=1&jump=doclose" target="_blank" rel="noopener" class="tool icon-image diaspora" title="diaspora">
|
||||
<span>diaspora*</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if craue_setting('share_unmark') %}
|
||||
<li>
|
||||
<a href="{{ craue_setting('unmark_url') }}/mark/add?url={{ entry.url|url_encode }}&title={{ entry.title|striptags|url_encode }}&v=6" target="_blank" rel="noopener" class="tool icon-image unmark" title="unmark">
|
||||
<span>unmark.it</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if craue_setting('share_mail') %}
|
||||
<li>
|
||||
<a href="mailto:?subject={{ entry.title|striptags|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" title="{{ 'entry.view.left_menu.share_email_label'|trans }}" class="tool icon">
|
||||
<i class="material-icons vertical-align-middle">mail</i>
|
||||
<span>{{ 'entry.view.left_menu.share_email_label'|trans }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if craue_setting('show_printlink') %}
|
||||
<li class="bold border-bottom hide-on-med-and-down">
|
||||
<a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.print'|trans }}" href="javascript: window.print();">
|
||||
<i class="material-icons small">print</i>
|
||||
<span>{{ 'entry.view.left_menu.print'|trans }}</span>
|
||||
</a>
|
||||
<div class="collapsible-body"></div>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li class="bold border-top border-bottom">
|
||||
<a class="waves-effect collapsible-header" title="{{ 'menu.top.random_entry'|trans }}" href="{{ path('random_entry', {'type': 'all'}) }}">
|
||||
<i class="material-icons small">casino</i>
|
||||
<span>{{ 'menu.top.random_entry'|trans }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="bold">
|
||||
<a class="waves-effect collapsible-header">
|
||||
<i class="material-icons small">file_download</i>
|
||||
<span>{{ 'entry.view.left_menu.export'|trans }}</span>
|
||||
</a>
|
||||
<div class="collapsible-body">
|
||||
<ul>
|
||||
{% if craue_setting('export_epub') %}<li><a href="{{ path('export_entry', {'id': entry.id, 'format': 'epub'}) }}" title="Generate ePub file">EPUB</a></li>{% endif %}
|
||||
{% if craue_setting('export_pdf') %}<li><a href="{{ path('export_entry', {'id': entry.id, 'format': 'pdf'}) }}" title="Generate PDF file">PDF</a></li>{% endif %}
|
||||
{% if craue_setting('export_csv') %}<li><a href="{{ path('export_entry', {'id': entry.id, 'format': 'csv'}) }}" title="Generate CSV file">CSV</a></li>{% endif %}
|
||||
{% if craue_setting('export_json') %}<li><a href="{{ path('export_entry', {'id': entry.id, 'format': 'json'}) }}" title="Generate JSON file">JSON</a></li>{% endif %}
|
||||
{% if craue_setting('export_txt') %}<li><a href="{{ path('export_entry', {'id': entry.id, 'format': 'txt'}) }}" title="Generate TXT file">TXT</a></li>{% endif %}
|
||||
{% if craue_setting('export_xml') %}<li><a href="{{ path('export_entry', {'id': entry.id, 'format': 'xml'}) }}" title="Generate XML file">XML</a></li>{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="bold">
|
||||
<a class="waves-effect collapsible-header" href="mailto:siteconfig@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{{ 'entry.view.left_menu.problem.description'|trans }}">
|
||||
<i class="material-icons small">error</i>
|
||||
<span>{{ 'entry.view.left_menu.problem.label'|trans }}</span>
|
||||
</a>
|
||||
<div class="collapsible-body"></div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="article" class="article">
|
||||
<header class="mbm">
|
||||
<h1><span{% if entry.language is defined and entry.language is not null %} lang="{{ entry.getHTMLLanguage() }}"{% endif %}>{{ entry.title|striptags|default('entry.default_title'|trans)|raw }}</span> <a class="title-edit" href="{{ path('edit', {'id': entry.id}) }}" title="{{ 'entry.view.edit_title'|trans }}"><i class="material-icons grey-text">create</i></a></h1>
|
||||
</header>
|
||||
<aside class="entry-info">
|
||||
<div class="tools entry-tools grey-text" dir="auto">
|
||||
<ul class="stats">
|
||||
<li>
|
||||
{% include "Entry/_reading_time.html.twig" with {'entry': entry} only %}
|
||||
</li>
|
||||
<li>
|
||||
<i class="material-icons grey-text" title="{{ 'entry.view.created_at'|trans }}">today</i>
|
||||
{{ entry.createdAt|date('Y-m-d H:i') }}
|
||||
</li>
|
||||
{% if entry.publishedAt is not null %}
|
||||
<li>
|
||||
<i class="material-icons grey-text" title="{{ 'entry.view.published_at'|trans }}">create</i>
|
||||
{{ entry.publishedAt|date('Y-m-d H:i') }}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if entry.publishedBy is not empty %}
|
||||
<li>
|
||||
<i class="material-icons grey-text" title="{{ 'entry.view.published_by'|trans }}">person</i>
|
||||
{% for author in entry.publishedBy %}
|
||||
{{ author|raw }}{% if not loop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<i class="material-icons grey-text">link</i>
|
||||
<a href="{{ entry.url|e }}" target="_blank" rel="noopener" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|striptags }}" class="tool grey-text">
|
||||
{{ entry.domainName|removeWww }}
|
||||
</a>
|
||||
</li>
|
||||
{% if entry.annotations|length %}
|
||||
<li>
|
||||
<i class="material-icons grey-text">comment</i>
|
||||
{{ 'entry.view.annotations_on_the_entry'|trans({'%count%': entry.annotations|length}) }}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if entry.originUrl is not empty %}
|
||||
<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" data-tests="entry-origin-url">
|
||||
{{ entry.originUrl|striptags|removeSchemeAndWww|u.truncate(32) }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% include "Entry/_tags.html.twig" with {'tags': entry.tags, 'entryId': entry.id, 'withRemove': true} only %}
|
||||
</div>
|
||||
|
||||
<div class="input-field nav-panel-add-tag" style="display: none">
|
||||
{{ render(controller('Wallabag\\CoreBundle\\Controller\\TagController::addTagFormAction', {'id': entry.id})) }}
|
||||
</div>
|
||||
|
||||
</aside>
|
||||
<article{% if entry.language is defined and entry.language is not null %} lang="{{ entry.getHTMLLanguage() }}"{% endif %}>
|
||||
{{ entry.content|raw }}
|
||||
</article>
|
||||
|
||||
<div class="fixed-action-btn js-fixed-action-btn horizontal click-to-toggle hide-on-large-only">
|
||||
<a class="btn-floating btn-large" data-toggle="actions">
|
||||
<i class="material-icons">menu</i>
|
||||
</a>
|
||||
<ul>
|
||||
<li><a class="btn-floating" href="{{ path('archive_entry', {'id': entry.id, redirect: current_path}) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i></a></li>
|
||||
<li><a class="btn-floating" href="{{ path('star_entry', {'id': entry.id, redirect: current_path}) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_outline{% else %}star{% endif %}</i></a></li>
|
||||
<li><a class="btn-floating" href="{{ path('delete_entry', {'id': entry.id, redirect: current_path}) }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')"><i class="material-icons">delete</i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script id="annotationroutes" type="application/json">
|
||||
{
|
||||
"prefix": "",
|
||||
"urls": {
|
||||
"create": "{{ path('annotations_post_annotation', {'entry': entry.id}) }}",
|
||||
"update": "{{ path('annotations_put_annotation', {'annotation': 'idAnnotation'}) }}",
|
||||
"destroy": "{{ path('annotations_delete_annotation', {'annotation': 'idAnnotation'}) }}",
|
||||
"search": "{{ path('annotations_get_annotations', {'entry': entry.id}) }}"
|
||||
},
|
||||
"entryId": "{{ entry.id }}"
|
||||
}</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
|
||||
<style>
|
||||
{{ app.user.config.customCSS|raw }}
|
||||
</style>
|
||||
|
||||
{% endblock %}
|
||||
6
templates/Entry/new.html.twig
Normal file
6
templates/Entry/new.html.twig
Normal file
@ -0,0 +1,6 @@
|
||||
{% extends "layout.html.twig" %}
|
||||
|
||||
{% block title %}{{ 'entry.new.page_title'|trans }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
15
templates/Entry/new_form.html.twig
Normal file
15
templates/Entry/new_form.html.twig
Normal file
@ -0,0 +1,15 @@
|
||||
<form class="input-field nav-panel-item nav-panel-add" style="display: none" name="entry" method="post" action="{{ path('new_entry') }}">
|
||||
{% if form_errors(form) %}
|
||||
<span class="black-text">{{ form_errors(form) }}</span>
|
||||
{% endif %}
|
||||
<button type="submit" class="nav-form-button" aria-label="add"><i class="material-icons add" aria-hidden="true"></i></button>
|
||||
|
||||
{% if form_errors(form.url) %}
|
||||
<span class="black-text">{{ form_errors(form.url) }}</span>
|
||||
{% endif %}
|
||||
|
||||
{{ form_widget(form.url, {'attr': {'autocomplete': 'off', 'placeholder': 'entry.new.placeholder'}}) }}
|
||||
<i class="material-icons close" aria-label="clear" role="button"></i>
|
||||
|
||||
{{ form_rest(form) }}
|
||||
</form>
|
||||
17
templates/Entry/search_form.html.twig
Normal file
17
templates/Entry/search_form.html.twig
Normal file
@ -0,0 +1,17 @@
|
||||
<form class="input-field nav-panel-item nav-panel-search" style="display: none" name="search" method="GET" action="{{ path('search') }}">
|
||||
{% if form_errors(form) %}
|
||||
<span class="black-text">{{ form_errors(form) }}</span>
|
||||
{% endif %}
|
||||
<button type="submit" class="nav-form-button" aria-label="search"><i class="material-icons search" aria-hidden="true"></i></button>
|
||||
|
||||
{% if form_errors(form.term) %}
|
||||
<span class="black-text">{{ form_errors(form.term) }}</span>
|
||||
{% endif %}
|
||||
|
||||
<input type="hidden" name="currentRoute" value="{{ currentRoute }}" />
|
||||
|
||||
{{ form_widget(form.term, {'attr': {'autocomplete': 'off', 'placeholder': 'entry.search.placeholder'}}) }}
|
||||
<i class="material-icons close" aria-label="clear" role="button"></i>
|
||||
|
||||
{{ form_rest(form) }}
|
||||
</form>
|
||||
37
templates/Entry/share.html.twig
Normal file
37
templates/Entry/share.html.twig
Normal file
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ entry.title|e|raw }}</title>
|
||||
<meta name="viewport" content="initial-scale=1.0">
|
||||
<meta property="og:title" content="{{ entry.title|e|raw }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="{{ app.request.uri }}" />
|
||||
{% set picture_path = app.request.schemeAndHttpHost ~ asset('img/logo-wallabag.svg') %}
|
||||
{% if entry.previewPicture is not null %}
|
||||
{% set picture_path = entry.previewPicture %}
|
||||
{% endif %}
|
||||
<meta property="og:image" content="{{ picture_path }}" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:image" content="{{ picture_path }}" />
|
||||
<meta name="twitter:site" content="@wallabagapp" />
|
||||
<meta name="twitter:title" content="{{ entry.title|e|raw }}" />
|
||||
<meta name="twitter:description" content="{{ entry.content|striptags|slice(0, 300)|raw }}…" />
|
||||
{% if app.debug %}
|
||||
<script src="{{ asset('wallassets/public.dev.js') }}"></script>
|
||||
{% else %}
|
||||
<link rel="stylesheet" href="{{ asset('wallassets/public.css') }}">
|
||||
{% endif %}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<header class="block">
|
||||
<h1>{{ entry.title|e|raw }}</h1>
|
||||
<a href="{{ entry.url|e }}" target="_blank" rel="noopener" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e|raw }}" class="tool">{{ entry.domainName|removeWww }}</a>
|
||||
<p class="shared-by">{{ "entry.public.shared_by_wallabag"|trans({'%wallabag_instance%': url('homepage'), '%username%': entry.user.username|escape})|raw }}.</p>
|
||||
</header>
|
||||
<article class="block">
|
||||
{{ entry.content|raw }}
|
||||
</article>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user