source: aowow/templates/wowhead/bricks/item_table.tpl

Last change on this file was 170, checked in by maron, 16 years ago
  • Property svn:executable set to *
File size: 3.2 KB
Line 
1{strip}
2
3{assign var="cost" value=true}
4{assign var="percent" value=false}
5{assign var="classs1" value=true}
6{assign var="classs2" value=true}
7{assign var="classs4" value=true}
8{assign var="group" value=false}
9
10{foreach from=$data item=curr}
11 {if !(isset($curr.cost))}{assign var="cost" value=false}{/if}
12 {if isset($curr.percent)}{assign var="percent" value=true}{/if}
13 {if !($curr.classs==1)}{assign var="classs1" value=false}{/if}
14 {if !($curr.classs==2)}{assign var="classs2" value=false}{/if}
15 {if !($curr.classs==4)}{assign var="classs4" value=false}{/if}
16 {if isset($curr.group)}{assign var="group" value=true}{/if}
17{/foreach}
18
19new Listview(
20 {ldelim}template:'item',
21 id:'{$id}',
22 {if (isset($name))}name: LANG.tab_{$name},{/if}
23 {if (isset($tabsid))}tabs:{$tabsid},parent:'listview-generic',{/if}
24 extraCols:[
25 {if $percent}Listview.extraCols.percent{/if}
26 {if $group},Listview.funcBox.createSimpleCol('group', 'group', '10%', 'group'){/if}
27 {if $cost}Listview.extraCols.stock, Listview.extraCols.cost{/if}
28 ],
29 {if $classs1}visibleCols: ['slots'],
30 {elseif $classs2}visibleCols: ['dps', 'speed'],
31 {elseif $classs4}visibleCols: ['armor', 'slot'],{/if}
32 hiddenCols:['source'],
33 sort: [{if $percent}'-percent',{/if}'name'],
34 data: [
35 {section name=i loop=$data}
36 {ldelim}
37 {* Название/качество вещи, обязательно *}
38 name: '{$data[i].quality2}{$data[i].name|escape:"quotes"}',
39 {* Уровень вещи *}
40 {if $data[i].level}
41 level: {$data[i].level},
42 {/if}
43 {* Требуемый уровень вещи *}
44 {if $data[i].reqlevel}
45 reqlevel: {$data[i].reqlevel},
46 {/if}
47 {* Класс вещи, обязательно *}
48 classs: {$data[i].classs},
49 {* Подкласс вещи, обязательно *}
50 subclass: {$data[i].subclass},
51 {* Кол-во вещей при дропе *}
52 {if isset($data[i].maxcount)}
53 {if $data[i].maxcount>1}
54 stack:[{$data[i].mincount},{$data[i].maxcount}],
55 {/if}
56 {/if}
57 {* Процент дропа *}
58 {if $percent}
59 percent: {$data[i].percent},
60 {/if}
61 {if isset($data[i].group) and isset($data[i].grouppercent)}
62 group: '{$data[i].group} [{$data[i].grouppercent}%]',
63 {/if}
64 {* Стоимость *}
65 {if $cost}
66 {* Макс. кол-во на продажу *}
67 stock: -1,
68 cost: [
69 {if isset($data[i].cost.money)}{$data[i].cost.money}{/if}
70 {if isset($data[i].cost.honor) or isset($data[i].cost.arena) or isset($data[i].cost.items)}
71 ,{if isset($data[i].cost.honor)}{$data[i].cost.honor}{/if}
72 {if isset($data[i].cost.arena) or isset($data[i].cost.items)}
73 ,{if isset($data[i].cost.arena)}{$data[i].cost.arena}{/if}
74 {if isset($data[i].cost.items)}
75 ,[
76 {foreach from=$data[i].cost.items item=curitem name=c}
77 [{$curitem.item},{$curitem.count}]
78 {if $smarty.foreach.c.last}{else},{/if}
79 {/foreach}
80 ]
81 {/if}
82 {/if}
83 {/if}
84 ],
85 {/if}
86 {if $classs1==1}
87 nslots: {$data[i].slots},
88 {/if}
89 {if $classs2}
90 dps: {$data[i].dps},
91 speed: {$data[i].speed},
92 {/if}
93 {if $classs4}
94 armor: {$data[i].armor},
95 slot: {$data[i].slot},
96 {/if}
97 {* Номер вещи, обязателен *}
98 id: {$data[i].entry}
99 {rdelim}{if $smarty.section.i.last}{else},{/if}
100 {/section}
101 ]{rdelim}
102);
103{/strip}
104
Note: See TracBrowser for help on using the repository browser.