]> git.ipfire.org Git - ipfire.org.git/commitdiff
blog: Show better release time for drafts
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Sep 2018 15:19:21 +0000 (16:19 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 1 Sep 2018 15:21:22 +0000 (16:21 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/blog/drafts.html
src/templates/blog/modules/post.html

index f2f1442a2345c6efd0720c666e43d00ab0cdcabe..6fce2dd24a8b3eca45ec63ce88896cc897bef32f 100644 (file)
                                        </strong>
 
                                        <p class="text-muted small">
+                                               {% if post.published_at %}
+                                                       <span class="text-danger">{{ _("Scheduled to be published %s") % locale.format_date(post.published_at, relative=False) }}</span>,
+                                               {% end %}
+
                                                {% if post.updated_at %}
                                                        {{ _("Updated %s") % locale.format_date(post.updated_at) }}
                                                {% else %}
                                                        {{ _("Created %s") % locale.format_date(post.created_at) }}
                                                {% end %}
-
-                                               {% if post.published_at %}
-                                                       <span class="badge badge-primary">
-                                                               {{ _("Scheduled to be pushed at %s") % locale.format_date(post.published_at, shorter=True, relative=False) }}
-                                                       </span>
-                                               {% end %}
                                        </p>
                                {% end %}
                        {% else %}
index c91f86b1ff6886c4d0dab7fde1058e0789ba5a88..d5a0126995194d8c0c8913598c7be321ff3b9667 100644 (file)
                                <strong>{{ post.author }}</strong>,
                        {% end %}
 
-                       {% if post.published_at %}
+                       {% if post.is_published() %}
                                {% if post.updated_at and post.updated_at > post.published_at %}
                                        {{ locale.format_date(post.published_at, shorter=True, relative=False) }},
                                        {{ _("Updated %s") % locale.format_date(post.updated_at, shorter=True) }}
                                {% else %}
                                        {{ locale.format_date(post.published_at, shorter=True, relative=False) }}
                                {% end %}
+                       {% elif post.published_at %}
+                               <span class="text-danger">{{ _("Scheduled to be published %s") % locale.format_date(post.published_at, relative=False) }}</span>
                        {% else %}
                                {{ _("Not published") }}
                        {% end %}