From 88ba6e1e779a69c4264d07eed35d8be130cc2cc7 Mon Sep 17 00:00:00 2001 From: emilyliublair <67622097+emilyliublair@users.noreply.github.com> Date: Sun, 12 Sep 2021 18:19:34 -0400 Subject: [PATCH] fixed teacher template --- app/SSLOps.js | 18 +++++++++++++++--- cms/templates/teachers.html.hbs | 7 ++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/app/SSLOps.js b/app/SSLOps.js index 5b3370d..2b3e8f4 100644 --- a/app/SSLOps.js +++ b/app/SSLOps.js @@ -64,6 +64,7 @@ const Stack = createStackNavigator(); function SSLElement (props) { const item = props.item; + const date = item.item.date.split('-') const [expand, setExpand] = useState(false); return( @@ -71,11 +72,22 @@ function SSLElement (props) { - {item.item.title} + + {item.item.title} + {`${date[1]}/${date[2]}/${date[0]}`} + {expand?:} - {expand?{I18n.t('ssl.information')}{item.item.text}{'\n'}{I18n.t('ssl.sponsor')}{item.item.teacher}{'\n'}{I18n.t('ssl.location')}{item.item.loc}:<>} + {expand? + + {I18n.t('ssl.information')} + {item.item.text} + {'\n'}{I18n.t('ssl.sponsor')} + {item.item.teacher} + {'\n'}{I18n.t('ssl.location')} + {item.item.location} + :<>} ) @@ -91,7 +103,7 @@ class SSLOps extends React.Component { } componentDidMount() { - fetch(`http://localhost:8000/data/en/sslOps.json`,{ + fetch(`${url}/api/`+String(I18n.locale).split('-')[0]+`/ssl_ops`,{ //fetch(`${url}/api/en/sslOps`,{ headers: { 'Cache-Control': 'no-cache' diff --git a/cms/templates/teachers.html.hbs b/cms/templates/teachers.html.hbs index 2d44ba7..a73b332 100644 --- a/cms/templates/teachers.html.hbs +++ b/cms/templates/teachers.html.hbs @@ -28,9 +28,10 @@
ID: {{id}} | LANG: {{lang}}

{{name}}

-

{{meeting}}

-

{{link}}

-

Sponsor: {{sponsor}}

+

{{email}}

+

{{phone}}

+

{{position}}

+

{{image}}