Skip to content

Commit

Permalink
Merge pull request #247 from Inist-CNRS/fixes
Browse files Browse the repository at this point in the history
[RFR] Fixes
  • Loading branch information
ThieryMichel authored Apr 6, 2017
2 parents 86ffc54 + 003a373 commit 18abf18
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 25 deletions.
18 changes: 9 additions & 9 deletions src/api/controller/front/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ const middleware = process.env.NODE_ENV === 'development' ? dev() : prod();
app.use(async (ctx, next) => {
const uri = ctx.path;

if (!uri.startsWith('/api')
&& uri !== '/admin'
&& uri.indexOf('.js') === -1
&& uri.indexOf('__webpack_hmr') === -1) {
if (uri.startsWith('/admin')) {
ctx.path = '/admin';
await next();
return;
}
if (uri.startsWith('/uid:/')
|| uri.startsWith('/ark:/')
|| uri.startsWith('/login')
|| uri.startsWith('/home')) {
// Override the path so that webpack serves the application correctly
ctx.path = '/';
}

if (uri.startsWith('/admin/')) {
// Override the path so that webpack serves the application correctly
ctx.path = '/admin';
}

await next();
});

Expand Down
2 changes: 1 addition & 1 deletion src/app/js/i18n/translations/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default {
position: 'Position',
field_wizard_step_value: 'How the value is generated',
field_wizard_step_tranforms: 'Transformations applied on the value',
field_wizard_step_identity: 'Général informations',
field_wizard_step_identity: 'General informations',
field_wizard_step_display: 'How and where it is displayed',
field_wizard_step_search: 'Search related',
field_wizard_step_semantic: 'Semantics',
Expand Down
18 changes: 3 additions & 15 deletions src/app/js/public/characteristic/DatasetCharacteristics.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import React, { PropTypes } from 'react';
import compose from 'recompose/compose';
import { connect } from 'react-redux';
import translate from 'redux-polyglot/translate';
import { CardHeader, CardText } from 'material-ui/Card';
import { CardText } from 'material-ui/Card';
import memoize from 'lodash.memoize';

import Card from '../../lib/Card';

import {
field as fieldProptypes,
polyglot as polyglotPropTypes,
} from '../../propTypes';
import { field as fieldProptypes } from '../../propTypes';

import {
fromCharacteristic,
Expand All @@ -33,14 +29,8 @@ const styles = {
})),
};

const DatasetCharacteristicsView = ({
characteristics,
p: polyglot,
}) => (
const DatasetCharacteristicsView = ({ characteristics }) => (
<Card className="dataset-characteristics">
<CardHeader
title={polyglot.t('dataset_characteristics')}
/>
<CardText style={styles.container}>
{characteristics
.map((characteristicField, index) => (
Expand All @@ -55,7 +45,6 @@ const DatasetCharacteristicsView = ({

DatasetCharacteristicsView.propTypes = {
characteristics: PropTypes.arrayOf(fieldProptypes).isRequired,
p: polyglotPropTypes.isRequired,
};

DatasetCharacteristicsView.defaultProps = {
Expand All @@ -74,5 +63,4 @@ const mapStateToProps = (state) => {

export default compose(
connect(mapStateToProps),
translate,
)(DatasetCharacteristicsView);

0 comments on commit 18abf18

Please sign in to comment.