{* DO NOT EDIT THIS FILE! Use an override template instead. *}
{let page_limit=6}

<form action={concat("class/classlist/",$GroupID)|ezurl} method="post" name="ClassList">

{switch name=Sw1 match=$class_count}
  {case match=0}
    <div class="feedback">
        <h2>{"No classes in "|i18n("design/standard/class/classlist")}{$group_name|wash}.</h2>
        <p>{"Click on the 'New' button to create a class."|i18n("design/standard/class/classlist")}</p>
    </div>
  {/case}
  {case}
    <div class="maincontentheader">
        <h1>{"Classes in"|i18n("design/standard/class/classlist")} {$group_name|wash}</h1>
    </div>
  {/case}
{/switch}
<table class="list" width="100%" cellpadding="0" cellspacing="0" border="0">
{section show=$groupclasses}
<tr>
    <th>{"ID"|i18n("design/standard/class/classlist")}</th>
    <th>{"Name"|i18n("design/standard/class/classlist")}</th>
    <th>{"Identifier"|i18n("design/standard/class/classlist")}</th>
    <th>{"Modifier"|i18n("design/standard/class/classlist")}</th>
    <th>{"Modified"|i18n("design/standard/class/classlist")}</th>
    <th>{"Object count"|i18n("design/standard/class/classlist")}</th>
    <th>{"Edit"|i18n("design/standard/class/classlist")}</th>
    <th>{"Copy"|i18n("design/standard/class/classlist")}</th>
    <th>{"Remove"|i18n("design/standard/class/classlist")}</th>
</tr>

{section name=Classes loop=$groupclasses sequence=array(bglight,bgdark)}
<tr class="{$Classes:sequence}">
    <td width="1%"><a href={concat( "/class/view/", $Classes:item.id )|ezurl}>{$Classes:item.id}</a></td>
    <td><a href={concat( "/class/view/", $Classes:item.id )|ezurl}>{$Classes:item.identifier|class_icon( small, $Classes:item.name )}&nbsp;{$Classes:item.name|wash}</a></td>
    <td>{$Classes:item.identifier|wash}</td>
    <td>{content_view_gui view=text_linked content_object=$Classes:item.modifier.contentobject}</td>
    <td><span class="small">{$Classes:item.modified|l10n(shortdatetime)}</span></td>
    <td><span class="small">{$Classes:item.object_count}</span></td>
    <td width="1%"><div class="listbutton"><a href={concat("class/edit/",$Classes:item.id)|ezurl}><img class="button" src={"edit.gif"|ezimage} width="16" height="16" alt="edit" /></a></div></td>
    <td width="1%"><div class="listbutton"><a href={concat("class/copy/",$Classes:item.id)|ezurl}><img class="button" src={"copy.gif"|ezimage} width="16" height="16" alt="edit" /></a></div></td>
    <td width="1%"><div align="right"><input type="checkbox" name="DeleteIDArray[]" value="{$Classes:item.id}"></div></td>
</tr>
{/section}
{/section}

<tr>
  <td colspan="8">
    <div class="buttonblock">
    {include uri="design:gui/button.tpl" name=new id_name=NewButton value="New class"|i18n("design/standard/class/classlist")}
    </div>
  </td>
  <td align="right">
    {section show=$class_count}
      <input type="image" name="RemoveButton" value="{'Remove'|i18n('design/standard/class/classlist')}" src={"trash.png"|ezimage} />
    {/section}
  </td>
</tr>
</table>

<input type="hidden" name = "CurrentGroupID" value="{$GroupID}" />
<input type="hidden" name = "CurrentGroupName" value="{$group_name}" />

{let latest_classes=fetch( class, latest_list, hash( limit, $page_limit ) )}

{section show=$latest_classes}
    <div class="maincontentheader">
        <h1>{"Last modified classes"|i18n("design/standard/class/classlist")}</h1>
    </div>
    <table class="list" width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <th>{"ID"|i18n("design/standard/class/classlist")}</th>
        <th>{"Name"|i18n("design/standard/class/classlist")}</th>
        <th>{"Identifier"|i18n("design/standard/class/classlist")}</th>
        <th>{"Modifier"|i18n("design/standard/class/classlist")}</th>
        <th>{"Modified"|i18n("design/standard/class/classlist")}</th>
        <th>{"Object count"|i18n("design/standard/class/classlist")}</th>
        <th>{"Edit"|i18n("design/standard/class/classlist")}</th>
        <th>{"Copy"|i18n("design/standard/class/classlist")}</th>
    </tr>

    {section var=class loop=$latest_classes sequence=array( bglight, bgdark )}
        <tr class="{$class.sequence}">
            <td width="1%"><a href={concat( "/class/view/", $class.item.id )|ezurl}>{$class.item.id}</a></td>
            <td><a href={concat( "/class/view/", $class.item.id )|ezurl}>{$class.identifier|class_icon( small, $class.name )}&nbsp;{$class.item.name|wash}</a></td>
            <td>{$class.item.identifier|wash}</td>
            <td>{content_view_gui view=text_linked content_object=$class.item.modifier.contentobject}</td>
            <td><span class="small">{$class.item.modified|l10n(shortdatetime)}</span></td>
            <td><span class="small">{$class.item.object_count}</span></td>
            <td width="1%"><div class="listbutton"><a href={concat("class/edit/",$class.item.id)|ezurl}><img class="button" src={"edit.gif"|ezimage} width="16" height="16" alt="edit" /></a></div></td>
            <td width="1%"><div class="listbutton"><a href={concat("class/copy/",$class.item.id)|ezurl}><img class="button" src={"copy.gif"|ezimage} width="16" height="16" alt="edit" /></a></div></td>
        </tr>
    {/section}
    </table>
{/section}

{/let}

</form>

{/let}
