display icons for Character groups Quest Stations

This commit is contained in:
oliver 2016-01-22 20:51:23 +01:00
commit d5c68803f0
9 changed files with 144 additions and 36 deletions

View file

@ -0,0 +1 @@
<?=$file?>

View file

@ -78,27 +78,42 @@
</ul>
</nav>
<?php endif ?>
<?php if(!empty($stations)) : ?>
<ol class="grpqlist">
<?php foreach($stations as &$station) : ?>
<li>
<?php if(array_key_exists('created', $station)) : ?>
<span class="date">
<?=$dateFormatter->format(new \DateTime($station['created']))?>
<?=$timeFormatter->format(new \DateTime($station['created']))?>
</span>
<?php endif ?>
<span class="group">
<?php if(!array_key_exists('entered', $station) || $station['entered']) : ?>
<a href="<?=$linker->link(array('charactergroupsqueststations','station',$seminary['url'],$groupsgroup['url'],$quest['url'],$station['url']))?>"><?=$station['title']?></a>
<?php else : ?>
<?=_('Station not yet discovered')?>
<?php endif ?>
</span>
<?php if(array_key_exists('solved', $station) && $station['solved']) : ?>
<span class="xp">
<i class="fa fa-check-circle fa-fw"></i>
</span>
<?php if(!array_key_exists('created', $station) || $station['solved'] !== false) : ?>
<?php endif ?>
</li>
<?php endforeach ?>
</ol>
<?php else : ?>
<p><?=sprintf(_('Your %s-group has not discovered any station yet'), $groupsgroup['name'])?>.</p>
<?php endif ?>
<ol class="grpqslist">
<?php foreach($stations as &$station) : ?>
<li>
<?php if(!array_key_exists('entered', $station) || $station['entered']) : ?>
<a href="<?=$linker->link(array('charactergroupsqueststations','station',$seminary['url'],$groupsgroup['url'],$quest['url'],$station['url']))?>">
<?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']))?>" />
<?php else : ?>
<i class="fa fa-globe"></i>
<?php endif ?>
</a>
<?php else : ?>
<i class="fa fa-question-circle"></i>
<?php endif ?>
</li>
<?php endforeach ?>
</ol>
</section>
<section>

View file

@ -13,9 +13,7 @@
</nav>
<?php endif ?>
<?php if(array_key_exists('picture', $station)) : ?>
<h1><?=$station['title']?></h1>
<?php endif ?>
<ul class="gdata cf">
<?php if(!empty($station['longitude']) && !empty($station['latitude'])) : ?>
<li>
@ -29,6 +27,10 @@
</a>
</li>
<?php endif ?>
<?php if($solved !== false) : ?>
<li>
<i class="fa fa-check-circle fa-fw"></i>
<?php endif ?>
</ul>
<?php if(!empty($station['longitude']) && !empty($station['latitude'])) : ?>
@ -94,8 +96,8 @@
<span class="group"><a href="<?=$linker->link(array('charactergroups','group',$seminary['url'],$groupsgroup['url'],$group['url']))?>"><?=$group['name']?></a></span>
<?php if($group['solved'] !== false) : ?>
<span class="xp">
<i class="fa fa-check-square-o fa-fw"></i>
<?=_(sprintf('solved at %s', $timeFormatter->format(new \DateTime($group['solved']))))?>
<i class="fa fa-check-circle fa-fw"></i>
</span>
<?php endif ?>
</li>