Ivan - Add home link and english keys for no user system [skip ci]
This commit is contained in:
parent
6109e1ac73
commit
c18142f2ba
|
@ -2,10 +2,11 @@
|
||||||
|
|
||||||
.topic-viewer {
|
.topic-viewer {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
margin: 35px 0;
|
||||||
|
|
||||||
&__header {
|
&__header {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 20px;
|
||||||
font-size: $font-size--bg;
|
font-size: $font-size--bg;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import classNames from 'classnames';
|
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 CreateTicketForm from 'app/main/dashboard/dashboard-create-ticket/create-ticket-form';
|
||||||
import Widget from 'core-components/widget';
|
import Widget from 'core-components/widget';
|
||||||
|
|
||||||
|
@ -15,14 +13,14 @@ class DashboardCreateTicketPage extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
let Wrapper = 'div';
|
let Wrapper = 'div';
|
||||||
|
|
||||||
if(!this.props.userSystemEnabled) {
|
if((this.props.location.pathname === '/create-ticket')) {
|
||||||
Wrapper = Widget;
|
Wrapper = Widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={this.getClass()}>
|
<div className={this.getClass()}>
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<CreateTicketForm userLogged={this.props.userSystemEnabled} />
|
<CreateTicketForm userLogged={(this.props.location.pathname !== '/create-ticket')} />
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -31,15 +29,11 @@ class DashboardCreateTicketPage extends React.Component {
|
||||||
getClass() {
|
getClass() {
|
||||||
let classes = {
|
let classes = {
|
||||||
'dashboard-create-ticket-page': true,
|
'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);
|
return classNames(classes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect((store) => {
|
export default DashboardCreateTicketPage;
|
||||||
return {
|
|
||||||
userSystemEnabled: store.config['user-system-enabled']
|
|
||||||
};
|
|
||||||
})(DashboardCreateTicketPage);
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class MainCheckTicketPage extends React.Component {
|
||||||
return (
|
return (
|
||||||
<div className="main-check-ticket-page">
|
<div className="main-check-ticket-page">
|
||||||
<Widget>
|
<Widget>
|
||||||
<Header title={i18n('CHECK_TICKET')} description={i18n('CHECK_TICKET_DESCRIPTION')} />
|
<Header title={i18n('CHECK_TICKET')} description={i18n('VIEW_TICKET_DESCRIPTION')} />
|
||||||
<Form {...this.getFormProps()}>
|
<Form {...this.getFormProps()}>
|
||||||
<div className="main-check-ticket-page__inputs">
|
<div className="main-check-ticket-page__inputs">
|
||||||
<div className="main-check-ticket-page__input">
|
<div className="main-check-ticket-page__input">
|
||||||
|
|
|
@ -12,7 +12,7 @@ class MainLayoutHeader extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="main-layout-header">
|
<div className="main-layout-header">
|
||||||
{(this.props.config['user-system-enabled']) ? this.renderAccessLinks() : null}
|
{(this.props.config['user-system-enabled']) ? this.renderAccessLinks() : this.renderHomeLink()}
|
||||||
<LanguageSelector {...this.getLanguageSelectorProps()} />
|
<LanguageSelector {...this.getLanguageSelectorProps()} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -40,6 +40,14 @@ class MainLayoutHeader extends React.Component {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderHomeLink() {
|
||||||
|
return (
|
||||||
|
<div className="main-layout-header__login-links">
|
||||||
|
<Button type="clean" route={{to:'/'}}>{i18n('HOME')}</Button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
getLanguageSelectorProps() {
|
getLanguageSelectorProps() {
|
||||||
return {
|
return {
|
||||||
className: 'main-layout-header__languages',
|
className: 'main-layout-header__languages',
|
||||||
|
|
|
@ -154,10 +154,10 @@ export default {
|
||||||
'VERIFY_SUCCESS': 'User verified',
|
'VERIFY_SUCCESS': 'User verified',
|
||||||
'VERIFY_FAILED': 'Could not verify',
|
'VERIFY_FAILED': 'Could not verify',
|
||||||
'CHECK_TICKET': 'Check Ticket',
|
'CHECK_TICKET': 'Check Ticket',
|
||||||
'STATISTICS': 'Statistics',
|
|
||||||
'ACTIVITY': 'Activity',
|
'ACTIVITY': 'Activity',
|
||||||
|
'HOME': 'Home',
|
||||||
|
'TICKET_NUMBER': 'Ticket number',
|
||||||
|
|
||||||
'CHART_CREATE_TICKET': 'Tickets created',
|
'CHART_CREATE_TICKET': 'Tickets created',
|
||||||
'CHART_CLOSE': 'Tickets closed',
|
'CHART_CLOSE': 'Tickets closed',
|
||||||
'CHART_SIGNUP': 'Signups',
|
'CHART_SIGNUP': 'Signups',
|
||||||
|
|
Loading…
Reference in New Issue