diff options
Diffstat (limited to 'src/Wallabag')
16 files changed, 60 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 7276b437..54f74a14 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -122,6 +122,15 @@ class Entry | |||
122 | private $updatedAt; | 122 | private $updatedAt; |
123 | 123 | ||
124 | /** | 124 | /** |
125 | * @var \DateTime | ||
126 | * | ||
127 | * @ORM\Column(name="published_at", type="datetime", nullable=true) | ||
128 | * | ||
129 | * @Groups({"entries_for_user", "export_all"}) | ||
130 | */ | ||
131 | private $publishedAt; | ||
132 | |||
133 | /** | ||
125 | * @ORM\OneToMany(targetEntity="Wallabag\AnnotationBundle\Entity\Annotation", mappedBy="entry", cascade={"persist", "remove"}) | 134 | * @ORM\OneToMany(targetEntity="Wallabag\AnnotationBundle\Entity\Annotation", mappedBy="entry", cascade={"persist", "remove"}) |
126 | * @ORM\JoinTable | 135 | * @ORM\JoinTable |
127 | * | 136 | * |
@@ -701,4 +710,24 @@ class Entry | |||
701 | 710 | ||
702 | return $this; | 711 | return $this; |
703 | } | 712 | } |
713 | |||
714 | /** | ||
715 | * @return \Datetime | ||
716 | */ | ||
717 | public function getPublishedAt() | ||
718 | { | ||
719 | return $this->publishedAt; | ||
720 | } | ||
721 | |||
722 | /** | ||
723 | * @param \Datetime $publishedAt | ||
724 | * | ||
725 | * @return Entry | ||
726 | */ | ||
727 | public function setPublishedAt(\Datetime $publishedAt) | ||
728 | { | ||
729 | $this->publishedAt = $publishedAt; | ||
730 | |||
731 | return $this; | ||
732 | } | ||
704 | } | 733 | } |
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php index f222dd88..56358665 100644 --- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php | |||
@@ -79,6 +79,10 @@ class ContentProxy | |||
79 | $entry->setContent($html); | 79 | $entry->setContent($html); |
80 | $entry->setHttpStatus(isset($content['status']) ? $content['status'] : ''); | 80 | $entry->setHttpStatus(isset($content['status']) ? $content['status'] : ''); |
81 | 81 | ||
82 | if (isset($content['date']) && null !== $content['date']) { | ||
83 | $entry->setPublishedAt(new \DateTime($content['date'])); | ||
84 | } | ||
85 | |||
82 | $entry->setLanguage(isset($content['language']) ? $content['language'] : ''); | 86 | $entry->setLanguage(isset($content['language']) ? $content['language'] : ''); |
83 | $entry->setMimetype(isset($content['content_type']) ? $content['content_type'] : ''); | 87 | $entry->setMimetype(isset($content['content_type']) ? $content['content_type'] : ''); |
84 | $entry->setReadingTime(Utils::getReadingTime($html)); | 88 | $entry->setReadingTime(Utils::getReadingTime($html)); |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index dfac7a65..a8802efc 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -224,6 +224,7 @@ entry: | |||
224 | original_article: 'original' | 224 | original_article: 'original' |
225 | # annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %count% annotations' | 225 | # annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %count% annotations' |
226 | created_at: 'Oprettelsesdato' | 226 | created_at: 'Oprettelsesdato' |
227 | # published_at: 'Publication date' | ||
227 | new: | 228 | new: |
228 | page_title: 'Gem ny artikel' | 229 | page_title: 'Gem ny artikel' |
229 | placeholder: 'http://website.com' | 230 | placeholder: 'http://website.com' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 0b9df325..fa2b9fcb 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -224,6 +224,7 @@ entry: | |||
224 | original_article: 'original' | 224 | original_article: 'original' |
225 | annotations_on_the_entry: '{0} Keine Anmerkungen|{1} Eine Anmerkung|]1,Inf[ %count% Anmerkungen' | 225 | annotations_on_the_entry: '{0} Keine Anmerkungen|{1} Eine Anmerkung|]1,Inf[ %count% Anmerkungen' |
226 | created_at: 'Erstellungsdatum' | 226 | created_at: 'Erstellungsdatum' |
227 | # published_at: 'Publication date' | ||
227 | new: | 228 | new: |
228 | page_title: 'Neuen Artikel speichern' | 229 | page_title: 'Neuen Artikel speichern' |
229 | placeholder: 'https://website.de' | 230 | placeholder: 'https://website.de' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 2fa3192e..bc2a90a5 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -224,6 +224,7 @@ entry: | |||
224 | original_article: 'original' | 224 | original_article: 'original' |
225 | annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %count% annotations' | 225 | annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %count% annotations' |
226 | created_at: 'Creation date' | 226 | created_at: 'Creation date' |
227 | published_at: 'Publication date' | ||
227 | new: | 228 | new: |
228 | page_title: 'Save new entry' | 229 | page_title: 'Save new entry' |
229 | placeholder: 'http://website.com' | 230 | placeholder: 'http://website.com' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index ce581d89..da516ee8 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -224,6 +224,7 @@ entry: | |||
224 | original_article: 'original' | 224 | original_article: 'original' |
225 | annotations_on_the_entry: '{0} Sin anotaciones|{1} Una anotación|]1,Inf[ %count% anotaciones' | 225 | annotations_on_the_entry: '{0} Sin anotaciones|{1} Una anotación|]1,Inf[ %count% anotaciones' |
226 | created_at: 'Fecha de creación' | 226 | created_at: 'Fecha de creación' |
227 | # published_at: 'Publication date' | ||
227 | new: | 228 | new: |
228 | page_title: 'Guardar un nuevo artículo' | 229 | page_title: 'Guardar un nuevo artículo' |
229 | placeholder: 'http://sitioweb.com' | 230 | placeholder: 'http://sitioweb.com' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 3e3ee12c..0a3bebe4 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -224,6 +224,7 @@ entry: | |||
224 | original_article: 'اصلی' | 224 | original_article: 'اصلی' |
225 | annotations_on_the_entry: '{0} بدون حاشیه|{1} یک حاشیه|]1,Inf[ %nbحاشیه% annotations' | 225 | annotations_on_the_entry: '{0} بدون حاشیه|{1} یک حاشیه|]1,Inf[ %nbحاشیه% annotations' |
226 | created_at: 'زمان ساخت' | 226 | created_at: 'زمان ساخت' |
227 | # published_at: 'Publication date' | ||
227 | new: | 228 | new: |
228 | page_title: 'ذخیرهٔ مقالهٔ تازه' | 229 | page_title: 'ذخیرهٔ مقالهٔ تازه' |
229 | placeholder: 'http://website.com' | 230 | placeholder: 'http://website.com' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 074593a6..468a9af9 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -224,6 +224,7 @@ entry: | |||
224 | original_article: "original" | 224 | original_article: "original" |
225 | annotations_on_the_entry: "{0} Aucune annotation|{1} Une annotation|]1,Inf[ %count% annotations" | 225 | annotations_on_the_entry: "{0} Aucune annotation|{1} Une annotation|]1,Inf[ %count% annotations" |
226 | created_at: "Date de création" | 226 | created_at: "Date de création" |
227 | published_at: "Date de publication" | ||
227 | new: | 228 | new: |
228 | page_title: "Sauvegarder un nouvel article" | 229 | page_title: "Sauvegarder un nouvel article" |
229 | placeholder: "http://website.com" | 230 | placeholder: "http://website.com" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 0d86756a..e7b0ea8a 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -224,6 +224,7 @@ entry: | |||
224 | original_article: 'originale' | 224 | original_article: 'originale' |
225 | annotations_on_the_entry: '{0} Nessuna annotazione|{1} Una annotazione|]1,Inf[ %count% annotazioni' | 225 | annotations_on_the_entry: '{0} Nessuna annotazione|{1} Una annotazione|]1,Inf[ %count% annotazioni' |
226 | created_at: 'Data di creazione' | 226 | created_at: 'Data di creazione' |
227 | # published_at: 'Publication date' | ||
227 | new: | 228 | new: |
228 | page_title: 'Salva un nuovo contenuto' | 229 | page_title: 'Salva un nuovo contenuto' |
229 | placeholder: 'http://website.com' | 230 | placeholder: 'http://website.com' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index d2949c50..1937dfce 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -224,6 +224,7 @@ entry: | |||
224 | original_article: 'original' | 224 | original_article: 'original' |
225 | annotations_on_the_entry: "{0} Pas cap d'anotacion|{1} Una anotacion|]1,Inf[ %count% anotacions" | 225 | annotations_on_the_entry: "{0} Pas cap d'anotacion|{1} Una anotacion|]1,Inf[ %count% anotacions" |
226 | created_at: 'Data de creacion' | 226 | created_at: 'Data de creacion' |
227 | # published_at: 'Publication date' | ||
227 | new: | 228 | new: |
228 | page_title: 'Enregistrar un novèl article' | 229 | page_title: 'Enregistrar un novèl article' |
229 | placeholder: 'http://website.com' | 230 | placeholder: 'http://website.com' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 1f512942..cb644045 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -224,6 +224,7 @@ entry: | |||
224 | original_article: 'oryginalny' | 224 | original_article: 'oryginalny' |
225 | annotations_on_the_entry: '{0} Nie ma adnotacji |{1} Jedna adnotacja |]1,Inf[ %count% adnotacji' | 225 | annotations_on_the_entry: '{0} Nie ma adnotacji |{1} Jedna adnotacja |]1,Inf[ %count% adnotacji' |
226 | created_at: 'Czas stworzenia' | 226 | created_at: 'Czas stworzenia' |
227 | # published_at: 'Publication date' | ||
227 | new: | 228 | new: |
228 | page_title: 'Zapisz nowy wpis' | 229 | page_title: 'Zapisz nowy wpis' |
229 | placeholder: 'http://website.com' | 230 | placeholder: 'http://website.com' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index 2e815230..16803549 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml | |||
@@ -224,6 +224,7 @@ entry: | |||
224 | original_article: 'original' | 224 | original_article: 'original' |
225 | annotations_on_the_entry: '{0} Sem anotações|{1} Uma anotação|]1,Inf[ %nbAnnotations% anotações' | 225 | annotations_on_the_entry: '{0} Sem anotações|{1} Uma anotação|]1,Inf[ %nbAnnotations% anotações' |
226 | created_at: 'Data de criação' | 226 | created_at: 'Data de criação' |
227 | # published_at: 'Publication date' | ||
227 | new: | 228 | new: |
228 | page_title: 'Salvar nova entrada' | 229 | page_title: 'Salvar nova entrada' |
229 | placeholder: 'http://website.com' | 230 | placeholder: 'http://website.com' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 16401efd..539482f8 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -224,6 +224,7 @@ entry: | |||
224 | original_article: 'original' | 224 | original_article: 'original' |
225 | # annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %count% annotations' | 225 | # annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %count% annotations' |
226 | created_at: 'Data creării' | 226 | created_at: 'Data creării' |
227 | # published_at: 'Publication date' | ||
227 | new: | 228 | new: |
228 | page_title: 'Salvează un nou articol' | 229 | page_title: 'Salvează un nou articol' |
229 | placeholder: 'http://website.com' | 230 | placeholder: 'http://website.com' |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index a4bf7dfe..a3e1cca7 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -224,6 +224,7 @@ entry: | |||
224 | original_article: 'orijinal' | 224 | original_article: 'orijinal' |
225 | # annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %count% annotations' | 225 | # annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %count% annotations' |
226 | created_at: 'Oluşturulma tarihi' | 226 | created_at: 'Oluşturulma tarihi' |
227 | # published_at: 'Publication date' | ||
227 | new: | 228 | new: |
228 | page_title: 'Yeni makaleyi kaydet' | 229 | page_title: 'Yeni makaleyi kaydet' |
229 | placeholder: 'http://website.com' | 230 | placeholder: 'http://website.com' |
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 5d5e6dd8..8bc7b54c 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 | |||
@@ -44,9 +44,15 @@ | |||
44 | 44 | ||
45 | <div id="article-informations"> | 45 | <div id="article-informations"> |
46 | <i class="tool icon icon-calendar" title="{{ 'entry.view.created_at'|trans }}"> | 46 | <i class="tool icon icon-calendar" title="{{ 'entry.view.created_at'|trans }}"> |
47 | {{ entry.createdAt|date('Y-m-d') }} | 47 | {{ entry.createdAt|date('Y-m-d H:i') }} |
48 | </i> | 48 | </i> |
49 | 49 | ||
50 | {% if entry.publishedAt is not null %} | ||
51 | <i class="tool icon icon-pencil2" title="{{ 'entry.view.published_at'|trans }}"> | ||
52 | {{ entry.publishedAt|date('Y-m-d H:i') }} | ||
53 | </i> | ||
54 | {% endif %} | ||
55 | |||
50 | <i class="tool icon icon-time"> | 56 | <i class="tool icon icon-time"> |
51 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} | 57 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} |
52 | {% if readingTime > 0 %} | 58 | {% if readingTime > 0 %} |
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 8e60e2b4..c72a22c0 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 | |||
@@ -138,7 +138,7 @@ | |||
138 | <span>scuttle</span> | 138 | <span>scuttle</span> |
139 | </a> | 139 | </a> |
140 | </li> | 140 | </li> |
141 | {% endif %} | 141 | {% endif %} |
142 | {% if craue_setting('share_diaspora') %} | 142 | {% if craue_setting('share_diaspora') %} |
143 | <li> | 143 | <li> |
144 | <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"> | 144 | <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"> |
@@ -226,8 +226,14 @@ | |||
226 | </li> | 226 | </li> |
227 | <li> | 227 | <li> |
228 | <i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i> | 228 | <i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i> |
229 | {{ entry.createdAt|date('Y-m-d') }} | 229 | {{ entry.createdAt|date('Y-m-d H:i') }} |
230 | </li> | ||
231 | {% if entry.publishedAt is not null %} | ||
232 | <li> | ||
233 | <i class="material-icons" title="{{ 'entry.view.published_at'|trans }}">create</i> | ||
234 | {{ entry.publishedAt|date('Y-m-d H:i') }} | ||
230 | </li> | 235 | </li> |
236 | {% endif %} | ||
231 | <li> | 237 | <li> |
232 | <i class="material-icons link">link</i> | 238 | <i class="material-icons link">link</i> |
233 | <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|striptags }}" class="tool"> | 239 | <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|striptags }}" class="tool"> |