From: <am...@us...> - 2005-10-14 22:36:11
|
Update of /cvsroot/tikiwiki/tiki/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5321/templates Modified Files: Tag: BRANCH-1-9 tiki-view_tracker.tpl Log Message: Implemented tracker-rating in list tracker items view Index: tiki-view_tracker.tpl =================================================================== RCS file: /cvsroot/tikiwiki/tiki/templates/tiki-view_tracker.tpl,v retrieving revision 1.89.2.38 retrieving revision 1.89.2.39 diff -u -d -r1.89.2.38 -r1.89.2.39 --- tiki-view_tracker.tpl 23 Sep 2005 16:51:25 -0000 1.89.2.38 +++ tiki-view_tracker.tpl 14 Oct 2005 22:35:57 -0000 1.89.2.39 @@ -129,6 +129,15 @@ {section name=ix loop=$fields} {if $fields[ix].type eq 'l' and $fields[ix].isTblVisible eq 'y'} <td class="heading auto">{$fields[ix].name|default:" "}</td> +{elseif $fields[ix].type eq 's' and $fields[ix].name eq "Rating"} + <td class="heading auto"{if $tiki_p_tracker_vote_ratings eq 'y'} colspan="2"{/if}> + <a class="tableheading" href="tiki-view_tracker.php?{if $status}status={$status}&{/if}trackerId={$trackerId} + &offset={$offset}&sort_mode=f_{if $sort_mode eq 'f_'|cat:$fields[ix].fieldId|cat:'_asc'} + {$fields[ix].fieldId|escape:"url"}_desc{else}{$fields[ix].fieldId|escape:"url"}_asc{/if}"> + {$fields[ix].name|truncate:255:"..."|default:" "} + </a> + </td> + {assign var=rateFieldId value=$fields[ix].fieldId} {elseif $fields[ix].isTblVisible eq 'y' and $fields[ix].type ne 'x' and $fields[ix].type ne 'h'} <td class="heading auto"><a class="tableheading" href="tiki-view_tracker.php?{if $status}status={$status}&{/if}trackerId={$trackerId}&offset={$offset}&sort_mode=f_{if $sort_mode eq 'f_'|cat:$fields[ix].fieldId|cat:'_asc'}{$fields[ix].fieldId|escape:"url"}_desc{else}{$fields[ix].fieldId|escape:"url"}_asc{/if}">{$fields[ix].name|truncate:255:"..."|default:" "}</a></td> @@ -284,6 +293,42 @@ {if $o_opt eq '0'} {/if} {if $o_opt eq '0' or $o_opt eq 1}{tr}{$items[user].field_values[ix].value}{/tr}{/if} </td> + +{elseif $items[user].field_values[ix].type eq 's' and $items[user].field_values[ix].name eq "Rating" and $tiki_p_tracker_view_ratings eq 'y'} + <td class="auto"> + <b title="{tr}Rating{/tr}: {$items[user].field_values[ix].value|default:"-"}, {tr}Number of voices{/tr}: {$items[user].field_values[ix].numvotes|default:"-"}, {tr}Average{/tr}: {$items[user].field_values[ix].voteavg|default:"-"}"> + {$items[user].field_values[ix].value|default:"-"} + </b> + </td> + {if $tiki_p_tracker_vote_ratings eq 'y'} + <td class="auto" nowrap="nowrap"> + <span class="button2"> + {if $items[user].my_rate eq NULL} + <b class="linkbut highlight">-</b> + {else} + <a href="{$smarty.server.PHP_SELF}{if $query_string}?{$query_string}{else}?{/if} + trackerId={$items[user].trackerId} + &rateitemId={$items[user].itemId} + &fieldId={$rateFieldId} + &rate_{$items[user].trackerId}=NULL" + class="linkbut">-</a> + {/if} + {section name=i loop=$items[user].field_values[ix].options_array} + {if $items[user].field_values[ix].options_array[i] eq $items[user].my_rate} + <b class="linkbut highlight">{$items[user].field_values[ix].options_array[i]}</b> + {else} + <a href="{$smarty.server.PHP_SELF}? + trackerId={$items[user].trackerId} + &rateitemId={$items[user].itemId} + &fieldId={$rateFieldId} + &rate_{$items[user].trackerId}={$items[user].field_values[ix].options_array[i]}" + class="linkbut">{$items[user].field_values[ix].options_array[i]}</a> + {/if} + {/section} + </span> + </td> + {/if} + {elseif $items[user].field_values[ix].type ne 'x' and $items[user].field_values[ix].type ne 'h'} <td class="auto"> {if ($items[user].field_values[ix].type eq 't' or $items[user].field_values[ix].type eq 'n' or $items[user].field_values[ix].type eq 'c') |