nodebb-theme-persona 11.2.3 → 11.2.7
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/.eslintrc +3 -0
- package/languages/en-GB/persona.json +1 -2
- package/library.js +25 -32
- package/package.json +9 -1
- package/public/.eslintrc +3 -0
- package/public/modules/quickreply.js +64 -56
- package/templates/login.tpl +78 -62
- package/templates/partials/account/menu.tpl +90 -90
- package/templates/partials/topic/quickreply.tpl +1 -1
- package/templates/register.tpl +73 -57
package/.eslintrc
ADDED
package/library.js
CHANGED
|
@@ -1,43 +1,41 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const meta = require.main.require('./src/meta');
|
|
4
|
+
const user = require.main.require('./src/user');
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const library = module.exports;
|
|
7
7
|
|
|
8
|
-
library.init = function(params
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
callback();
|
|
8
|
+
library.init = async function (params) {
|
|
9
|
+
const { router, middleware } = params;
|
|
10
|
+
const routeHelpers = require.main.require('./src/routes/helpers');
|
|
11
|
+
routeHelpers.setupAdminPageRoute(router, '/admin/plugins/persona', middleware, [], (req, res) => {
|
|
12
|
+
res.render('admin/plugins/persona', {});
|
|
13
|
+
});
|
|
16
14
|
};
|
|
17
15
|
|
|
18
|
-
library.addAdminNavigation = function(header
|
|
16
|
+
library.addAdminNavigation = async function (header) {
|
|
19
17
|
header.plugins.push({
|
|
20
18
|
route: '/plugins/persona',
|
|
21
19
|
icon: 'fa-paint-brush',
|
|
22
|
-
name: 'Persona Theme'
|
|
20
|
+
name: 'Persona Theme',
|
|
23
21
|
});
|
|
24
|
-
|
|
25
|
-
callback(null, header);
|
|
22
|
+
return header;
|
|
26
23
|
};
|
|
27
24
|
|
|
28
|
-
library.defineWidgetAreas = function(areas
|
|
25
|
+
library.defineWidgetAreas = async function (areas) {
|
|
29
26
|
const locations = ['header', 'sidebar', 'footer'];
|
|
30
27
|
const templates = [
|
|
31
28
|
'categories.tpl', 'category.tpl', 'topic.tpl', 'users.tpl',
|
|
32
|
-
'unread.tpl', 'recent.tpl', 'popular.tpl', 'top.tpl', 'tags.tpl', 'tag.tpl'
|
|
29
|
+
'unread.tpl', 'recent.tpl', 'popular.tpl', 'top.tpl', 'tags.tpl', 'tag.tpl',
|
|
30
|
+
'login.tpl', 'register.tpl',
|
|
33
31
|
];
|
|
34
32
|
function capitalizeFirst(str) {
|
|
35
|
-
return str.charAt(0).toUpperCase() + str.slice(1)
|
|
33
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
36
34
|
}
|
|
37
|
-
templates.forEach(template => {
|
|
38
|
-
locations.forEach(location => {
|
|
35
|
+
templates.forEach((template) => {
|
|
36
|
+
locations.forEach((location) => {
|
|
39
37
|
areas.push({
|
|
40
|
-
name: capitalizeFirst(template.split('.')[0])
|
|
38
|
+
name: `${capitalizeFirst(template.split('.')[0])} ${capitalizeFirst(location)}`,
|
|
41
39
|
template: template,
|
|
42
40
|
location: location,
|
|
43
41
|
});
|
|
@@ -46,16 +44,15 @@ library.defineWidgetAreas = function(areas, callback) {
|
|
|
46
44
|
|
|
47
45
|
areas = areas.concat([
|
|
48
46
|
{
|
|
49
|
-
name:
|
|
50
|
-
template:
|
|
51
|
-
location:
|
|
47
|
+
name: 'Account Header',
|
|
48
|
+
template: 'account/profile.tpl',
|
|
49
|
+
location: 'header',
|
|
52
50
|
},
|
|
53
51
|
]);
|
|
54
|
-
|
|
55
|
-
callback(null, areas);
|
|
52
|
+
return areas;
|
|
56
53
|
};
|
|
57
54
|
|
|
58
|
-
library.getThemeConfig = async function(config) {
|
|
55
|
+
library.getThemeConfig = async function (config) {
|
|
59
56
|
const settings = await meta.settings.get('persona');
|
|
60
57
|
config.hideSubCategories = settings.hideSubCategories === 'on';
|
|
61
58
|
config.hideCategoryLastPost = settings.hideCategoryLastPost === 'on';
|
|
@@ -63,10 +60,6 @@ library.getThemeConfig = async function(config) {
|
|
|
63
60
|
return config;
|
|
64
61
|
};
|
|
65
62
|
|
|
66
|
-
function renderAdmin(req, res, next) {
|
|
67
|
-
res.render('admin/plugins/persona', {});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
63
|
library.addUserToTopic = async function (hookData) {
|
|
71
64
|
const settings = await meta.settings.get('persona');
|
|
72
65
|
if (settings.enableQuickReply === 'on') {
|
|
@@ -74,7 +67,7 @@ library.addUserToTopic = async function (hookData) {
|
|
|
74
67
|
const userData = await user.getUserData(hookData.req.user.uid);
|
|
75
68
|
hookData.templateData.loggedInUser = userData;
|
|
76
69
|
} else {
|
|
77
|
-
hookData.templateData.loggedInUser =
|
|
70
|
+
hookData.templateData.loggedInUser = {
|
|
78
71
|
uid: 0,
|
|
79
72
|
username: '[[global:guest]]',
|
|
80
73
|
picture: user.getDefaultAvatar(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodebb-theme-persona",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.7",
|
|
4
4
|
"nbbpm": {
|
|
5
5
|
"compatibility": "^1.18.0"
|
|
6
6
|
},
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/psychobunny/nodebb-theme-persona"
|
|
12
12
|
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"lint": "eslint ."
|
|
15
|
+
},
|
|
13
16
|
"keywords": [
|
|
14
17
|
"nodebb",
|
|
15
18
|
"theme",
|
|
@@ -41,5 +44,10 @@
|
|
|
41
44
|
"dependencies": {
|
|
42
45
|
"pulling": "^2.0.0",
|
|
43
46
|
"striptags": "^3.2.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"eslint": "^7.32.0",
|
|
50
|
+
"eslint-config-nodebb": "^0.0.2",
|
|
51
|
+
"eslint-plugin-import": "^2.24.2"
|
|
44
52
|
}
|
|
45
53
|
}
|
package/public/.eslintrc
ADDED
|
@@ -1,56 +1,64 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/*globals $, app, ajaxify, socket*/
|
|
4
|
-
|
|
5
|
-
define('persona/quickreply', [
|
|
6
|
-
'components', 'composer/autocomplete', 'api'
|
|
7
|
-
], function(components, autocomplete, api) {
|
|
8
|
-
var QuickReply = {};
|
|
9
|
-
|
|
10
|
-
QuickReply.init = function() {
|
|
11
|
-
|
|
12
|
-
var element = components.get('topic/quickreply/text');
|
|
13
|
-
var data = {
|
|
14
|
-
element: element,
|
|
15
|
-
strategies: [],
|
|
16
|
-
options: {
|
|
17
|
-
style: {
|
|
18
|
-
'z-index': 100,
|
|
19
|
-
}
|
|
20
|
-
// listPosition: function(position) {
|
|
21
|
-
// this.$el.css(this._applyPlacement(position));
|
|
22
|
-
// this.$el.css('position', 'absolute');
|
|
23
|
-
// return this;
|
|
24
|
-
// }
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
$(window).trigger('composer:autocomplete:init', data);
|
|
29
|
-
autocomplete._active['persona_qr'] = autocomplete.setup(data);
|
|
30
|
-
// data.element.textcomplete(data.strategies, data.options);
|
|
31
|
-
// $('.textcomplete-wrapper').css('height', '100%').find('textarea').css('height', '100%');
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*globals $, app, ajaxify, socket*/
|
|
4
|
+
|
|
5
|
+
define('persona/quickreply', [
|
|
6
|
+
'components', 'composer/autocomplete', 'api'
|
|
7
|
+
], function(components, autocomplete, api) {
|
|
8
|
+
var QuickReply = {};
|
|
9
|
+
|
|
10
|
+
QuickReply.init = function() {
|
|
11
|
+
|
|
12
|
+
var element = components.get('topic/quickreply/text');
|
|
13
|
+
var data = {
|
|
14
|
+
element: element,
|
|
15
|
+
strategies: [],
|
|
16
|
+
options: {
|
|
17
|
+
style: {
|
|
18
|
+
'z-index': 100,
|
|
19
|
+
}
|
|
20
|
+
// listPosition: function(position) {
|
|
21
|
+
// this.$el.css(this._applyPlacement(position));
|
|
22
|
+
// this.$el.css('position', 'absolute');
|
|
23
|
+
// return this;
|
|
24
|
+
// }
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
$(window).trigger('composer:autocomplete:init', data);
|
|
29
|
+
autocomplete._active['persona_qr'] = autocomplete.setup(data);
|
|
30
|
+
// data.element.textcomplete(data.strategies, data.options);
|
|
31
|
+
// $('.textcomplete-wrapper').css('height', '100%').find('textarea').css('height', '100%');
|
|
32
|
+
|
|
33
|
+
var ready = true;
|
|
34
|
+
components.get('topic/quickreply/button').on('click', function(e) {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
if (!ready) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
var replyMsg = components.get('topic/quickreply/text').val();
|
|
41
|
+
var replyData = {
|
|
42
|
+
tid: ajaxify.data.tid,
|
|
43
|
+
handle: undefined,
|
|
44
|
+
content: replyMsg
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
ready = false;
|
|
48
|
+
api.post(`/topics/${ajaxify.data.tid}`, replyData, function (err, data) {
|
|
49
|
+
ready = true;
|
|
50
|
+
if (err) {
|
|
51
|
+
return app.alertError(err.message);
|
|
52
|
+
}
|
|
53
|
+
if (data && data.queued) {
|
|
54
|
+
app.alertSuccess(data.message);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
components.get('topic/quickreply/text').val('');
|
|
58
|
+
autocomplete._active['persona_qr'].hide();
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return QuickReply;
|
|
64
|
+
});
|
package/templates/login.tpl
CHANGED
|
@@ -1,75 +1,91 @@
|
|
|
1
1
|
<!-- IMPORT partials/breadcrumbs.tpl -->
|
|
2
|
+
<div data-widget-area="header">
|
|
3
|
+
{{{each widgets.header}}}
|
|
4
|
+
{{widgets.header.html}}
|
|
5
|
+
{{{end}}}
|
|
6
|
+
</div>
|
|
7
|
+
<div class="row login">
|
|
8
|
+
<div class="row {{{ if widgets.sidebar.length }}}col-lg-9 col-sm-12{{{ else }}}col-lg-12{{{ end }}}">
|
|
9
|
+
{{{ if allowLocalLogin }}}
|
|
10
|
+
<div class="{{{ if alternate_logins }}}col-md-6{{{ else }}}col-md-12{{{ end }}}">
|
|
11
|
+
<div class="login-block">
|
|
12
|
+
<div class="alert alert-danger" id="login-error-notify" <!-- IF error -->style="display:block"<!-- ELSE -->style="display: none;"<!-- ENDIF error -->>
|
|
13
|
+
<button type="button" class="close" data-dismiss="alert">×</button>
|
|
14
|
+
<strong>[[login:failed_login_attempt]]</strong>
|
|
15
|
+
<p>{error}</p>
|
|
16
|
+
</div>
|
|
2
17
|
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<strong>[[login:failed_login_attempt]]</strong>
|
|
10
|
-
<p>{error}</p>
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<form class="form-horizontal" role="form" method="post" id="login-form">
|
|
14
|
-
<div class="form-group">
|
|
15
|
-
<label for="username" class="col-lg-2 control-label">{allowLoginWith}</label>
|
|
16
|
-
<div class="col-lg-10">
|
|
17
|
-
<input class="form-control" type="text" placeholder="{allowLoginWith}" name="username" id="username" autocorrect="off" autocapitalize="off" value="{username}"/>
|
|
18
|
+
<form class="form-horizontal" role="form" method="post" id="login-form">
|
|
19
|
+
<div class="form-group">
|
|
20
|
+
<label for="username" class="col-lg-2 control-label">{allowLoginWith}</label>
|
|
21
|
+
<div class="col-lg-10">
|
|
22
|
+
<input class="form-control" type="text" placeholder="{allowLoginWith}" name="username" id="username" autocorrect="off" autocapitalize="off" value="{username}"/>
|
|
23
|
+
</div>
|
|
18
24
|
</div>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</
|
|
25
|
+
<div class="form-group">
|
|
26
|
+
<label for="password" class="col-lg-2 control-label">[[user:password]]</label>
|
|
27
|
+
<div class="col-lg-10">
|
|
28
|
+
<input class="form-control" type="password" placeholder="[[user:password]]" name="password" id="password" <!-- IF username -->autocomplete="off"<!-- ENDIF username -->/>
|
|
29
|
+
<p id="caps-lock-warning" class="text-danger hidden">
|
|
30
|
+
<i class="fa fa-exclamation-triangle"></i> [[login:caps-lock-enabled]]
|
|
31
|
+
</p>
|
|
32
|
+
</div>
|
|
27
33
|
</div>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</
|
|
34
|
+
<div class="form-group">
|
|
35
|
+
<div class="col-lg-offset-2 col-lg-10">
|
|
36
|
+
<div class="checkbox">
|
|
37
|
+
<label>
|
|
38
|
+
<input type="checkbox" name="remember" id="remember" checked /> [[login:remember_me]]
|
|
39
|
+
</label>
|
|
40
|
+
</div>
|
|
35
41
|
</div>
|
|
36
42
|
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<div id="login-{loginFormEntry.styleName}" class="col-lg-8">{{loginFormEntry.html}}</div>
|
|
42
|
-
</div>
|
|
43
|
-
{{{end}}}
|
|
44
|
-
<input type="hidden" name="_csrf" value="{config.csrf_token}" />
|
|
45
|
-
<input type="hidden" name="noscript" id="noscript" value="true" />
|
|
46
|
-
<div class="form-group">
|
|
47
|
-
<div class="col-lg-offset-2 col-lg-10">
|
|
48
|
-
<button class="btn btn-primary btn-lg btn-block" id="login" type="submit">[[global:login]]</button>
|
|
49
|
-
<!-- IF allowRegistration -->
|
|
50
|
-
<span>[[login:dont_have_account]] <a href="{config.relative_path}/register">[[register:register]]</a></span>
|
|
51
|
-
<!-- ENDIF allowRegistration -->
|
|
52
|
-
<!-- IF allowPasswordReset -->
|
|
53
|
-
<a id="reset-link" href="{config.relative_path}/reset">[[login:forgot_password]]</a>
|
|
54
|
-
<!-- ENDIF allowPasswordReset -->
|
|
43
|
+
{{{each loginFormEntry}}}
|
|
44
|
+
<div class="form-group loginFormEntry">
|
|
45
|
+
<label for="login-{loginFormEntry.styleName}" class="col-lg-4 control-label">{loginFormEntry.label}</label>
|
|
46
|
+
<div id="login-{loginFormEntry.styleName}" class="col-lg-8">{{loginFormEntry.html}}</div>
|
|
55
47
|
</div>
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
{{{end}}}
|
|
49
|
+
<input type="hidden" name="_csrf" value="{config.csrf_token}" />
|
|
50
|
+
<input type="hidden" name="noscript" id="noscript" value="true" />
|
|
51
|
+
<div class="form-group">
|
|
52
|
+
<div class="col-lg-offset-2 col-lg-10">
|
|
53
|
+
<button class="btn btn-primary btn-lg btn-block" id="login" type="submit">[[global:login]]</button>
|
|
54
|
+
<!-- IF allowRegistration -->
|
|
55
|
+
<span>[[login:dont_have_account]] <a href="{config.relative_path}/register">[[register:register]]</a></span>
|
|
56
|
+
<!-- ENDIF allowRegistration -->
|
|
57
|
+
<!-- IF allowPasswordReset -->
|
|
58
|
+
<a id="reset-link" href="{config.relative_path}/reset">[[login:forgot_password]]</a>
|
|
59
|
+
<!-- ENDIF allowPasswordReset -->
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</form>
|
|
58
63
|
|
|
64
|
+
</div>
|
|
59
65
|
</div>
|
|
60
|
-
|
|
61
|
-
<!-- ENDIF allowLocalLogin -->
|
|
66
|
+
{{{ end }}}
|
|
62
67
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
{{{ if alternate_logins }}}
|
|
69
|
+
<div class="{{{ if allowLocalLogin }}}col-md-6<{{{ else }}}col-md-12{{{ end }}}">
|
|
70
|
+
<div class="alt-login-block">
|
|
71
|
+
<h4>[[login:alternative_logins]]</h4>
|
|
72
|
+
<ul class="alt-logins">
|
|
73
|
+
{{{each authentication}}}
|
|
74
|
+
<li class="{authentication.name}"><a rel="nofollow noopener noreferrer" target="_top" href="{config.relative_path}{authentication.url}"><i class="fa {authentication.icon} fa-3x"></i></a></li>
|
|
75
|
+
{{{end}}}
|
|
76
|
+
</ul>
|
|
77
|
+
</div>
|
|
72
78
|
</div>
|
|
79
|
+
{{{ end }}}
|
|
80
|
+
</div>
|
|
81
|
+
<div data-widget-area="sidebar" class="col-lg-3 col-sm-12 {{{ if !widgets.sidebar.length }}}hidden{{{ end }}}">
|
|
82
|
+
{{{each widgets.sidebar}}}
|
|
83
|
+
{{widgets.sidebar.html}}
|
|
84
|
+
{{{end}}}
|
|
73
85
|
</div>
|
|
74
|
-
<!-- ENDIF alternate_logins -->
|
|
75
86
|
</div>
|
|
87
|
+
<div data-widget-area="footer">
|
|
88
|
+
{{{each widgets.footer}}}
|
|
89
|
+
{{widgets.footer.html}}
|
|
90
|
+
{{{end}}}
|
|
91
|
+
</div>
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
<div class="btn-group account-fab bottom-sheet">
|
|
2
|
-
<button type="button" class="fab dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
3
|
-
<i class="fa fa-ellipsis-v"></i>
|
|
4
|
-
</button>
|
|
5
|
-
<ul class="dropdown-menu dropdown-menu-right">
|
|
6
|
-
<!-- IF loggedIn -->
|
|
7
|
-
<!-- IF !isSelf -->
|
|
8
|
-
<!-- IF !banned -->
|
|
9
|
-
<!-- IF !config.disableChat -->
|
|
10
|
-
<li class="<!-- IF !hasPrivateChat -->hidden<!-- ENDIF !hasPrivateChat -->">
|
|
11
|
-
<a component="account/chat" href="#">[[user:chat_with, {username}]]</a>
|
|
12
|
-
</li>
|
|
13
|
-
<li>
|
|
14
|
-
<a component="account/new-chat" href="#">[[user:new_chat_with, {username}]]</a>
|
|
15
|
-
</li>
|
|
16
|
-
<!-- ENDIF !config.disableChat -->
|
|
17
|
-
<li>
|
|
18
|
-
<a component="account/flag" href="#">[[user:flag-profile]]</a>
|
|
19
|
-
</li>
|
|
20
|
-
<li>
|
|
21
|
-
<a component="account/block" href="#"><!-- IF !../isBlocked -->[[user:block_user]]<!-- ELSE -->[[user:unblock_user]]<!-- END --></a>
|
|
22
|
-
</li>
|
|
23
|
-
<li role="separator" class="divider"></li>
|
|
24
|
-
<!-- ENDIF !banned -->
|
|
25
|
-
<!-- ENDIF !isSelf -->
|
|
26
|
-
<!-- ENDIF loggedIn -->
|
|
27
|
-
<li>
|
|
28
|
-
<a href="{config.relative_path}/user/{userslug}" class="inline-block" id="profile">[[user:profile]]</a>
|
|
29
|
-
</li>
|
|
30
|
-
<!-- IF
|
|
31
|
-
<li><a href="{config.relative_path}/user/{userslug}/edit">[[user:edit]]</a></li>
|
|
32
|
-
<li><a href="{config.relative_path}/user/{userslug}/settings">[[user:settings]]</a></li>
|
|
33
|
-
<!-- ENDIF
|
|
34
|
-
|
|
35
|
-
<!-- IF !isSelf -->
|
|
36
|
-
<!-- IF canBan -->
|
|
37
|
-
<li role="separator" class="divider"></li>
|
|
38
|
-
<li class="dropdown-header">[[user:admin_actions_label]]</li>
|
|
39
|
-
<li class="<!-- IF banned -->hide<!-- ENDIF banned -->">
|
|
40
|
-
<a component="account/ban" href="#">[[user:ban_account]]</a>
|
|
41
|
-
</li>
|
|
42
|
-
<li class="<!-- IF !banned -->hide<!-- ENDIF !banned -->">
|
|
43
|
-
<a component="account/unban" href="#">[[user:unban_account]]</a>
|
|
44
|
-
</li>
|
|
45
|
-
<!-- ENDIF canBan -->
|
|
46
|
-
<!-- IF isAdmin -->
|
|
47
|
-
<li>
|
|
48
|
-
<a component="account/delete-account" href="#" class="">[[user:delete_account_as_admin]]</a>
|
|
49
|
-
<a component="account/delete-content" href="#" class="">[[user:delete_content]]</a>
|
|
50
|
-
<a component="account/delete-all" href="#" class="">[[user:delete_all]]</a>
|
|
51
|
-
</li>
|
|
52
|
-
<!-- ENDIF isAdmin -->
|
|
53
|
-
<!-- ENDIF !isSelf -->
|
|
54
|
-
|
|
55
|
-
<li role="separator" class="divider"></li>
|
|
56
|
-
<li><a href="{config.relative_path}/user/{userslug}/following">[[user:following]] <span class="badge badge-default pull-right formatted-number" title="{counts.following}">{counts.following}</span></a></li>
|
|
57
|
-
<li><a href="{config.relative_path}/user/{userslug}/followers">[[user:followers]] <span class="badge badge-default pull-right formatted-number" title="{counts.followers}">{counts.followers}</span></a></li>
|
|
58
|
-
<!-- IF
|
|
59
|
-
<li><a href="{config.relative_path}/user/{userslug}/blocks">[[user:blocks]] <span class="badge badge-default pull-right formatted-number" title="{counts.blocks}">{counts.blocks}</span></a></li>
|
|
60
|
-
<!-- ENDIF
|
|
61
|
-
<li role="separator" class="divider"></li>
|
|
62
|
-
<li><a href="{config.relative_path}/user/{userslug}/topics">[[global:topics]] <span class="badge badge-default pull-right formatted-number" title="{counts.topics}">{counts.topics}</span></a></li>
|
|
63
|
-
<li><a href="{config.relative_path}/user/{userslug}/posts">[[global:posts]] <span class="badge badge-default pull-right formatted-number" title="{counts.posts}">{counts.posts}</span></a></li>
|
|
64
|
-
<!-- IF !reputation:disabled -->
|
|
65
|
-
<li><a href="{config.relative_path}/user/{userslug}/best">[[global:best]] <span class="badge badge-default pull-right formatted-number" title="{counts.best}">{counts.best}</span></a></li>
|
|
66
|
-
<!-- ENDIF !reputation:disabled -->
|
|
67
|
-
<li><a href="{config.relative_path}/user/{userslug}/groups">[[global:header.groups]] <span class="badge badge-default pull-right formatted-number" title="{counts.groups}">{counts.groups}</span></a></li>
|
|
68
|
-
|
|
69
|
-
<!-- IF
|
|
70
|
-
<li><a href="{config.relative_path}/user/{userslug}/categories">[[user:watched_categories]] <span class="badge badge-default pull-right formatted-number" title="{counts.categoriesWatched}">{counts.categoriesWatched}</span></a></li>
|
|
71
|
-
<li><a href="{config.relative_path}/user/{userslug}/bookmarks">[[user:bookmarks]] <span class="badge badge-default pull-right formatted-number" title="{counts.bookmarks}">{counts.bookmarks}</span></a></li>
|
|
72
|
-
<li><a href="{config.relative_path}/user/{userslug}/watched">[[user:watched]] <span class="badge badge-default pull-right formatted-number" title="{counts.watched}">{counts.watched}</span></a></li>
|
|
73
|
-
<li><a href="{config.relative_path}/user/{userslug}/ignored">[[user:ignored]] <span class="badge badge-default pull-right formatted-number" title="{counts.ignored}">{counts.ignored}</span></a></li>
|
|
74
|
-
<!-- IF !reputation:disabled -->
|
|
75
|
-
<li><a href="{config.relative_path}/user/{userslug}/upvoted">[[global:upvoted]] <span class="badge badge-default pull-right formatted-number" title="{counts.upvoted}">{counts.upvoted}</span></a></li>
|
|
76
|
-
<!-- IF !downvote:disabled -->
|
|
77
|
-
<li><a href="{config.relative_path}/user/{userslug}/downvoted">[[global:downvoted]] <span class="badge badge-default pull-right formatted-number" title="{counts.downvoted}">{counts.downvoted}</span></a></li>
|
|
78
|
-
<!-- ENDIF !downvote:disabled -->
|
|
79
|
-
<!-- ENDIF !reputation:disabled -->
|
|
80
|
-
<li><a href="{config.relative_path}/user/{userslug}/uploads">[[global:uploads]] <span class="badge badge-default pull-right formatted-number" title="{counts.uploaded}">{counts.uploaded}</span></a></li>
|
|
81
|
-
<!-- ENDIF
|
|
82
|
-
|
|
83
|
-
{{{each profile_links}}}
|
|
84
|
-
<!-- IF @first -->
|
|
85
|
-
<li role="separator" class="divider"></li>
|
|
86
|
-
<!-- ENDIF @first -->
|
|
87
|
-
<li id="{profile_links.id}" class="plugin-link <!-- IF profile_links.public -->public<!-- ELSE -->private<!-- ENDIF profile_links.public -->"><a href="{config.relative_path}/user/{userslug}/{profile_links.route}"><!-- IF ../icon --><i class="fa fa-fw {profile_links.icon}"></i> <!-- END -->{profile_links.name}</a></li>
|
|
88
|
-
{{{end}}}
|
|
89
|
-
</ul>
|
|
90
|
-
</div>
|
|
1
|
+
<div class="btn-group account-fab bottom-sheet">
|
|
2
|
+
<button type="button" class="fab dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
3
|
+
<i class="fa fa-ellipsis-v"></i>
|
|
4
|
+
</button>
|
|
5
|
+
<ul class="dropdown-menu dropdown-menu-right">
|
|
6
|
+
<!-- IF loggedIn -->
|
|
7
|
+
<!-- IF !isSelf -->
|
|
8
|
+
<!-- IF !banned -->
|
|
9
|
+
<!-- IF !config.disableChat -->
|
|
10
|
+
<li class="<!-- IF !hasPrivateChat -->hidden<!-- ENDIF !hasPrivateChat -->">
|
|
11
|
+
<a component="account/chat" href="#">[[user:chat_with, {username}]]</a>
|
|
12
|
+
</li>
|
|
13
|
+
<li>
|
|
14
|
+
<a component="account/new-chat" href="#">[[user:new_chat_with, {username}]]</a>
|
|
15
|
+
</li>
|
|
16
|
+
<!-- ENDIF !config.disableChat -->
|
|
17
|
+
<li>
|
|
18
|
+
<a component="account/flag" href="#">[[user:flag-profile]]</a>
|
|
19
|
+
</li>
|
|
20
|
+
<li>
|
|
21
|
+
<a component="account/block" href="#"><!-- IF !../isBlocked -->[[user:block_user]]<!-- ELSE -->[[user:unblock_user]]<!-- END --></a>
|
|
22
|
+
</li>
|
|
23
|
+
<li role="separator" class="divider"></li>
|
|
24
|
+
<!-- ENDIF !banned -->
|
|
25
|
+
<!-- ENDIF !isSelf -->
|
|
26
|
+
<!-- ENDIF loggedIn -->
|
|
27
|
+
<li>
|
|
28
|
+
<a href="{config.relative_path}/user/{userslug}" class="inline-block" id="profile">[[user:profile]]</a>
|
|
29
|
+
</li>
|
|
30
|
+
<!-- IF canEdit -->
|
|
31
|
+
<li><a href="{config.relative_path}/user/{userslug}/edit">[[user:edit]]</a></li>
|
|
32
|
+
<li><a href="{config.relative_path}/user/{userslug}/settings">[[user:settings]]</a></li>
|
|
33
|
+
<!-- ENDIF canEdit -->
|
|
34
|
+
|
|
35
|
+
<!-- IF !isSelf -->
|
|
36
|
+
<!-- IF canBan -->
|
|
37
|
+
<li role="separator" class="divider"></li>
|
|
38
|
+
<li class="dropdown-header">[[user:admin_actions_label]]</li>
|
|
39
|
+
<li class="<!-- IF banned -->hide<!-- ENDIF banned -->">
|
|
40
|
+
<a component="account/ban" href="#">[[user:ban_account]]</a>
|
|
41
|
+
</li>
|
|
42
|
+
<li class="<!-- IF !banned -->hide<!-- ENDIF !banned -->">
|
|
43
|
+
<a component="account/unban" href="#">[[user:unban_account]]</a>
|
|
44
|
+
</li>
|
|
45
|
+
<!-- ENDIF canBan -->
|
|
46
|
+
<!-- IF isAdmin -->
|
|
47
|
+
<li>
|
|
48
|
+
<a component="account/delete-account" href="#" class="">[[user:delete_account_as_admin]]</a>
|
|
49
|
+
<a component="account/delete-content" href="#" class="">[[user:delete_content]]</a>
|
|
50
|
+
<a component="account/delete-all" href="#" class="">[[user:delete_all]]</a>
|
|
51
|
+
</li>
|
|
52
|
+
<!-- ENDIF isAdmin -->
|
|
53
|
+
<!-- ENDIF !isSelf -->
|
|
54
|
+
|
|
55
|
+
<li role="separator" class="divider"></li>
|
|
56
|
+
<li><a href="{config.relative_path}/user/{userslug}/following">[[user:following]] <span class="badge badge-default pull-right formatted-number" title="{counts.following}">{counts.following}</span></a></li>
|
|
57
|
+
<li><a href="{config.relative_path}/user/{userslug}/followers">[[user:followers]] <span class="badge badge-default pull-right formatted-number" title="{counts.followers}">{counts.followers}</span></a></li>
|
|
58
|
+
<!-- IF canEdit -->
|
|
59
|
+
<li><a href="{config.relative_path}/user/{userslug}/blocks">[[user:blocks]] <span class="badge badge-default pull-right formatted-number" title="{counts.blocks}">{counts.blocks}</span></a></li>
|
|
60
|
+
<!-- ENDIF canEdit -->
|
|
61
|
+
<li role="separator" class="divider"></li>
|
|
62
|
+
<li><a href="{config.relative_path}/user/{userslug}/topics">[[global:topics]] <span class="badge badge-default pull-right formatted-number" title="{counts.topics}">{counts.topics}</span></a></li>
|
|
63
|
+
<li><a href="{config.relative_path}/user/{userslug}/posts">[[global:posts]] <span class="badge badge-default pull-right formatted-number" title="{counts.posts}">{counts.posts}</span></a></li>
|
|
64
|
+
<!-- IF !reputation:disabled -->
|
|
65
|
+
<li><a href="{config.relative_path}/user/{userslug}/best">[[global:best]] <span class="badge badge-default pull-right formatted-number" title="{counts.best}">{counts.best}</span></a></li>
|
|
66
|
+
<!-- ENDIF !reputation:disabled -->
|
|
67
|
+
<li><a href="{config.relative_path}/user/{userslug}/groups">[[global:header.groups]] <span class="badge badge-default pull-right formatted-number" title="{counts.groups}">{counts.groups}</span></a></li>
|
|
68
|
+
|
|
69
|
+
<!-- IF canEdit -->
|
|
70
|
+
<li><a href="{config.relative_path}/user/{userslug}/categories">[[user:watched_categories]] <span class="badge badge-default pull-right formatted-number" title="{counts.categoriesWatched}">{counts.categoriesWatched}</span></a></li>
|
|
71
|
+
<li><a href="{config.relative_path}/user/{userslug}/bookmarks">[[user:bookmarks]] <span class="badge badge-default pull-right formatted-number" title="{counts.bookmarks}">{counts.bookmarks}</span></a></li>
|
|
72
|
+
<li><a href="{config.relative_path}/user/{userslug}/watched">[[user:watched]] <span class="badge badge-default pull-right formatted-number" title="{counts.watched}">{counts.watched}</span></a></li>
|
|
73
|
+
<li><a href="{config.relative_path}/user/{userslug}/ignored">[[user:ignored]] <span class="badge badge-default pull-right formatted-number" title="{counts.ignored}">{counts.ignored}</span></a></li>
|
|
74
|
+
<!-- IF !reputation:disabled -->
|
|
75
|
+
<li><a href="{config.relative_path}/user/{userslug}/upvoted">[[global:upvoted]] <span class="badge badge-default pull-right formatted-number" title="{counts.upvoted}">{counts.upvoted}</span></a></li>
|
|
76
|
+
<!-- IF !downvote:disabled -->
|
|
77
|
+
<li><a href="{config.relative_path}/user/{userslug}/downvoted">[[global:downvoted]] <span class="badge badge-default pull-right formatted-number" title="{counts.downvoted}">{counts.downvoted}</span></a></li>
|
|
78
|
+
<!-- ENDIF !downvote:disabled -->
|
|
79
|
+
<!-- ENDIF !reputation:disabled -->
|
|
80
|
+
<li><a href="{config.relative_path}/user/{userslug}/uploads">[[global:uploads]] <span class="badge badge-default pull-right formatted-number" title="{counts.uploaded}">{counts.uploaded}</span></a></li>
|
|
81
|
+
<!-- ENDIF canEdit -->
|
|
82
|
+
|
|
83
|
+
{{{each profile_links}}}
|
|
84
|
+
<!-- IF @first -->
|
|
85
|
+
<li role="separator" class="divider"></li>
|
|
86
|
+
<!-- ENDIF @first -->
|
|
87
|
+
<li id="{profile_links.id}" class="plugin-link <!-- IF profile_links.public -->public<!-- ELSE -->private<!-- ENDIF profile_links.public -->"><a href="{config.relative_path}/user/{userslug}/{profile_links.route}"><!-- IF ../icon --><i class="fa fa-fw {profile_links.icon}"></i> <!-- END -->{profile_links.name}</a></li>
|
|
88
|
+
{{{end}}}
|
|
89
|
+
</ul>
|
|
90
|
+
</div>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div class="quickreply-message">
|
|
15
15
|
<textarea name="content" component="topic/quickreply/text" class="form-control" rows="5"></textarea>
|
|
16
16
|
</div>
|
|
17
|
-
<button type="submit" component="topic/quickreply/button" class="btn btn-primary pull-right">[[
|
|
17
|
+
<button type="submit" component="topic/quickreply/button" class="btn btn-primary pull-right">[[topic:post-quick-reply]]</button>
|
|
18
18
|
</form>
|
|
19
19
|
</div>
|
|
20
20
|
<!-- ENDIF privileges.topics:reply -->
|
package/templates/register.tpl
CHANGED
|
@@ -1,71 +1,87 @@
|
|
|
1
1
|
<!-- IMPORT partials/breadcrumbs.tpl -->
|
|
2
|
-
|
|
2
|
+
<div data-widget-area="header">
|
|
3
|
+
{{{each widgets.header}}}
|
|
4
|
+
{{widgets.header.html}}
|
|
5
|
+
{{{end}}}
|
|
6
|
+
</div>
|
|
3
7
|
<div class="row register">
|
|
4
|
-
<div class="{
|
|
5
|
-
<div class="
|
|
6
|
-
<div class="
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<form component="register/local" class="form-horizontal" role="form" action="{config.relative_path}/register" method="post">
|
|
11
|
-
<div class="form-group">
|
|
12
|
-
<label for="username" class="col-lg-4 control-label">[[register:username]]</label>
|
|
13
|
-
<div class="col-lg-8">
|
|
14
|
-
<input class="form-control" type="text" placeholder="[[register:username_placeholder]]" name="username" id="username" autocorrect="off" autocapitalize="off" autocomplete="off" />
|
|
15
|
-
<span class="register-feedback" id="username-notify"></span>
|
|
16
|
-
<span class="help-block">[[register:help.username_restrictions, {minimumUsernameLength}, {maximumUsernameLength}]]</span>
|
|
17
|
-
</div>
|
|
8
|
+
<div class="row {{{ if widgets.sidebar.length }}}col-lg-9 col-sm-12{{{ else }}}col-lg-12{{{ end }}}">
|
|
9
|
+
<div class="{register_window:spansize}">
|
|
10
|
+
<div class="register-block">
|
|
11
|
+
<div class="alert alert-danger<!-- IF !error --> hidden<!-- ENDIF !error -->" id="register-error-notify" >
|
|
12
|
+
<strong>[[error:registration-error]]</strong>
|
|
13
|
+
<p>{error}</p>
|
|
18
14
|
</div>
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</p>
|
|
15
|
+
<form component="register/local" class="form-horizontal" role="form" action="{config.relative_path}/register" method="post">
|
|
16
|
+
<div class="form-group">
|
|
17
|
+
<label for="username" class="col-lg-4 control-label">[[register:username]]</label>
|
|
18
|
+
<div class="col-lg-8">
|
|
19
|
+
<input class="form-control" type="text" placeholder="[[register:username_placeholder]]" name="username" id="username" autocorrect="off" autocapitalize="off" autocomplete="off" />
|
|
20
|
+
<span class="register-feedback" id="username-notify"></span>
|
|
21
|
+
<span class="help-block">[[register:help.username_restrictions, {minimumUsernameLength}, {maximumUsernameLength}]]</span>
|
|
22
|
+
</div>
|
|
28
23
|
</div>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
<div class="form-group">
|
|
25
|
+
<label for="password" class="col-lg-4 control-label">[[register:password]]</label>
|
|
26
|
+
<div class="col-lg-8">
|
|
27
|
+
<input class="form-control" type="password" placeholder="[[register:password_placeholder]]" name="password" id="password" />
|
|
28
|
+
<span class="register-feedback" id="password-notify"></span>
|
|
29
|
+
<span class="help-block">[[register:help.minimum_password_length, {minimumPasswordLength}]]</span>
|
|
30
|
+
<p id="caps-lock-warning" class="text-danger hidden">
|
|
31
|
+
<i class="fa fa-exclamation-triangle"></i> [[login:caps-lock-enabled]]
|
|
32
|
+
</p>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="form-group">
|
|
36
|
+
<label for="password-confirm" class="col-lg-4 control-label">[[register:confirm_password]]</label>
|
|
37
|
+
<div class="col-lg-8">
|
|
38
|
+
<input class="form-control" type="password" placeholder="[[register:confirm_password_placeholder]]" name="password-confirm" id="password-confirm" />
|
|
39
|
+
<span class="register-feedback" id="password-confirm-notify"></span>
|
|
40
|
+
</div>
|
|
35
41
|
</div>
|
|
36
|
-
</div>
|
|
37
42
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
{{{each regFormEntry}}}
|
|
44
|
+
<div class="form-group">
|
|
45
|
+
<label for="register-{regFormEntry.styleName}" class="col-lg-4 control-label">{regFormEntry.label}</label>
|
|
46
|
+
<div id="register-{regFormEntry.styleName}" class="col-lg-8">
|
|
47
|
+
{{regFormEntry.html}}
|
|
48
|
+
</div>
|
|
43
49
|
</div>
|
|
44
|
-
|
|
45
|
-
{{{end}}}
|
|
50
|
+
{{{end}}}
|
|
46
51
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
<div class="form-group">
|
|
53
|
+
<div class="col-lg-offset-4 col-lg-8">
|
|
54
|
+
<button class="btn btn-primary btn-lg btn-block" id="register" type="submit">[[register:register_now_button]]</button>
|
|
55
|
+
</div>
|
|
50
56
|
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</
|
|
57
|
+
<input id="token" type="hidden" name="token" value="" />
|
|
58
|
+
<input id="noscript" type="hidden" name="noscript" value="true" />
|
|
59
|
+
<input type="hidden" name="_csrf" value="{config.csrf_token}" />
|
|
60
|
+
</form>
|
|
61
|
+
</div>
|
|
56
62
|
</div>
|
|
57
|
-
</div>
|
|
58
63
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
{{{ if alternate_logins }}}
|
|
65
|
+
<div class="col-md-6">
|
|
66
|
+
<div class="alt-register-block">
|
|
67
|
+
<h4>[[register:alternative_registration]]</h4>
|
|
68
|
+
<ul class="alt-logins">
|
|
69
|
+
{{{each authentication}}}
|
|
70
|
+
<li class="{authentication.name}"><a rel="nofollow noopener noreferrer" target="_top" href="{config.relative_path}{authentication.url}"><i class="fa {authentication.icon} fa-3x"></i></i></a></li>
|
|
71
|
+
{{{end}}}
|
|
72
|
+
</ul>
|
|
73
|
+
</div>
|
|
68
74
|
</div>
|
|
75
|
+
{{{ end }}}
|
|
76
|
+
</div>
|
|
77
|
+
<div data-widget-area="sidebar" class="col-lg-3 col-sm-12 {{{ if !widgets.sidebar.length }}}hidden{{{ end }}}">
|
|
78
|
+
{{{each widgets.sidebar}}}
|
|
79
|
+
{{widgets.sidebar.html}}
|
|
80
|
+
{{{end}}}
|
|
69
81
|
</div>
|
|
70
|
-
<!-- ENDIF alternate_logins -->
|
|
71
82
|
</div>
|
|
83
|
+
<div data-widget-area="footer">
|
|
84
|
+
{{{each widgets.footer}}}
|
|
85
|
+
{{widgets.footer.html}}
|
|
86
|
+
{{{end}}}
|
|
87
|
+
</div>
|