]>
Commit | Line | Data |
---|---|---|
cdf85ee7 MT |
1 | {% import ipfire.accounts as accounts %} |
2 | ||
54fe9647 MT |
3 | <div class="user-content {% if "lightningwirelabs.com" in post.tags %}lightning-wire-labs{% end %}"> |
4 | <div class="user-content-header"> | |
53a70dd6 | 5 | <h4 class="card-title"> |
4b2975d2 MT |
6 | <a href="https://blog.ipfire.org/post/{{ post.slug }}"> |
7 | {{ post.title }} | |
8 | </a> | |
53a70dd6 | 9 | </h4> |
f91dfcc7 | 10 | |
4b2975d2 | 11 | <p class="small text-muted"> |
cdf85ee7 MT |
12 | {{ _("by") }} |
13 | ||
14 | {% if isinstance(post.author, accounts.Account) %} | |
c1cec959 | 15 | <a href="/authors/{{ post.author.uid }}">{{ post.author.name }}</a>, |
cdf85ee7 | 16 | {% else %} |
c1cec959 MT |
17 | <strong>{{ post.author }}</strong>, |
18 | {% end %} | |
cdf85ee7 | 19 | |
52de8ae0 | 20 | {% if post.is_published() %} |
b228bd7c MT |
21 | {% if post.updated_at and post.updated_at > post.published_at %} |
22 | {{ locale.format_date(post.published_at, shorter=True, relative=False) }}, | |
23 | {{ _("Updated %s") % locale.format_date(post.updated_at, shorter=True) }} | |
24 | {% else %} | |
25 | {{ locale.format_date(post.published_at, shorter=True, relative=False) }} | |
26 | {% end %} | |
52de8ae0 MT |
27 | {% elif post.published_at %} |
28 | <span class="text-danger">{{ _("Scheduled to be published %s") % locale.format_date(post.published_at, relative=False) }}</span> | |
df157ede MT |
29 | {% else %} |
30 | {{ _("Not published") }} | |
31 | {% end %} | |
4b2975d2 MT |
32 | </p> |
33 | </div> | |
f91dfcc7 | 34 | |
9fa06206 MT |
35 | {% if not post.is_published() and post.is_editable(current_user) %} |
36 | <div class="row"> | |
37 | <div class="col-12 col-md-6 mb-3"> | |
38 | <a class="btn btn-success btn-block" href="/post/{{ post.slug }}/edit"> | |
39 | <span class="fas fa-edit mr-2"></span> {{ _("Edit") }} | |
40 | </a> | |
41 | </div> | |
42 | ||
43 | <div class="col-12 col-md-6 mb-3"> | |
44 | <a class="btn btn-primary btn-block" href="/post/{{ post.slug }}/publish"> | |
45 | <span class="fas fa-book-reader mr-2"></span> {{ _("Publish") }} | |
46 | </a> | |
47 | </div> | |
48 | </div> | |
49 | {% end %} | |
50 | ||
54fe9647 | 51 | <div class="user-content-body"> |
4b2975d2 MT |
52 | {% raw post.html %} |
53 | </div> | |
1e76fec4 | 54 | |
0e7c23da MT |
55 | <div class="btn-toolbar justify-content-center"> |
56 | {% if "lightningwirelabs.com" in post.tags and post.link %} | |
57 | <a class="btn btn-lwl" href="{{ post.link }}"> | |
da69fb12 | 58 | Go to Lightning Wire Labs <span class="fas fa-external-link-alt ml-2"></span> |
0e7c23da MT |
59 | </a> |
60 | {% end %} | |
61 | ||
62 | {% if post.release %} | |
984e4e7b | 63 | <a class="btn btn-primary" href="https://www.ipfire.org/download/{{ post.release.slug }}"> |
aa4ae1a5 | 64 | {{ _("Download") }} |
984e4e7b | 65 | </a> |
ab4c98cf | 66 | {% end %} |
984e4e7b | 67 | |
ab4c98cf | 68 | {% if post.release or "donate" in post.tags %} |
984e4e7b | 69 | <a class="btn btn-outline-primary ml-2" href="https://www.ipfire.org/donate"> |
04e3763d | 70 | <span class="fas fa-heart"></span> {{ _("Donate") }} |
984e4e7b | 71 | </a> |
0e7c23da MT |
72 | {% end %} |
73 | </div> | |
f91dfcc7 | 74 | </div> |