Browse Source

- Merge with edhelas

pull/16/head
Jaussoin Timothée 11 years ago
parent
commit
097db6c9ae
  1. 7
      app/controllers/PodsController.php
  2. 18
      app/views/pods.tpl
  3. 47
      app/widgets/Pods/pods.tpl

7
app/controllers/PodsController.php

@ -9,10 +9,7 @@ class PodsController extends BaseController {
function dispatch() {
$this->page->setTitle(__('title.discover', APP_TITLE));
$this->page->menuAddLink(__('page.home'), 'root');
$this->page->menuAddLink(__('page.discover'), 'discover');
$this->page->menuAddLink(__('page.pods'), 'pods', true);
$this->page->menuAddLink(__('page.about'), 'about');
$this->page->setColor('indigo');
}
}

18
app/views/pods.tpl

@ -1,12 +1,8 @@
<?php /* -*- mode: html -*- */
?>
<div id="main">
<div id="left">
</div>
<div id="center">
<?php $this->widget('Pods');?>
<div class="spacetop clear"></div>
</div>
<main>
<?php $this->widget('Header'); ?>
<section>
<div>
<?php $this->widget('Pods');?>
</div>
</section>
</div>

47
app/widgets/Pods/pods.tpl

@ -1,27 +1,30 @@
{if="isset($pods)"}
{loop="$pods->pods"}
<article class="block">
<header>
<span class="title">
<a href="{$value->url}" target="_blank">{function="parse_url($value->url, PHP_URL_HOST)"}</a>
<ul class="flex simple thick card">
{loop="$pods->pods"}
<li class="block condensed">
<span class="info">{$value->connected} / {$value->population}</span>
<span>
<a href="{$value->url}" target="_blank">
{function="parse_url($value->url, PHP_URL_HOST)"}
</a>
</span>
</header>
<section class="content">{$value->description}</section>
<footer class="padded">
<img
title="{$value->geo_country}"
alt="{$value->geo_country}"
src="{$c->flagPath($value->geo_country)}"/>
<span>{$c->countryName($value->geo_country)}</span>
{if="$value->geo_city != ''"}
• <span>{$value->geo_city}</span>
{/if}
<span>{$value->connected}{$value->population}</span>
</footer>
</article>
{/loop}
<p>{$value->description}</p>
<span class="info">
{$value->version}
</span>
<p>
<img
title="{$value->geo_country}"
alt="{$value->geo_country}"
src="{$c->flagPath($value->geo_country)}"/>
<span>{$c->countryName($value->geo_country)}</span>
{if="$value->geo_city != ''"}
• <span>{$value->geo_city}</span>
{/if}
</p>
</li>
{/loop}
</ul>
{else}
<div class="padded">
<div class="message error">{$c->__('api.error')}</div>

Loading…
Cancel
Save