Browse Source

- Merge with me :p

pull/16/head
Jaussoin Timothée 11 years ago
parent
commit
4da2cf0768
  1. 17
      app/widgets/Subscribe/Subscribe.php
  2. 39
      app/widgets/Subscribe/subscribe.tpl
  3. 2
      composer.json

17
app/widgets/Subscribe/Subscribe.php

@ -35,18 +35,11 @@ class Subscribe extends WidgetBase {
}
function display() {
$xml = requestURL('http://movim.eu/server-vcards.xml', 1);
if($xml) {
$xml = simplexml_load_string($xml);
if($xml) {
$xml = (array)$xml->children();
$this->view->assign('servers', $xml['vcard']);
} else {
$this->view->assign('servers', false);
}
} else {
$this->view->assign('servers', false);
$json = requestURL(MOVIM_API.'servers', 1);
$json = json_decode($json);
if(is_object($json) && $json->status == 200) {
$this->view->assign('servers', $json->servers);
}
}
}

39
app/widgets/Subscribe/subscribe.tpl

@ -6,35 +6,32 @@
</li>
</ul>
<ul class="thick active divided spaced">
<ul class="thick active flex card">
{loop="$servers"}
<li
class="block condensed"
onclick="movim_redirect('{$c->route('accountnext', array($value->fn->text, false))}')">
<span class="icon bubble color {$value->fn->text|stringToColor}">
onclick="movim_redirect('{$c->route('accountnext', array($value->domain, false))}')">
<span class="icon bubble color {$value->description|stringToColor}">
{if="$value->checked"}
<i class="fa md-star-outline"></i>
{else}
{$value->fn->text|firstLetterCapitalize}
{$value->domain|firstLetterCapitalize}
{/if}
</span>
<div class="server {if="$value->checked"}star{/if}">
<span class="info">
<img
class="flag"
title="{$value->adr->country}"
alt="{$value->adr->country}"
src="{$c->flagPath($value->adr->country)}"/>
</span>
<span>{$value->fn->text}</span>
<p>
{$value->note->text}<br />
<a target="_blank" href="{$value->url->uri}">
{$value->url->uri}
</a>
</p>
</div>
<span class="info">
<img
class="flag"
title="{$value->geo_country}"
alt="{$value->geo_country}"
src="{$c->flagPath($value->geo_country)}"/>
</span>
<span>{$value->domain}</span>
<p>
{$value->description}<br />
<a target="_blank" href="{$value->url}">
{$value->url}
</a>
</p>
</li>
{/loop}

2
composer.json

@ -7,7 +7,7 @@
"require": {
"monolog/monolog": "1.8.*",
"libchart/libchart": "dev-default",
"libchart/libchart": "dev-master",
"rain/raintpl": "dev-master",
"michelf/php-markdown": "1.4.*@dev",
"movim/modl": "dev-master",

Loading…
Cancel
Save