nodebb-theme-persona 12.1.11 → 12.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/library.js CHANGED
@@ -69,6 +69,16 @@ library.defineWidgetAreas = async function (areas) {
69
69
  });
70
70
 
71
71
  areas = areas.concat([
72
+ {
73
+ name: 'Main post header',
74
+ template: 'topic.tpl',
75
+ location: 'mainpost-header',
76
+ },
77
+ {
78
+ name: 'Main post footer',
79
+ template: 'topic.tpl',
80
+ location: 'mainpost-footer',
81
+ },
72
82
  {
73
83
  name: 'Account Header',
74
84
  template: 'account/profile.tpl',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-persona",
3
- "version": "12.1.11",
3
+ "version": "12.1.13",
4
4
  "nbbpm": {
5
5
  "compatibility": "^2.0.0"
6
6
  },
@@ -60,10 +60,9 @@
60
60
  <div class="form-group">
61
61
  <h2 class="h4" for="state">[[flags:state]]</h2>
62
62
  <select class="form-control" id="state" name="state" disabled>
63
- <option value="open">[[flags:state-open]]</option>
64
- <option value="wip">[[flags:state-wip]]</option>
65
- <option value="resolved">[[flags:state-resolved]]</option>
66
- <option value="rejected">[[flags:state-rejected]]</option>
63
+ {{{ each states }}}
64
+ <option value="{@key}">{./label}</option>
65
+ {{{ end }}}
67
66
  </select>
68
67
  </div>
69
68
  <div class="form-group">
@@ -1,3 +1,11 @@
1
+ {{{ if (!./index && widgets.mainpost-header.length) }}}
2
+ <div data-widget-area="mainpost-header">
3
+ {{{ each widgets.mainpost-header }}}
4
+ {widgets.mainpost-header.html}
5
+ {{{ end }}}
6
+ </div>
7
+ {{{ end }}}
8
+
1
9
  <div class="clearfix post-header">
2
10
  <div class="icon pull-left">
3
11
  <a href="<!-- IF posts.user.userslug -->{config.relative_path}/user/{posts.user.userslug}<!-- ELSE -->#<!-- ENDIF posts.user.userslug -->">
@@ -76,7 +84,7 @@
76
84
  </a>
77
85
  {{{ end }}}
78
86
 
79
- <small class="pull-right">
87
+ <small class="pull-right" component="post/actions">
80
88
  <!-- IMPORT partials/topic/reactions.tpl -->
81
89
  <span class="post-tools">
82
90
  <a component="post/reply" href="#" class="no-select <!-- IF !privileges.topics:reply -->hidden<!-- ENDIF !privileges.topics:reply -->">[[topic:reply]]</a>
@@ -103,4 +111,11 @@
103
111
  </small>
104
112
  </div>
105
113
  <div component="post/replies/container"></div>
106
- </div>
114
+ </div>
115
+ {{{ if (!./index && widgets.mainpost-footer.length) }}}
116
+ <div data-widget-area="mainpost-footer">
117
+ {{{ each widgets.mainpost-footer }}}
118
+ {widgets.mainpost-footer.html}
119
+ {{{ end }}}
120
+ </div>
121
+ {{{ end }}}
@@ -71,11 +71,7 @@
71
71
 
72
72
  <!-- IMPORT partials/topic/post.tpl -->
73
73
  </li>
74
- {{{ if (config.topicPostSort != "most_votes") }}}
75
- {{{ each ./events}}}
76
- <!-- IMPORT partials/topic/event.tpl -->
77
- {{{ end }}}
78
- {{{ end }}}
74
+ {renderTopicEvents(@index, config.topicPostSort)}
79
75
  {{{end}}}
80
76
  </ul>
81
77
 
@@ -1,26 +0,0 @@
1
- <li component="topic/event" class="timeline-event" data-topic-event-id="{./id}" data-topic-event-type="{./type}">
2
- <div class="timeline-badge">
3
- <i class="fa {{{ if ./icon }}}{./icon}{{{ else }}}fa-circle{{{ end }}}"></i>
4
- </div>
5
- <span class="timeline-text">
6
- {{{ if ./href}}}
7
- <a href="{config.relative_path}{./href}">{./text}</a>
8
- {{{ else }}}
9
- {./text}
10
- {{{ end }}}
11
- &nbsp;
12
- </span>
13
- {{{ if ./user }}}
14
- {{{ if ./user.system }}}
15
- <span class="timeline-text">[[global:system-user]]</span>&nbsp;
16
- {{{ else }}}
17
- <span><a href="{config.relative_path}/user/{./user.userslug}">{buildAvatar(./user, "xs", true)} &nbsp; {./user.username}</a></span>&nbsp;
18
- {{{ end }}}
19
- {{{ end }}}
20
- <span class="timeago timeline-text" title="{./timestampISO}"></span>
21
-
22
- {{{ if privileges.isAdminOrMod }}}
23
- &nbsp;<span component="topic/event/delete" data-topic-event-id="{./id}" data-topic-event-type="{./type}" class="timeline-text pointer" title="[[topic:delete-event]]"><i class="fa fa-trash"></i></span>
24
- {{{ end }}}
25
- </li>
26
-