Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make articles and wiki aware of list services

  • Loading branch information...
commit f4772a203a1dbd132e5aa737bc53332a8cabfde4 1 parent 77763a3
Max Kremmel authored
Showing with 38 additions and 8 deletions.
  1. +4 −4 BitArticle.php
  2. +5 −1 list.php
  3. +29 −3 templates/list_articles.tpl
View
8 BitArticle.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_articles/BitArticle.php,v 1.131 2007/07/27 14:38:20 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_articles/BitArticle.php,v 1.132 2007/08/23 08:10:21 squareing Exp $
* @package article
*
* Copyright( c )2004 bitweaver.org
@@ -9,14 +9,14 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: BitArticle.php,v 1.131 2007/07/27 14:38:20 squareing Exp $
+ * $Id: BitArticle.php,v 1.132 2007/08/23 08:10:21 squareing Exp $
*
* Article class is used when accessing BitArticles. It is based on TikiSample
* and builds on core bitweaver functionality, such as the Liberty CMS engine.
*
* created 2004/8/15
* @author wolffy <wolff_borg@yahoo.com.au>
- * @version $Revision: 1.131 $ $Date: 2007/07/27 14:38:20 $ $Author: squareing $
+ * @version $Revision: 1.132 $ $Date: 2007/08/23 08:10:21 $ $Author: squareing $
*/
/**
@@ -487,7 +487,7 @@ function getList( &$pParamHash ) {
$selectSql = '';
$bindVars = array();
array_push( $bindVars, $this->mContentTypeGuid );
- $this->getServicesSql( 'content_list_sql_function', $selectSql, $joinSql, $whereSql, $bindVars );
+ $this->getServicesSql( 'content_list_sql_function', $selectSql, $joinSql, $whereSql, $bindVars, NULL, $pParamHash );
$find = $pParamHash['find'];
if( is_array( $find ) ) {
View
6 list.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_articles/list.php,v 1.19 2007/07/06 16:37:22 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_articles/list.php,v 1.20 2007/08/23 08:10:21 squareing Exp $
* @package article
* @subpackage functions
*/
@@ -18,6 +18,10 @@
// Now check permissions to access this page
$gBitSystem->verifyPermission( 'p_articles_read' );
+// get services set up
+$gContent = new BitArticle();
+$gContent->invokeServices( 'content_list_function', $_REQUEST );
+
// nuke articles if requested
if( !empty( $_REQUEST['action'] ) ) {
if( $_REQUEST['action'] == 'remove' && !empty( $_REQUEST['remove_article_id'] ) ) {
View
32 templates/list_articles.tpl
@@ -1,4 +1,4 @@
-{* $Header: /cvsroot/bitweaver/_bit_articles/templates/list_articles.tpl,v 1.20 2007/06/23 05:22:18 lsces Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_articles/templates/list_articles.tpl,v 1.21 2007/08/23 08:10:21 squareing Exp $ *}
<div class="floaticon">{bithelp}</div>
{strip}
@@ -26,31 +26,39 @@
{if $gBitSystem->isFeatureActive( 'articles_list_expire' )}
<li>{smartlink ititle='Expire Date' isort='expire_date' offset=$offset type=$find_type topic=$find_topic}</li>
{/if}
+ {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='list_sort'}
</ul>
</div>
<div class="clear"></div>
+ {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='list_options'}
+
{include file="bitpackage:articles/article_filter_inc.tpl"}
{form}
<table class="data">
<caption>{tr}Articles Listing{/tr}</caption>
<tr>
+ {counter name=cols start=0 print=false}
{if $gBitSystem->isFeatureActive( 'articles_list_img' )}
<th style="width:10px;">{tr}Image{/tr}</th>
{/if}
{if $gBitSystem->isFeatureActive( 'articles_list_type' )}
<th>{smartlink ititle='Type' isort='type_name' offset=$offset type=$find_type topic=$find_topic}</th>
+ {counter name=cols assign=cols print=false}
{/if}
{if $gBitSystem->isFeatureActive( 'articles_list_topic' )}
<th>{smartlink ititle='Topic' isort='topic_name' offset=$offset type=$find_type topic=$find_topic}</th>
+ {counter name=cols assign=cols print=false}
{/if}
{if $gBitSystem->isFeatureActive( 'articles_list_status' )}
<th>{smartlink ititle='Status' isort='status_id' offset=$offset type=$find_type topic=$find_topic}</th>
+ {counter name=cols assign=cols print=false}
{/if}
{if $gBitSystem->isFeatureActive( 'articles_list_reads' )}
<th>{smartlink ititle='Reads' isort='hits' offset=$offset type=$find_type topic=$find_topic}</th>
+ {counter name=cols assign=cols print=false}
{/if}
<th>{tr}Action{/tr}</th>
</tr>
@@ -71,7 +79,7 @@
</td>
{/if}
- <td colspan="5">
+ <td colspan="{$cols}">
{if $gBitSystem->isFeatureActive( 'articles_list_title' )}
<h2>
{if $gBitUser->hasPermission( 'p_articles_read' )}
@@ -96,11 +104,29 @@
{tr}Displayed until <strong>{$article.expire_date|bit_short_datetime}</strong>{/tr}
{/if}
</td>
+
+ <td style="text-align:right; vertical-align:top;">
+ {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='list_actions' serviceHash=$article}
+ </td>
</tr>
<tr class="{cycle}">
{if $gBitSystem->isFeatureActive( 'articles_list_type' )}
- <td>{tr}{$article.type_name}{/tr}</td>
+ <td>
+ {tr}{$article.type_name}{/tr}
+ {if $article.use_ratings eq 'y'}
+ <br />
+ <span class="rating">
+ {repeat count=$article.rating}
+ {biticon ipackage=articles iname=rating iexplain="Article Rating"}
+ {/repeat}
+ {math assign=rating_off equation="5-x" x=$article.rating}
+ {repeat count=$rating_off}
+ {biticon ipackage=articles iname=rating_off iexplain="Article Rating"}
+ {/repeat}
+ </span>
+ {/if}
+ </td>
{/if}
{if $gBitSystem->isFeatureActive( 'articles_list_topic' )}
<td>{$article.topic_name}</td>

0 comments on commit f4772a2

Please sign in to comment.
Something went wrong with that request. Please try again.