github.com/keysonZZZ/kmg@v0.0.0-20151121023212-05317bfd7d39/kmgView/kmgBootstrap/tplTable.gohtml (about) 1 @{ 2 var table Table 3 } 4 <table class="table table-hover table-condensed"> 5 @if table.Caption!=nil{ 6 <caption>@raw(table.Caption.HtmlRender())</caption> 7 } 8 @if table.TitleList!=nil{ 9 <thead> 10 <tr> 11 @for _,title:=range table.TitleList{ 12 <th>@raw(title.HtmlRender())</th> 13 } 14 </tr> 15 </thead> 16 } 17 <tbody> 18 @for _,row:=range table.DataList{ 19 <tr> 20 @for _,cell:=range row{ 21 <td>@raw(cell.HtmlRender())</td> 22 } 23 </tr> 24 } 25 </tbody> 26 </table>