Location: PHPKode > projects > SimpleHRM > simplehrm-1.0-beta1/simplehrm-1.0-beta1/templates/default/company/divisionlisting.tpl.html
{* notag *}
{if defined($smarty.const.LINK_SEPARATOR)}
	{assign var=sep value=$smarty.const.LINK_SEPARATOR}
{else}
	{assign var=sep value="-"}
{/if}
<div id="company_divisions">
    <div class="cont">
        <div class="cont_bg_top"></div>
        <div class="cont_bg_mdl">
                <div class="cont_hdr1 fltlft">
                    <div class="cont_hdr_lft fltlft"></div>
                    <div class="cont_hdr_mdl1 fltlft">
                        <div class="fltlft">
                            Divisions list ({$sm.next_prev->total})
                        </div>
                        <div class="fltrht">
                            <input type="button" name="addEditDivision" value="Add" onclick="addEditDivision('add','')"/>
                        </div>
                        <input type="hidden" name="start" id="start" value="{$sm.next_prev->start}" />
                        <input type="hidden" name="cnt" id="cnt" value="{$sm.list|@count}" />
                        <div class="clear"></div>
                    </div>    	        
                    <div class="cont_hdr_rht fltlft"></div>
                    <div class="clear"></div>
                </div>
                <div class="clear"></div>
                {if $sm.list}
                    <div class="cont_txt">
                        <div class="txtbg_top fltlft"></div>
                        <div class="txtbg_mdl fltlft">
                            <table width="97%" cellpadding="0" cellspacing="0" border="0" align="center" class="tbl_listing" style="margin-bottom:25px;">
                            <tr>
                                {foreach from=$sm.field item=item key=key name=foric}
                                    {if $key == $smarty.session.$m.sort_by}
                                    {if $smarty.session.$m.sort_order=="ASC"}
                                        {assign var=cls value="asc"}
                                    {else}
                                        {assign var=cls value="desc"}
                                    {/if}
                                    {else}
                                    {assign var=cls value=""}
                                    {/if}
                                    <th class="email">
                                        {if $item.1!=0}
                                        {if $sm.ajax}
                                        <a href="javascript:get_next_page('##APP_ROOT_URL##{$sm.uri}/sort_by{$sep}{$key}',0,0,'{$smarty.request.page}_{$smarty.request.choice}')">{if $item!=""}{$item.0}{else}{$key}{/if}</a>
                                        {else}
                                        <a href="##APP_ROOT_URL##{$sm.uri}/sort_by{$sep}{$key}">{if $item!=""}{$item.0}{else}{$key}{/if}</a>
                                        {/if}
                                        {else}
                                        {if $item!=""}{$item.0}{else}{$key}{/if}
                                        {/if}
                                    </th>
                                 {/foreach}
                                <th class="email">Employees</th>
                                <th class="email">Notes</th>
                                <th class="email brdr_none">Action</th>
                            </tr>
                            <tbody>
                            {section name=cur loop=$sm.list}
                            {assign var=x value=$sm.list[cur]}
                            <tr class="{cycle values="even,odd"}">
                                <td>{$x.div_name|capitalize:true}</td>
                                <td align="center">{if $sm.res1[$x.id_division]}{$sm.res1[$x.id_division]}{else}0{/if}</td>
                                <td>{$x.notes|wordwrap:40:"<br>"}</td>
                                <td>
                                    <a href="javascript:void(0);" onclick="addEditDivision('edit','{$x.id_division}')">
                                    <img src="##LBL_SITE_URL##templates/images/blue/edit_img.png" alt="" title="Edit"/></a>			
                                    &nbsp;&nbsp;&nbsp;
                                    {if !$sm.res1[$x.id_division]}
                                        <a href="javascript:void(0);" onclick="remove_division('{$x.id_division}','')">
                                        <img src="##LBL_SITE_URL##templates/images/blue/delete_img.png" alt="" title="Delete"/></a>		
                                    {/if}
                                </td>
                            </tr>
                            {/section}
                            </tbody>
                            </table>
                            <div>
                                {if $sm.type=='advance'}
                                <div class="pagination_adv">
                                {$sm.next_prev->generateadv()}
                                </div>
                                {elseif $sm.type=='box'}
                                <div class="pagination_box">
                                <div align="center">{$sm.next_prev->generate()}</div>
                                </div>
                                {elseif $sm.type=='normal'}
                                <div class="pagination">
                                <div align="center">{$sm.next_prev->generate()}</div>
                                </div>
                                {elseif $sm.type=='nextprev'}
                                <div class="pagination">
                                <div align="center">{$sm.next_prev->onlynextprev()}</div>
                                </div>
                                {elseif $sm.type=='extra'}
                                <div class="pagination_box">
                                <div align="center">{$sm.next_prev->generateextra()}</div>
                                </div>
                                {else}
                                {if $sm.type!='no'}
                                <div>
                                    <div align="center">{$sm.next_prev->generate()}</div>
                                </div>
                                {/if}
                                {/if}
                            </div>
                        </div>
                        <div class="txtbg_btm fltlft"></div>
                        <div class="clrbth"></div>
                    </div>
                {else}
                    <div align="center">No records found.</div>
                {/if}
            <div class="clear"></div>
        </div>
        <div class="cont_bg_btm"></div>
<div align="center"><font color=#707070>Note: A division with more than one department cannot be deleted.</font></div>
    </div>
</div>
Return current item: SimpleHRM