Ivan - Add home link and english keys for no user system [skip ci]

This commit is contained in:
ivan 2017-01-21 01:54:13 -03:00
parent 6109e1ac73
commit c18142f2ba
5 changed files with 19 additions and 16 deletions

View File

@ -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 {

View File

@ -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 (
<div className={this.getClass()}>
<Wrapper>
<CreateTicketForm userLogged={this.props.userSystemEnabled} />
<CreateTicketForm userLogged={(this.props.location.pathname !== '/create-ticket')} />
</Wrapper>
</div>
);
@ -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;

View File

@ -27,7 +27,7 @@ class MainCheckTicketPage extends React.Component {
return (
<div className="main-check-ticket-page">
<Widget>
<Header title={i18n('CHECK_TICKET')} description={i18n('CHECK_TICKET_DESCRIPTION')} />
<Header title={i18n('CHECK_TICKET')} description={i18n('VIEW_TICKET_DESCRIPTION')} />
<Form {...this.getFormProps()}>
<div className="main-check-ticket-page__inputs">
<div className="main-check-ticket-page__input">

View File

@ -12,7 +12,7 @@ class MainLayoutHeader extends React.Component {
render() {
return (
<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()} />
</div>
);
@ -40,6 +40,14 @@ class MainLayoutHeader extends React.Component {
return result;
}
renderHomeLink() {
return (
<div className="main-layout-header__login-links">
<Button type="clean" route={{to:'/'}}>{i18n('HOME')}</Button>
</div>
);
}
getLanguageSelectorProps() {
return {
className: 'main-layout-header__languages',

View File

@ -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',