mirror of
https://github.com/Blair-SGA-Dev-Team/blazerapp.git
synced 2024-11-23 21:21:16 -05:00
fixed teacher template
This commit is contained in:
parent
0a826fd381
commit
88ba6e1e77
|
@ -64,6 +64,7 @@ const Stack = createStackNavigator();
|
||||||
|
|
||||||
function SSLElement (props) {
|
function SSLElement (props) {
|
||||||
const item = props.item;
|
const item = props.item;
|
||||||
|
const date = item.item.date.split('-')
|
||||||
const [expand, setExpand] = useState(false);
|
const [expand, setExpand] = useState(false);
|
||||||
return(
|
return(
|
||||||
<View>
|
<View>
|
||||||
|
@ -71,11 +72,22 @@ function SSLElement (props) {
|
||||||
<View style = {styles.container2}>
|
<View style = {styles.container2}>
|
||||||
<Ionicons name="school-outline" size={36} color={'#323232'} style={{marginRight: 15}} />
|
<Ionicons name="school-outline" size={36} color={'#323232'} style={{marginRight: 15}} />
|
||||||
<View style = {styles.accordian}>
|
<View style = {styles.accordian}>
|
||||||
|
<View style = {{display: 'flex', alignContent: 'center', width: '80%'}}>
|
||||||
<Text style={styles.title}>{item.item.title}</Text>
|
<Text style={styles.title}>{item.item.title}</Text>
|
||||||
|
<View style={{paddingBottom: '2%'}}><Text style = {{fontSize: 12, fontWeight: '200'}}>{`${date[1]}/${date[2]}/${date[0]}`}</Text></View>
|
||||||
|
</View>
|
||||||
{expand?<LinearGradient start={{x: 0, y: 0.25}} end={{x: .5, y: 1}} colors={['red', '#FF7373']} style={{borderRadius: 24, alignSelf: 'center'}}><Image source = {require('./assets/collapse.png')} style={{tintColor: 'white'}}/></LinearGradient>:<Image source = {require('./assets/expand.png')} style={{tintColor: '#b2b2b2', alignSelf: 'center'}}/>}
|
{expand?<LinearGradient start={{x: 0, y: 0.25}} end={{x: .5, y: 1}} colors={['red', '#FF7373']} style={{borderRadius: 24, alignSelf: 'center'}}><Image source = {require('./assets/collapse.png')} style={{tintColor: 'white'}}/></LinearGradient>:<Image source = {require('./assets/expand.png')} style={{tintColor: '#b2b2b2', alignSelf: 'center'}}/>}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
{expand?<View style={{marginLeft: 50}}><Text style={styles.accordianHeader}>{I18n.t('ssl.information')}</Text><Text style={styles.accordianText}>{item.item.text}</Text><Text style={styles.accordianHeader}>{'\n'}{I18n.t('ssl.sponsor')}</Text><Text style={styles.accordianText}>{item.item.teacher}</Text><Text style={styles.accordianHeader}>{'\n'}{I18n.t('ssl.location')}</Text><Text style={[styles.accordianText, {paddingBottom: '4%'}]}>{item.item.loc}</Text></View>:<></>}
|
{expand?
|
||||||
|
<View style={{marginLeft: 50}}>
|
||||||
|
<Text style={styles.accordianHeader}>{I18n.t('ssl.information')}</Text>
|
||||||
|
<Text style={styles.accordianText}>{item.item.text}</Text>
|
||||||
|
<Text style={styles.accordianHeader}>{'\n'}{I18n.t('ssl.sponsor')}</Text>
|
||||||
|
<Text style={styles.accordianText}>{item.item.teacher}</Text>
|
||||||
|
<Text style={styles.accordianHeader}>{'\n'}{I18n.t('ssl.location')}</Text>
|
||||||
|
<Text style={[styles.accordianText, {paddingBottom: '4%'}]}>{item.item.location}</Text>
|
||||||
|
</View>:<></>}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
@ -91,7 +103,7 @@ class SSLOps extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
fetch(`http://localhost:8000/data/en/sslOps.json`,{
|
fetch(`${url}/api/`+String(I18n.locale).split('-')[0]+`/ssl_ops`,{
|
||||||
//fetch(`${url}/api/en/sslOps`,{
|
//fetch(`${url}/api/en/sslOps`,{
|
||||||
headers: {
|
headers: {
|
||||||
'Cache-Control': 'no-cache'
|
'Cache-Control': 'no-cache'
|
||||||
|
|
|
@ -28,9 +28,10 @@
|
||||||
<div class="bg-light border rounded-3 p-2">
|
<div class="bg-light border rounded-3 p-2">
|
||||||
<small>ID: {{id}} | LANG: {{lang}}</small>
|
<small>ID: {{id}} | LANG: {{lang}}</small>
|
||||||
<h3 class="my-2" style="font-size: 18px;">{{name}}</h3>
|
<h3 class="my-2" style="font-size: 18px;">{{name}}</h3>
|
||||||
<p class="mb-2">{{meeting}}</p>
|
<p class="mb-2">{{email}}</p>
|
||||||
<p class="mb-2">{{link}}</p>
|
<p class="mb-2">{{phone}}</p>
|
||||||
<p class="mt-2 mb-0">Sponsor: {{sponsor}}</p>
|
<p class="mb-2">{{position}}</p>
|
||||||
|
<p class="mb-2">{{image}}</p>
|
||||||
<form action="teachers/del" method="post">
|
<form action="teachers/del" method="post">
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<input type="number" class="form-control form-control-sm" id="id" name="id" value = {{id}} style="display: none">
|
<input type="number" class="form-control form-control-sm" id="id" name="id" value = {{id}} style="display: none">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user