From c18142f2ba9ff588c2cb7199f3bef0d7fc031856 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 21 Jan 2017 01:54:13 -0300 Subject: [PATCH] Ivan - Add home link and english keys for no user system [skip ci] --- client/src/app-components/topic-viewer.scss | 3 ++- .../dashboard-create-ticket-page.js | 14 ++++---------- client/src/app/main/main-check-ticket-page.js | 2 +- client/src/app/main/main-layout-header.js | 10 +++++++++- client/src/data/languages/en.js | 6 +++--- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/client/src/app-components/topic-viewer.scss b/client/src/app-components/topic-viewer.scss index f674fd88..97dd43f5 100644 --- a/client/src/app-components/topic-viewer.scss +++ b/client/src/app-components/topic-viewer.scss @@ -2,10 +2,11 @@ .topic-viewer { text-align: left; + margin: 35px 0; &__header { cursor: default; - margin-bottom: 15px; + margin-bottom: 20px; font-size: $font-size--bg; &:hover { diff --git a/client/src/app/main/dashboard/dashboard-create-ticket/dashboard-create-ticket-page.js b/client/src/app/main/dashboard/dashboard-create-ticket/dashboard-create-ticket-page.js index cc7ad75f..8edc3bcc 100644 --- a/client/src/app/main/dashboard/dashboard-create-ticket/dashboard-create-ticket-page.js +++ b/client/src/app/main/dashboard/dashboard-create-ticket/dashboard-create-ticket-page.js @@ -1,8 +1,6 @@ import React from 'react'; import classNames from 'classnames'; -import {connect} from 'react-redux'; -import Captcha from 'app/main/captcha'; import CreateTicketForm from 'app/main/dashboard/dashboard-create-ticket/create-ticket-form'; import Widget from 'core-components/widget'; @@ -15,14 +13,14 @@ class DashboardCreateTicketPage extends React.Component { render() { let Wrapper = 'div'; - if(!this.props.userSystemEnabled) { + if((this.props.location.pathname === '/create-ticket')) { Wrapper = Widget; } return (
- +
); @@ -31,15 +29,11 @@ class DashboardCreateTicketPage extends React.Component { getClass() { let classes = { 'dashboard-create-ticket-page': true, - 'dashboard-create-ticket-page_wrapped': (!this.props.userSystemEnabled) + 'dashboard-create-ticket-page_wrapped': (this.props.location.pathname === '/create-ticket') }; return classNames(classes); } } -export default connect((store) => { - return { - userSystemEnabled: store.config['user-system-enabled'] - }; -})(DashboardCreateTicketPage); +export default DashboardCreateTicketPage; diff --git a/client/src/app/main/main-check-ticket-page.js b/client/src/app/main/main-check-ticket-page.js index f95297a3..e0a1df21 100644 --- a/client/src/app/main/main-check-ticket-page.js +++ b/client/src/app/main/main-check-ticket-page.js @@ -27,7 +27,7 @@ class MainCheckTicketPage extends React.Component { return (
-
+
diff --git a/client/src/app/main/main-layout-header.js b/client/src/app/main/main-layout-header.js index c42545f0..7c705740 100644 --- a/client/src/app/main/main-layout-header.js +++ b/client/src/app/main/main-layout-header.js @@ -12,7 +12,7 @@ class MainLayoutHeader extends React.Component { render() { return (
- {(this.props.config['user-system-enabled']) ? this.renderAccessLinks() : null} + {(this.props.config['user-system-enabled']) ? this.renderAccessLinks() : this.renderHomeLink()}
); @@ -40,6 +40,14 @@ class MainLayoutHeader extends React.Component { return result; } + renderHomeLink() { + return ( +
+ +
+ ); + } + getLanguageSelectorProps() { return { className: 'main-layout-header__languages', diff --git a/client/src/data/languages/en.js b/client/src/data/languages/en.js index 81277ea4..74d595a1 100644 --- a/client/src/data/languages/en.js +++ b/client/src/data/languages/en.js @@ -154,10 +154,10 @@ export default { 'VERIFY_SUCCESS': 'User verified', 'VERIFY_FAILED': 'Could not verify', 'CHECK_TICKET': 'Check Ticket', - 'STATISTICS': 'Statistics', 'ACTIVITY': 'Activity', - - + 'HOME': 'Home', + 'TICKET_NUMBER': 'Ticket number', + 'CHART_CREATE_TICKET': 'Tickets created', 'CHART_CLOSE': 'Tickets closed', 'CHART_SIGNUP': 'Signups',