diff options
| author | wjames5 <will@tekimaki.com> | 2007-05-07 20:59:45 +0000 |
|---|---|---|
| committer | wjames5 <will@tekimaki.com> | 2007-05-07 20:59:45 +0000 |
| commit | 32ba76313667d8555c65dd2dad225d8161a1811a (patch) | |
| tree | cfa2f48c3b997f231e7eb2a4d91e3d0d4210e331 | |
| parent | 9b8086aa2ba10bd1581568474c7f37a4e971cabf (diff) | |
| download | tags-32ba76313667d8555c65dd2dad225d8161a1811a.tar.gz tags-32ba76313667d8555c65dd2dad225d8161a1811a.tar.bz2 tags-32ba76313667d8555c65dd2dad225d8161a1811a.zip | |
fix listing sort options and pagination links
| -rwxr-xr-x | LibertyTag.php | 26 | ||||
| -rw-r--r-- | templates/list_content.tpl | 30 | ||||
| -rw-r--r-- | templates/list_tags.tpl | 2 |
3 files changed, 44 insertions, 14 deletions
diff --git a/LibertyTag.php b/LibertyTag.php index 97f34b2..22169c6 100755 --- a/LibertyTag.php +++ b/LibertyTag.php @@ -360,10 +360,32 @@ class LibertyTag extends LibertyBase { $bindVars = array(); $sort_mode_prefix = 'tg'; - if( empty( $pParamHash['sort_mode'] ) ) { + + $sortHash = array( + 'content_id_desc', + 'content_id_asc', + 'modifier_user_desc', + 'modifier_user_asc', + 'modifier_real_name_desc', + 'modifier_real_name_asc', + 'creator_user_desc', + 'creator_user_asc', + 'creator_real_name_desc', + 'creator_real_name_asc', + 'title_asc', + 'title_desc', + 'content_type_guid_asc', + 'content_type_guid_desc', + 'ip_asc', + 'ip_desc', + 'last_modified_asc', + 'last_modified_desc', + ); + + if( empty( $pParamHash['sort_mode'] ) || in_array( $pParamHash['sort_mode'], $sortHash ) ) { $pParamHash['sort_mode'] = 'tag_asc'; } - + /** * @TODO this all needs to go in in some other getList type method * and these are just sketches - need to be different kinds of queries in most cases diff --git a/templates/list_content.tpl b/templates/list_content.tpl index b4fe9a7..acfd727 100644 --- a/templates/list_content.tpl +++ b/templates/list_content.tpl @@ -32,8 +32,9 @@ <th>{smartlink ititle="Title" tags=$tagsReq isort=title list_page=$listInfo.current_page user_id=$user_id content_type_guid=$contentSelect find=$listInfo.find idefault=1}</th> <th>{smartlink ititle="Content Type" tags=$tagsReq isort=content_type_guid list_page=$listInfo.current_page user_id=$user_id content_type_guid=$contentSelect find=$listInfo.find}</th> <th>{smartlink ititle="Author" tags=$tagsReq isort=$isort_author list_page=$listInfo.current_page user_id=$user_id content_type_guid=$contentSelect find=$listInfo.find}</th> - <th colspan="2">{smartlink ititle="Most recent editor" tags=$tagsReq isort=$isort_editor list_page=$listInfo.current_page user_id=$user_id content_type_guid=$contentSelect find=$listInfo.find}</th> - <th colspan="2">{smartlink ititle="IP" tags=$tagsReq isort=ip list_page=$listInfo.current_page user_id=$user_id content_type_guid=$contentSelect find=$listInfo.find}</th> + <th>{smartlink ititle="Most recent editor" tags=$tagsReq isort=$isort_editor list_page=$listInfo.current_page user_id=$user_id content_type_guid=$contentSelect find=$listInfo.find}</th> + <th>{smartlink ititle="Last Modified" tags=$tagsReq isort=last_modified list_page=$listInfo.current_page user_id=$user_id content_type_guid=$content_type_guids find=$listInfo.find}</th> + <th>{smartlink ititle="IP" tags=$tagsReq isort=ip list_page=$listInfo.current_page user_id=$user_id content_type_guid=$contentSelect find=$listInfo.find}</th> </tr> {foreach from=$contentList item=item} <tr class="{cycle values='odd,even'}"> @@ -41,20 +42,27 @@ <td>{$item.display_link}</td> <td>{assign var=content_type_guid value=`$item.content_type_guid`}{$contentTypes.$content_type_guid}</td> <td>{displayname real_name=$item.creator_real_name user=$item.creator_user}</td> - <td style="text-align:right;">{displayname real_name=$item.modifier_real_name user=$item.modifier_user}</td> - <td style="text-align:right;">{$item.last_modified|bit_short_date}</td> - <td>{$item.ip}</td> + <td style="text-align:left;">{displayname real_name=$item.modifier_real_name user=$item.modifier_user}</td> + <td style="text-align:center;">{$item.last_modified|bit_short_date}</td> + <td style="text-align:center;">{$item.ip}</td> </tr> {/foreach} </table> - {pagination} - - <div class="header"> - <h1>{tr}Tags{/tr}</h1> - </div> + {pagination tags=$tagsReq} + </div><!-- end .body --> + + <div class="header"> + <h1>{tr}Tags{/tr}</h1> + </div> - {include file="bitpackage:tags/tags_cloud.tpl"} + <div class="body"> + {if $cloud} + {include file="bitpackage:tags/tags_cloud.tpl"} + {else} + {include file="bitpackage:tags/tags_list.tpl"} + {/if} </div><!-- end .body --> + </div><!-- end .liberty --> {/strip} diff --git a/templates/list_tags.tpl b/templates/list_tags.tpl index e0f2349..a26b559 100644 --- a/templates/list_tags.tpl +++ b/templates/list_tags.tpl @@ -1,4 +1,4 @@ -<div class="floaticon">{bithelp}</div> +<!-- <div class="floaticon">{bithelp}</div> --> {strip} <div class="listing tags"> |
