Browse Source

Rename groupblic to node for a more consistence navigation

pull/90/head
Jaussoin Timothée 10 years ago
parent
commit
8e33d20ad9
  1. 2
      app/controllers/NodeController.php
  2. 2
      app/models/postn/Postn.php
  3. 7
      app/views/node.tpl
  4. 4
      app/widgets/Blog/Blog.php
  5. 11
      app/widgets/Blog/blog.tpl
  6. 2
      system/Route.php

2
app/controllers/GrouppublicController.php → app/controllers/NodeController.php

@ -1,6 +1,6 @@
<?php
class GrouppublicController extends BaseController {
class NodeController extends BaseController {
function load() {
$this->session_only = false;
}

2
app/models/postn/Postn.php

@ -362,7 +362,7 @@ class Postn extends Model {
if($this->isMicroblog()) {
return \Route::urlize('blog', array($this->origin));
} else {
return \Route::urlize('grouppublic', array($this->origin, $this->node));
return \Route::urlize('node', array($this->origin, $this->node));
}
}

7
app/views/node.tpl

@ -0,0 +1,7 @@
<main>
<section>
<div style="background-color: #EEE;">
<?php $this->widget('Blog');?>
</div>
</section>
</main>

4
app/widgets/Blog/Blog.php

@ -16,7 +16,7 @@ class Blog extends WidgetBase {
function load()
{
if($this->_view == 'grouppublic') {
if($this->_view == 'node') {
$this->_from = $this->get('s');
$this->_node = $this->get('n');
@ -29,7 +29,7 @@ class Blog extends WidgetBase {
$this->_from = $this->get('f');
$cd = new \modl\ContactDAO();
$this->_contact = $cd->get($from, true);
$this->_contact = $cd->get($this->_from, true);
if(filter_var($this->_from, FILTER_VALIDATE_EMAIL)) {
$this->_node = 'urn:xmpp:microblog:0';
} else {

11
app/widgets/Blog/blog.tpl

@ -45,7 +45,7 @@
<i class="zmdi zmdi-pages"></i>
</span>
<h2>
<a href="{$c->route('group', array($server, $node))}">
<a href="{$c->route('node', array($server, $node))}">
{if="$item != null"}
{if="$item->name"}
{$item->name}
@ -82,13 +82,12 @@
</span>
{/if}
<h2>
<a href="
{if="$value->isMicroblog()"}
{$c->route('blog', array($value->origin, $value->nodeid))}
<a {if="$value->isMicroblog()"}
href="{$c->route('blog', array($value->origin, $value->nodeid))}"
{else}
{$c->route('group', array($value->origin, $value->node, $value->nodeid))}
href="{$c->route('node', array($value->origin, $value->node, $value->nodeid))}"
{/if}
">
>
{if="$value->title != null"}
{$value->title}
{else}

2
system/Route.php

@ -15,7 +15,7 @@ class Route extends \BaseController {
'contact' => array('f'),
'disconnect' => array('err'),
'feed' => array('s', 'n'),
'grouppublic' => array('s', 'n', 'i'),
'node' => array('s', 'n', 'i'),
'group' => array('s', 'n', 'i'),
'help' => false,
'infos' => false,

Loading…
Cancel
Save