fix status icons for Stations (fixes #135)
This commit is contained in:
parent
cf21b6c1a0
commit
2904549a65
4 changed files with 40 additions and 11 deletions
|
|
@ -103,10 +103,18 @@
|
||||||
$station['id'],
|
$station['id'],
|
||||||
$charactergroup['id']
|
$charactergroup['id']
|
||||||
);
|
);
|
||||||
$station['solved'] = $this->Charactergroupsqueststations->hasCharactergroupSolvedStation(
|
if($station['entered']) {
|
||||||
$station['id'],
|
$station['tried'] = $this->Charactergroupsqueststations->hasCharactergroupTriedStation(
|
||||||
$charactergroup['id']
|
$station['id'],
|
||||||
);
|
$charactergroup['id']
|
||||||
|
);
|
||||||
|
if($station['tried']) {
|
||||||
|
$station['solved'] = $this->Charactergroupsqueststations->hasCharactergroupSolvedStation(
|
||||||
|
$station['id'],
|
||||||
|
$charactergroup['id']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -194,9 +194,9 @@
|
||||||
$solved = false;
|
$solved = false;
|
||||||
$tried = false;
|
$tried = false;
|
||||||
if(!is_null($charactergroup)) {
|
if(!is_null($charactergroup)) {
|
||||||
$solved = $this->Charactergroupsqueststations->hasCharactergroupSolvedStation($station['id'], $charactergroup['id']);
|
$tried = $this->Charactergroupsqueststations->hasCharactergroupTriedStation($station['id'], $charactergroup['id']);
|
||||||
if(!$solved) {
|
if($tried) {
|
||||||
$tried = $this->Charactergroupsqueststations->hasCharactergroupTriedStation($station['id'], $charactergroup['id']);
|
$solved = $this->Charactergroupsqueststations->hasCharactergroupSolvedStation($station['id'], $charactergroup['id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,9 +88,17 @@
|
||||||
<?=_('Station not yet discovered')?>
|
<?=_('Station not yet discovered')?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</span>
|
</span>
|
||||||
<?php if(array_key_exists('solved', $station) && $station['solved']) : ?>
|
<?php if(array_key_exists('entered', $station) && $station['entered']) : ?>
|
||||||
<span class="xp">
|
<span class="xp">
|
||||||
|
<?php if($station['tried']) : ?>
|
||||||
|
<?php if($station['solved']) : ?>
|
||||||
<i class="fa fa-check-circle fa-fw"></i>
|
<i class="fa fa-check-circle fa-fw"></i>
|
||||||
|
<?php else : ?>
|
||||||
|
<i class="fa fa-times-circle fa-fw"></i>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php else : ?>
|
||||||
|
<i class="fa fa-globe fa-fw"></i>
|
||||||
|
<?php endif ?>
|
||||||
</span>
|
</span>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</li>
|
</li>
|
||||||
|
|
@ -100,10 +108,18 @@
|
||||||
<ol class="grpqslist">
|
<ol class="grpqslist">
|
||||||
<?php foreach($stations as &$station) : ?>
|
<?php foreach($stations as &$station) : ?>
|
||||||
<li>
|
<li>
|
||||||
<?php if(!array_key_exists('entered', $station) || $station['entered']) : ?>
|
<?php if(array_key_exists('entered', $station) && $station['entered']) : ?>
|
||||||
<a href="<?=$linker->link(array('charactergroupsqueststations','station',$seminary['url'],$groupsgroup['url'],$quest['url'],$station['url']))?>">
|
<a href="<?=$linker->link(array('charactergroupsqueststations','station',$seminary['url'],$groupsgroup['url'],$quest['url'],$station['url']))?>">
|
||||||
|
<?php if($station['tried']) : ?>
|
||||||
|
<?php if($station['solved']) : ?>
|
||||||
<?php if(!is_null($station['stationpicture_id'])) : ?>
|
<?php if(!is_null($station['stationpicture_id'])) : ?>
|
||||||
<img title="<?=$station['title']?>" src="<?=$linker->link(array('media','charactergroupsqueststation',$seminary['url'],$groupsgroup['url'],$quest['url'],$station['url']))?>" />
|
<img title="<?=$station['title']?>" src="<?=$linker->link(array('media','charactergroupsqueststation',$seminary['url'],$groupsgroup['url'],$quest['url'],$station['url']))?>" />
|
||||||
|
<?php else : ?>
|
||||||
|
<i class="fa fa-circle"></i>
|
||||||
|
<?php endif ?>
|
||||||
|
<?php else : ?>
|
||||||
|
<i class="fa fa-times-circle"></i>
|
||||||
|
<?php endif ?>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<i class="fa fa-globe"></i>
|
<i class="fa fa-globe"></i>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,14 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php if($solved !== false) : ?>
|
<?php if($tried) : ?>
|
||||||
<li>
|
<li>
|
||||||
|
<?php if($solved) : ?>
|
||||||
<i class="fa fa-check-circle fa-fw"></i>
|
<i class="fa fa-check-circle fa-fw"></i>
|
||||||
|
<?php else : ?>
|
||||||
|
<i class="fa fa-times-circle fa-fw"></i>
|
||||||
|
<?php endif ?>
|
||||||
|
</li>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue