Browse Source

- Merge with edhelas

pull/16/head
Jaussoin Timothée 12 years ago
parent
commit
d25d011537
  1. 2
      VERSION
  2. 4
      app/models/session/Session.php
  3. 34
      app/widgets/Node/Node.php
  4. 18
      app/widgets/Node/_node_content.tpl
  5. 21
      app/widgets/Node/node.tpl
  6. 2
      app/widgets/WidgetCommon/WidgetCommon.php
  7. 2
      index.php

2
VERSION

@ -1 +1 @@
0.7.2
0.7.3dev

4
app/models/session/Session.php

@ -13,13 +13,13 @@ class Session extends ModlModel {
$this->_struct = '
{
"name" :
{"type":"string", "size":128, "mandatory":true, "key":true },
{"type":"string", "size":32, "mandatory":true, "key":true },
"value" :
{"type":"text", "mandatory":true },
"session" :
{"type":"string", "size":128, "mandatory":true, "key":true },
"container" :
{"type":"string", "size":128, "mandatory":true, "key":true },
{"type":"string", "size":16, "mandatory":true, "key":true },
"timestamp" :
{"type":"date" }
}';

34
app/widgets/Node/Node.php

@ -39,6 +39,18 @@ class Node extends WidgetCommon
$this->view->assign('getmetadata', $this->genCallAjax('ajaxGetMetadata', "'".$_GET['s']."'", "'".$_GET['n']."'"));
$this->view->assign('hash', md5($_GET['s'].$_GET['n']));
$this->view->assign('items', $this->prepareNode($_GET['s'], $_GET['n']));
$nd = new modl\ItemDAO();
$node = $nd->getItem($_GET['s'], $_GET['n']);
if($node != null)
$title = $node->getName();
else
$title = $groupid;
$this->view->assign('title', $title);
$this->view->assign('formpublish', $this->prepareSubmitForm($_GET['s'], $_GET['n']));
}
function onPubsubSubscribed($params)
@ -65,8 +77,9 @@ class Node extends WidgetCommon
$this->role = $r[1];
}
$html = $this->prepareNode($params[1], $params[2]);
RPC::call('movim_fill', md5($params[1].$params[2]), $html);
if($this->searchSubscription($params[1], $params[2])
&& ($this->role == 'owner' || $this->role == 'publisher'))
RPC::call('movim_toggle_display', '#formpublish');
}
function onPubsubMetadata($params) {
@ -143,19 +156,10 @@ class Node extends WidgetCommon
}
function prepareNode($serverid, $groupid) {
$nd = new modl\ItemDAO();
$node = $nd->getItem($serverid, $groupid);
if($node != null)
$title = $node->getName();
else
$title = $groupid;
$nodeview = $this->tpl();
$nodeview->assign('title', $title);
$nodeview->assign('serverid', $serverid);
$nodeview->assign('groupid', $groupid);
$nodeview->assign('subscribed', $this->searchSubscription($serverid, $groupid));
$nodeview->assign('subscribed', $this->searchSubscription($serverid, $groupid));
$nodeview->assign('role', $this->role);
@ -163,12 +167,6 @@ class Node extends WidgetCommon
$nodeview->assign('getsubscription',$this->genCallAjax('ajaxGetSubscriptions', "'".$serverid."'", "'".$groupid."'"));
$nodeview->assign('subscribe', $this->genCallAjax('ajaxSubscribe', "movim_parse_form('groupsubscribe')", "'".$serverid."'", "'".$groupid."'"));
$nodeview->assign('unsubscribe', $this->genCallAjax('ajaxUnsubscribe', "'".$serverid."'", "'".$groupid."'"));
if($this->searchSubscription($serverid, $groupid)
&& ($this->role == 'owner' || $this->role == 'publisher'))
$submitform = $this->prepareSubmitForm($serverid, $groupid);
else
$submitform = '';
$nodeview->assign('submitform', $submitform);

18
app/widgets/Node/_node_content.tpl

@ -1,17 +1,4 @@
<div class="breadcrumb">
<a href="{$c->route('explore')}">
{$c->t('Explore')}
</a>
<a href="{$c->route('server', $serverid)}">
{$serverid}
</a>
<a href="{$c->route('node', array($serverid, $groupid))}">
{$title}
</a>
<a>{$c->t('Posts')}</a>
</div>
<div class="clear"></div>
<div class="posthead">
<div class="posthead padded">
{if="$subscribed == true"}
<a
href="#"
@ -57,9 +44,6 @@
>{$c->t('Configuration')}</a>
{/if}
</div>
<div class="metadata" id="metadata">
</div>
<div class="popup" id="groupsubscribe">
<form name="groupsubscribe">

21
app/widgets/Node/node.tpl

@ -1,4 +1,25 @@
<div class="tabelem protect red" id="node" title="{$c->t('Posts')}">
<div class="breadcrumb">
<a href="{$c->route('explore')}">
{$c->t('Explore')}
</a>
<a href="{$c->route('server', $server)}">
{$server}
</a>
<a href="{$c->route('node', array($server, $node))}">
{$title}
</a>
<a>{$c->t('Posts')}</a>
</div>
<div class="clear"></div>
<div class="metadata" id="metadata">
</div>
<div id="formpublish" style="display: none;">
{$formpublish}
</div>
<div id="{$hash}">
{$items}
</div>

2
app/widgets/WidgetCommon/WidgetCommon.php

@ -496,6 +496,8 @@ class WidgetCommon extends WidgetBase {
function ajaxPublishItem($server, $node, $form)
{
\movim_log($form);
$content = $form['content'];
$title = $form['title'];

2
index.php

@ -7,7 +7,7 @@
* @brief Prepares all the needed fixtures and fires up the main request
* handler.
*
* @author Movim Project <movim@movim.eu>
* @author Movim Project <contact@movim.eu>
*
* Copyright (C)2013 Movim Project
*

Loading…
Cancel
Save