client/general: rename certain views
This commit is contained in:
parent
3856e9fd0d
commit
8866a46f68
13 changed files with 30 additions and 30 deletions
|
@ -6,14 +6,14 @@ const events = require('../events.js');
|
|||
const misc = require('../util/misc.js');
|
||||
const topNavController = require('../controllers/top_nav_controller.js');
|
||||
const pageController = require('../controllers/page_controller.js');
|
||||
const TagListHeaderView = require('../views/tag_list_header_view.js');
|
||||
const TagListPageView = require('../views/tag_list_page_view.js');
|
||||
const TagsHeaderView = require('../views/tags_header_view.js');
|
||||
const TagsPageView = require('../views/tags_page_view.js');
|
||||
const TagCategoriesView = require('../views/tag_categories_view.js');
|
||||
|
||||
class TagsController {
|
||||
constructor() {
|
||||
this.tagListHeaderView = new TagListHeaderView();
|
||||
this.tagListPageView = new TagListPageView();
|
||||
this.tagsHeaderView = new TagsHeaderView();
|
||||
this.tagsPageView = new TagsPageView();
|
||||
this.tagCategoriesView = new TagCategoriesView();
|
||||
}
|
||||
|
||||
|
@ -87,8 +87,8 @@ class TagsController {
|
|||
clientUrl: '/tags/' + misc.formatSearchQuery({
|
||||
text: ctx.searchQuery.text, page: '{page}'}),
|
||||
searchQuery: ctx.searchQuery,
|
||||
headerRenderer: this.tagListHeaderView,
|
||||
pageRenderer: this.tagListPageView,
|
||||
headerRenderer: this.tagsHeaderView,
|
||||
pageRenderer: this.tagsPageView,
|
||||
canEditTagCategories: api.hasPrivilege('tagCategories:edit'),
|
||||
});
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ const topNavController = require('../controllers/top_nav_controller.js');
|
|||
const pageController = require('../controllers/page_controller.js');
|
||||
const RegistrationView = require('../views/registration_view.js');
|
||||
const UserView = require('../views/user_view.js');
|
||||
const UserListHeaderView = require('../views/user_list_header_view.js');
|
||||
const UserListPageView = require('../views/user_list_page_view.js');
|
||||
const UsersHeaderView = require('../views/users_header_view.js');
|
||||
const UsersPageView = require('../views/users_page_view.js');
|
||||
const EmptyView = require('../views/empty_view.js');
|
||||
|
||||
const rankNames = {
|
||||
|
@ -28,8 +28,8 @@ class UsersController {
|
|||
constructor() {
|
||||
this.registrationView = new RegistrationView();
|
||||
this.userView = new UserView();
|
||||
this.userListHeaderView = new UserListHeaderView();
|
||||
this.userListPageView = new UserListPageView();
|
||||
this.usersHeaderView = new UsersHeaderView();
|
||||
this.usersPageView = new UsersPageView();
|
||||
this.emptyView = new EmptyView();
|
||||
}
|
||||
|
||||
|
@ -75,8 +75,8 @@ class UsersController {
|
|||
clientUrl: '/users/' + misc.formatSearchQuery({
|
||||
text: ctx.searchQuery.text, page: '{page}'}),
|
||||
searchQuery: ctx.searchQuery,
|
||||
headerRenderer: this.userListHeaderView,
|
||||
pageRenderer: this.userListPageView,
|
||||
headerRenderer: this.usersHeaderView,
|
||||
pageRenderer: this.usersPageView,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ const keyboard = require('../util/keyboard.js');
|
|||
const misc = require('../util/misc.js');
|
||||
const views = require('../util/views.js');
|
||||
|
||||
class TagListHeaderView {
|
||||
class TagsHeaderView {
|
||||
constructor() {
|
||||
this.template = views.getTemplate('tag-list-header');
|
||||
this.template = views.getTemplate('tags-header');
|
||||
}
|
||||
|
||||
render(ctx) {
|
||||
|
@ -32,4 +32,4 @@ class TagListHeaderView {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = TagListHeaderView;
|
||||
module.exports = TagsHeaderView;
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
const views = require('../util/views.js');
|
||||
|
||||
class TagListPageView {
|
||||
class TagsPageView {
|
||||
constructor() {
|
||||
this.template = views.getTemplate('tag-list-page');
|
||||
this.template = views.getTemplate('tags-page');
|
||||
}
|
||||
|
||||
render(ctx) {
|
||||
|
@ -14,4 +14,4 @@ class TagListPageView {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = TagListPageView;
|
||||
module.exports = TagsPageView;
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
const views = require('../util/views.js');
|
||||
|
||||
class UserDeletionView {
|
||||
class UserDeleteView {
|
||||
constructor() {
|
||||
this.template = views.getTemplate('user-deletion');
|
||||
this.template = views.getTemplate('user-delete');
|
||||
}
|
||||
|
||||
render(ctx) {
|
||||
|
@ -27,4 +27,4 @@ class UserDeletionView {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = UserDeletionView;
|
||||
module.exports = UserDeleteView;
|
|
@ -1,14 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
const views = require('../util/views.js');
|
||||
const UserDeletionView = require('./user_deletion_view.js');
|
||||
const UserDeleteView = require('./user_delete_view.js');
|
||||
const UserSummaryView = require('./user_summary_view.js');
|
||||
const UserEditView = require('./user_edit_view.js');
|
||||
|
||||
class UserView {
|
||||
constructor() {
|
||||
this.template = views.getTemplate('user');
|
||||
this.deletionView = new UserDeletionView();
|
||||
this.deleteView = new UserDeleteView();
|
||||
this.summaryView = new UserSummaryView();
|
||||
this.editView = new UserEditView();
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class UserView {
|
|||
if (ctx.section == 'edit') {
|
||||
view = this.editView;
|
||||
} else if (ctx.section == 'delete') {
|
||||
view = this.deletionView;
|
||||
view = this.deleteView;
|
||||
} else {
|
||||
view = this.summaryView;
|
||||
}
|
||||
|
|
|
@ -5,9 +5,9 @@ const keyboard = require('../util/keyboard.js');
|
|||
const misc = require('../util/misc.js');
|
||||
const views = require('../util/views.js');
|
||||
|
||||
class UserListHeaderView {
|
||||
class UsersHeaderView {
|
||||
constructor() {
|
||||
this.template = views.getTemplate('user-list-header');
|
||||
this.template = views.getTemplate('users-header');
|
||||
}
|
||||
|
||||
render(ctx) {
|
||||
|
@ -32,4 +32,4 @@ class UserListHeaderView {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = UserListHeaderView;
|
||||
module.exports = UsersHeaderView;
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
const views = require('../util/views.js');
|
||||
|
||||
class UserListPageView {
|
||||
class UsersPageView {
|
||||
constructor() {
|
||||
this.template = views.getTemplate('user-list-page');
|
||||
this.template = views.getTemplate('users-page');
|
||||
}
|
||||
|
||||
render(ctx) {
|
||||
|
@ -14,4 +14,4 @@ class UserListPageView {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = UserListPageView;
|
||||
module.exports = UsersPageView;
|
Loading…
Reference in a new issue