Commit 90152bb0 authored by Florent Chehab's avatar Florent Chehab

Tab reorganization in university should be good now

parent 3c9ab3b0
Pipeline #27070 passed with stages
in 2 minutes and 30 seconds
......@@ -9,6 +9,7 @@ import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';
import StarsIcon from '@material-ui/icons/Stars';
import LocationOnIcon from '@material-ui/icons/LocationOn';
import GpsFixedIcon from '@material-ui/icons/GpsFixed';
import AttachMoneyIcon from '@material-ui/icons/AttachMoney';
import HistoryIcon from '@material-ui/icons/History';
import MoreHorizIcon from '@material-ui/icons/MoreHoriz';
......@@ -16,11 +17,12 @@ import Typography from '@material-ui/core/Typography';
import CoverGallery from './CoverGallery';
import CampusesTab from './tabs/CampusesTab';
import GeneralInfoTab from './tabs/GeneralInfoTab';
import MoreTab from './tabs/MoreTab';
import UniversityMoreTab from './tabs/UniversityMoreTab';
import CampusesCitiesTab from './tabs/CampusesCitiesTab';
import PreviousDeparturesTab from './tabs/PreviousDeparturesTab';
import ScholarshipsTab from './tabs/ScholarshipsTab';
import MoreTab from './tabs/MoreTab';
function TabContainer(props) {
return (
......@@ -78,17 +80,19 @@ class UniversityTemplate extends React.Component {
textColor="primary"
>
<Tab label="Généralités" icon={<StarsIcon />} />
<Tab label="Université+" icon={<GpsFixedIcon />} />
<Tab label="Précédents départs" icon={<HistoryIcon />} />
<Tab label="Campus" icon={<LocationOnIcon />} />
<Tab label="Bourses" icon={<AttachMoneyIcon />} />
<Tab label="Campus & ville(s)" icon={<LocationOnIcon />} />
<Tab label="Autres" icon={<MoreHorizIcon />} />
</Tabs>
</AppBar>
{value === 0 && <TabContainer> <GeneralInfoTab univId={univId} /> </TabContainer>}
{value === 1 && <TabContainer> <PreviousDeparturesTab univId={univId} /> </TabContainer>}
{value === 2 && <TabContainer> <CampusesTab univId={univId} /> </TabContainer>}
{value === 1 && <TabContainer> <UniversityMoreTab univId={univId} /> </TabContainer>}
{value === 2 && <TabContainer> <PreviousDeparturesTab univId={univId} /> </TabContainer>}
{value === 3 && <TabContainer> <ScholarshipsTab univId={univId} /> </TabContainer>}
{value === 4 && <TabContainer> <MoreTab univId={univId} /> </TabContainer>}
{value === 4 && <TabContainer> <CampusesCitiesTab univId={univId} /> </TabContainer>}
{value === 5 && <TabContainer> <MoreTab univId={univId} /> </TabContainer>}
</div>
</div>
......
......@@ -21,6 +21,7 @@ const styles = theme => ({
paddingBottom: 3 * theme.spacing.unit,
paddingRight: 5 * theme.spacing.unit,
paddingLeft: 5 * theme.spacing.unit,
marginBottom: 2 * theme.spacing.unit,
flexGrow: 1,
},
green: {
......@@ -43,11 +44,12 @@ class GenericGroupModule extends React.Component {
return (
<Paper className={classes.root}>
<Grid container spacing={8} alignItems='center'>
<Grid item xs>
<Typography variant='title' align='center' color="textSecondary"><em>{groupTitle}</em></Typography>
</Grid>
<Grid item xs={2} style={{ textAlign: 'right' }}>
<Tooltip title="Ajouter un élément" placement="top">
<div style={{ display: 'inline-block' }}> {/* Needed to fire events for the tooltip when below is disabled! */}
<Button variant='fab' mini aria-label="Ajouter un élément" disabled={false} style={{ backgroundColor: green.A700 }} className={classes.button}>
......@@ -55,8 +57,8 @@ class GenericGroupModule extends React.Component {
</Button>
</div>
</Tooltip>
</Grid>
</Grid>
<Divider />
{this.props.children}
......
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import MyComponent from '../../MyComponent';
import GenericGroupModules from '../modules/GenericGroupModule';
const styles = theme => ({
root: {},
});
class CampusesCitiesTab extends MyComponent {
myRender() {
return (
<div>
<GenericGroupModules groupTitle={"Logement"}/>
<GenericGroupModules groupTitle={"Vie étudiante"}/>
<GenericGroupModules groupTitle={"Vie quotidienne (et transport)"}/>
<GenericGroupModules groupTitle={"Autre chose ?"}/>
</div>
);
}
}
// CampusesCitiesTab.propTypes = {
// classes: PropTypes.object.isRequired,
// univId: PropTypes.string.isRequired,
// };
export default withStyles(styles)(CampusesCitiesTab);
\ No newline at end of file
......@@ -3,6 +3,8 @@ import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import MyComponent from '../../MyComponent';
import GenericGroupModules from '../modules/GenericGroupModule';
const styles = theme => ({
root: {},
});
......@@ -12,7 +14,13 @@ class MoreTab extends MyComponent {
myRender() {
return (
<div>
C'est la pluie des tags ici !!
<GenericGroupModules groupTitle={"Administratif"} />
<GenericGroupModules groupTitle={"Assurances"} />
<GenericGroupModules groupTitle={"Transport"} />
<GenericGroupModules groupTitle={"Culture"}/>
<GenericGroupModules groupTitle={"Tourisme"} />
<GenericGroupModules groupTitle={"Photos"}/>
<GenericGroupModules groupTitle={"Autres"}/>
</div>
);
}
......
......@@ -3,25 +3,29 @@ import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import MyComponent from '../../MyComponent';
import GenericGroupModules from '../modules/GenericGroupModule';
const styles = theme => ({
root: {},
});
class CampusesTab extends MyComponent {
class UniversityMoreTab extends MyComponent {
myRender() {
return (
<div>
Informations sur les campus
<GenericGroupModules groupTitle={"Partenariats spécifiques"} />
<GenericGroupModules groupTitle={"Commentaires partagés"} />
<GenericGroupModules groupTitle={"Autres"} />
</div>
);
}
}
// CampusesTab.propTypes = {
// UniversityMoreTab.propTypes = {
// classes: PropTypes.object.isRequired,
// univId: PropTypes.string.isRequired,
// };
export default withStyles(styles)(CampusesTab);
\ No newline at end of file
export default withStyles(styles)(UniversityMoreTab);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment