From: <pk...@us...> - 2010-09-20 19:57:29
|
Revision: 29428 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=29428&view=rev Author: pkdille Date: 2010-09-20 19:57:23 +0000 (Mon, 20 Sep 2010) Log Message: ----------- [QT] Quality Team Backport r28888 | changi67 | 2010-09-03 09:55:22 +0200 (Fri, 03 Sep 2010) | 1 line [bp/28879] [MOD] use dynamic value for colspan according to prefs Modified Paths: -------------- branches/5.x/templates/tiki-forums.tpl branches/5.x/templates/tiki-list_articles.tpl branches/5.x/templates/tiki-list_blogs.tpl branches/5.x/templates/tiki-list_quizzes.tpl Modified: branches/5.x/templates/tiki-forums.tpl =================================================================== --- branches/5.x/templates/tiki-forums.tpl 2010-09-20 19:56:58 UTC (rev 29427) +++ branches/5.x/templates/tiki-forums.tpl 2010-09-20 19:57:23 UTC (rev 29428) @@ -41,28 +41,34 @@ <table class="normal"> <tr> <th>{self_link _sort_arg='sort_mode' _sort_field='name'}{tr}Name{/tr}{/self_link}</th> - + {assign var=numbercol value=1} {if $prefs.forum_list_topics eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{self_link _sort_arg='sort_mode' _sort_field='threads'}{tr}Topics{/tr}{/self_link}</th> {/if} {if $prefs.forum_list_posts eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{self_link _sort_arg='sort_mode' _sort_field='comments'}{tr}Posts{/tr}{/self_link}</th> {/if} {if $prefs.forum_list_ppd eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{tr}PPD{/tr}</th> {/if} - {if $prefs.forum_list_lastpost eq 'y'} + {if $prefs.forum_list_lastpost eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{self_link _sort_arg='sort_mode' _sort_field='lastPost'}{tr}Last Post{/tr}{/self_link}</th> {/if} {if $prefs.forum_list_visits eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{self_link _sort_arg='sort_mode' _sort_field='hits'}{tr}Visits{/tr}{/self_link}</th> {/if} {if ($tiki_p_admin eq 'y' or $tiki_p_admin_forum eq 'y')} + {assign var=numbercol value=`$numbercol+1`} <th>{tr}Actions{/tr}</th> {/if} </tr> @@ -139,7 +145,7 @@ </tr> {sectionelse} -<td class="odd" colspan="6"><strong>{tr}No records found.{/tr}</strong><td> + <tr><td class="odd" colspan="{$numbercol}"><strong>{tr}No records found.{/tr}</strong></td></tr> {/section} </table> Modified: branches/5.x/templates/tiki-list_articles.tpl =================================================================== --- branches/5.x/templates/tiki-list_articles.tpl 2010-09-20 19:56:58 UTC (rev 29427) +++ branches/5.x/templates/tiki-list_articles.tpl 2010-09-20 19:57:23 UTC (rev 29428) @@ -17,52 +17,67 @@ {include file='find.tpl' find_show_languages='y' find_show_categories_multi='y' find_show_num_rows='y' find_show_date_range='y'} {/if} +{assign var=numbercol value=0} <table class="normal"> <tr> {if $prefs.art_list_title eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{self_link _sort_arg='sort_mode' _sort_field='title'}{tr}Title{/tr}{/self_link}</th> {/if} {if $prefs.art_list_id eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{tr}Id{/tr}</th> {/if} - {if $prefs.art_list_type eq 'y'} + {if $prefs.art_list_type eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{self_link _sort_arg='sort_mode' _sort_field='type'}{tr}Type{/tr}{/self_link}</th> {/if} - {if $prefs.art_list_topic eq 'y'} + {if $prefs.art_list_topic eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{self_link _sort_arg='sort_mode' _sort_field='topicName'}{tr}Topic{/tr}{/self_link}</th> {/if} {if $prefs.art_list_date eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{self_link _sort_arg='sort_mode' _sort_field='publishDate'}{tr}PublishDate{/tr}{/self_link}</th> {/if} {if $prefs.art_list_expire eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{self_link _sort_arg='sort_mode' _sort_field='expireDate'}{tr}ExpireDate{/tr}{/self_link}</th> {/if} {if $prefs.art_list_visible eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th><span>{tr}Visible{/tr}</span></th> {/if} {if $prefs.art_list_lang eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{self_link _sort_arg='sort_mode' _sort_field='lang'}{tr}Lang{/tr}{/self_link}</th> {/if} {if $prefs.art_list_author eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{self_link _sort_arg='sort_mode' _sort_field='authorName'}{tr}AuthorName{/tr}{/self_link}</th> {/if} {if $prefs.art_list_rating eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th style="text-align:right;"> {self_link _sort_arg='sort_mode' _sort_field='rating'}{tr}Rating{/tr}{/self_link} </th> {/if} {if $prefs.art_list_reads eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th style="text-align:right;"> {self_link _sort_arg='sort_mode' _sort_field='nbreads'}{tr}Reads{/tr}{/self_link} </th> {/if} {if $prefs.art_list_size eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th style="text-align:right;">{self_link _sort_arg='sort_mode' _sort_field='size'}{tr}Size{/tr}{/self_link}</th> {/if} {if $prefs.art_list_img eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th>{tr}Img{/tr}</th> {/if} {if $tiki_p_edit_article eq 'y' or $tiki_p_remove_article eq 'y' or isset($oneEditPage) or $tiki_p_read_article} + {assign var=numbercol value=`$numbercol+1`} <th>{tr}Action{/tr}</th> {/if} </tr> @@ -134,11 +149,7 @@ </td> </tr> {sectionelse} - <tr> - <td class="odd" colspan="11"> - <b>{tr}No records found{/tr}</b> - </td> - </tr> + <tr><td class="odd" colspan="{$numbercol}"><strong>{tr}No records found.{/tr}</strong></td></tr> {/section} </table> Modified: branches/5.x/templates/tiki-list_blogs.tpl =================================================================== --- branches/5.x/templates/tiki-list_blogs.tpl 2010-09-20 19:56:58 UTC (rev 29427) +++ branches/5.x/templates/tiki-list_blogs.tpl 2010-09-20 19:57:23 UTC (rev 29428) @@ -13,28 +13,37 @@ {/if} <table class="normal"> +{assign var=numbercol value=1} <tr> {if $prefs.blog_list_title eq 'y' or $prefs.blog_list_description eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th><a href="tiki-list_blogs.php?offset={$offset}&sort_mode={if $sort_mode eq 'title_desc'}title_asc{else}title_desc{/if}">{tr}Blog{/tr}</a></th> {/if} {if $prefs.blog_list_created eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th><a href="tiki-list_blogs.php?offset={$offset}&sort_mode={if $sort_mode eq 'created_desc'}created_asc{else}created_desc{/if}">{tr}Created{/tr}</a></th> {/if} {if $prefs.blog_list_lastmodif eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th><a href="tiki-list_blogs.php?offset={$offset}&sort_mode={if $sort_mode eq 'lastModif_desc'}lastModif_asc{else}lastModif_desc{/if}">{tr}Last post{/tr}</a></th> {/if} {if $prefs.blog_list_user ne 'disabled'} + {assign var=numbercol value=`$numbercol+1`} <th><a href="tiki-list_blogs.php?offset={$offset}&sort_mode={if $sort_mode eq 'user_desc'}user_asc{else}user_desc{/if}">{tr}User{/tr}</a></th> {/if} {if $prefs.blog_list_posts eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th><a href="tiki-list_blogs.php?offset={$offset}&sort_mode={if $sort_mode eq 'posts_desc'}posts_asc{else}posts_desc{/if}">{tr}Posts{/tr}</a></th> {/if} {if $prefs.blog_list_visits eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th><a href="tiki-list_blogs.php?offset={$offset}&sort_mode={if $sort_mode eq 'hits_desc'}hits_asc{else}hits_desc{/if}">{tr}Visits{/tr}</a></th> {/if} {if $prefs.blog_list_activity eq 'y'} + {assign var=numbercol value=`$numbercol+1`} <th><a href="tiki-list_blogs.php?offset={$offset}&sort_mode={if $sort_mode eq 'activity_desc'}activity_asc{else}activity_desc{/if}">{tr}Activity{/tr}</a></th> {/if} +{assign var=numbercol value=`$numbercol+1`} <th>{tr}Action{/tr}</th> </tr> @@ -113,9 +122,7 @@ </td> </tr> {sectionelse} -<tr><td colspan="9" class="odd"> -{tr}No records found{/tr} -</td></tr> + <tr><td class="odd" colspan="{$numbercol}"><strong>{tr}No records found.{/tr}</strong></td></tr> {/section} </table> Modified: branches/5.x/templates/tiki-list_quizzes.tpl =================================================================== --- branches/5.x/templates/tiki-list_quizzes.tpl 2010-09-20 19:56:58 UTC (rev 29427) +++ branches/5.x/templates/tiki-list_quizzes.tpl 2010-09-20 19:57:23 UTC (rev 29428) @@ -16,16 +16,20 @@ <table class="normal"> <tr> + {assign var=numbercol value=1} <th> <a href="tiki-list_quizzes.php?offset={$offset}&sort_mode={if $sort_mode eq 'name_desc'}name_asc{else}name_desc{/if}">{tr}Quiz{/tr}</a> </th> + {assign var=numbercol value=`$numbercol+1`} <th> <a href="tiki-list_quizzes.php?offset={$offset}&sort_mode={if $sort_mode eq 'timeLimit_desc'}timeLimit_asc{else}timeLimit_desc{/if}">{tr}timeLimit{/tr}</a> </th> + {assign var=numbercol value=`$numbercol+1`} <th> {tr}Questions{/tr} </th> {if ($tiki_p_admin eq 'y' or $tiki_p_admin_quizzes eq 'y' or $tiki_p_view_quiz_stats eq 'y')} + {assign var=numbercol value=`$numbercol+1`} <th> {tr}Actions{/tr} </th> @@ -61,11 +65,7 @@ </tr> {/if} {sectionelse} - <tr> - <td class="{cycle}" colspan="4"> - {tr}No records.{/tr} - </td> - </tr> + <tr><td class="odd" colspan="{$numbercol}"><strong>{tr}No records found.{/tr}</strong></td></tr> {/section} </table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |