From 8866a46f68a4ed98ff12117c455ceb277e868942 Mon Sep 17 00:00:00 2001 From: rr- Date: Wed, 11 May 2016 12:17:40 +0200 Subject: [PATCH] client/general: rename certain views --- client/html/{tag_list_header.hbs => tags_header.hbs} | 0 client/html/{tag_list_page.hbs => tags_page.hbs} | 0 client/html/{user_deletion.hbs => user_delete.hbs} | 0 .../html/{user_list_header.hbs => users_header.hbs} | 0 client/html/{user_list_page.hbs => users_page.hbs} | 0 client/js/controllers/tags_controller.js | 12 ++++++------ client/js/controllers/users_controller.js | 12 ++++++------ .../{tag_list_header_view.js => tags_header_view.js} | 6 +++--- .../{tag_list_page_view.js => tags_page_view.js} | 6 +++--- .../{user_deletion_view.js => user_delete_view.js} | 6 +++--- client/js/views/user_view.js | 6 +++--- ...user_list_header_view.js => users_header_view.js} | 6 +++--- .../{user_list_page_view.js => users_page_view.js} | 6 +++--- 13 files changed, 30 insertions(+), 30 deletions(-) rename client/html/{tag_list_header.hbs => tags_header.hbs} (100%) rename client/html/{tag_list_page.hbs => tags_page.hbs} (100%) rename client/html/{user_deletion.hbs => user_delete.hbs} (100%) rename client/html/{user_list_header.hbs => users_header.hbs} (100%) rename client/html/{user_list_page.hbs => users_page.hbs} (100%) rename client/js/views/{tag_list_header_view.js => tags_header_view.js} (86%) rename client/js/views/{tag_list_page_view.js => tags_page_view.js} (66%) rename client/js/views/{user_deletion_view.js => user_delete_view.js} (82%) rename client/js/views/{user_list_header_view.js => users_header_view.js} (86%) rename client/js/views/{user_list_page_view.js => users_page_view.js} (65%) diff --git a/client/html/tag_list_header.hbs b/client/html/tags_header.hbs similarity index 100% rename from client/html/tag_list_header.hbs rename to client/html/tags_header.hbs diff --git a/client/html/tag_list_page.hbs b/client/html/tags_page.hbs similarity index 100% rename from client/html/tag_list_page.hbs rename to client/html/tags_page.hbs diff --git a/client/html/user_deletion.hbs b/client/html/user_delete.hbs similarity index 100% rename from client/html/user_deletion.hbs rename to client/html/user_delete.hbs diff --git a/client/html/user_list_header.hbs b/client/html/users_header.hbs similarity index 100% rename from client/html/user_list_header.hbs rename to client/html/users_header.hbs diff --git a/client/html/user_list_page.hbs b/client/html/users_page.hbs similarity index 100% rename from client/html/user_list_page.hbs rename to client/html/users_page.hbs diff --git a/client/js/controllers/tags_controller.js b/client/js/controllers/tags_controller.js index 0ebe0da..931a32c 100644 --- a/client/js/controllers/tags_controller.js +++ b/client/js/controllers/tags_controller.js @@ -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'), }); } diff --git a/client/js/controllers/users_controller.js b/client/js/controllers/users_controller.js index 82a2dcf..c824eb3 100644 --- a/client/js/controllers/users_controller.js +++ b/client/js/controllers/users_controller.js @@ -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, }); } diff --git a/client/js/views/tag_list_header_view.js b/client/js/views/tags_header_view.js similarity index 86% rename from client/js/views/tag_list_header_view.js rename to client/js/views/tags_header_view.js index 1fa661a..93f187f 100644 --- a/client/js/views/tag_list_header_view.js +++ b/client/js/views/tags_header_view.js @@ -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; diff --git a/client/js/views/tag_list_page_view.js b/client/js/views/tags_page_view.js similarity index 66% rename from client/js/views/tag_list_page_view.js rename to client/js/views/tags_page_view.js index e7142fb..26c0f28 100644 --- a/client/js/views/tag_list_page_view.js +++ b/client/js/views/tags_page_view.js @@ -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; diff --git a/client/js/views/user_deletion_view.js b/client/js/views/user_delete_view.js similarity index 82% rename from client/js/views/user_deletion_view.js rename to client/js/views/user_delete_view.js index 20c950f..740c205 100644 --- a/client/js/views/user_deletion_view.js +++ b/client/js/views/user_delete_view.js @@ -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; diff --git a/client/js/views/user_view.js b/client/js/views/user_view.js index c547549..7cc8533 100644 --- a/client/js/views/user_view.js +++ b/client/js/views/user_view.js @@ -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; } diff --git a/client/js/views/user_list_header_view.js b/client/js/views/users_header_view.js similarity index 86% rename from client/js/views/user_list_header_view.js rename to client/js/views/users_header_view.js index 9389ddc..d2f4e6c 100644 --- a/client/js/views/user_list_header_view.js +++ b/client/js/views/users_header_view.js @@ -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; diff --git a/client/js/views/user_list_page_view.js b/client/js/views/users_page_view.js similarity index 65% rename from client/js/views/user_list_page_view.js rename to client/js/views/users_page_view.js index ea9b99d..1e609af 100644 --- a/client/js/views/user_list_page_view.js +++ b/client/js/views/users_page_view.js @@ -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;