
{include file= $AUTOSIZE_PATH_ABS|@cat:'admin/template/header.tpl'}

{html_head}
{literal}
<style type="text/css">
.td_autosize {
  font-weight: bold;  
  background-color:transparent;
  border:none;
  padding-right:10px;
}

.sizeForUserStatus, .autosizeConfig {
  margin:0;
  background:none;
  z-index:-500;
}

.autosizeConfig .cluetip {
  font-weight:bold;
  padding-right:10px;
}

.autosizeConfig input[type="text"] {
  width:50px;
}

.select {
  font-weight: bold;
}
.noselect {
  font-weight: normal;
}

</style>
{/literal}
<script type="text/javascript">

var  Autosize_options={ldelim}
      DEBUG_autosize:'{$DEBUG_autosize}',
     theme:'{$theme}',
     src_img : '{$SRC_IMG}',
     fade_in : '{$fade_in}',
     cl_visible : "{$cl_visible}" =="true",
     thumbnail : '{$thumbnail}',
     scaled_width :  '{$SCALED_WIDTH}', // valeur par defaut
     scaled_height : '{$SCALED_HEIGHT}', // valeur par defaut
     img_width:'{$IMG_WIDTH }',
     img_height : '{ $IMG_HEIGHT }',
     cookie_width:'{$COOKIE_WIDTH }',
     cookie_height : '{ $COOKIE_HEIGHT }',
     marge_basse:'{ $MARGE_BASSE }',
     echelle_max:'{ $ECHELLE_MAX }',
     mini_width:'{ $MINI_WIDTH   }',
     mini_height : '{ $MINI_HEIGHT   }',
     mini_width2 : '{ $MINI_WIDTH2 }',
     mini_height2 : '{ $MINI_HEIGHT2 }',

     webmaster_type:'{$webmaster_type   }',
     webmaster_enabled : '{ $webmaster_enabled   }',

     admin_type:'{ $admin_type   }',     
     admin_enabled : '{ $admin_enabled   }',

     generic_type:'{ $generic_type   }',    
     generic_enabled : '{ $generic_enabled   }',

     guest_type:'{ $guest_type   }', 
     guest_enabled : '{ $guest_enabled   }',

     normal_type:'{$normal_type}',
     normal_enabled : '{ $normal_enabled   }',

     user_status:'{$user_status}',   
  
     check_desc_v :  '{$check_desc_v}' ,
     defaut_type:  '{$defaut_type}' 
    } ;

</script>
 

 
   
{/html_head}

{* $Id: autosize admin.tpl  *}
 <!--- HEAD autosize TPL --->


<script type="text/javascript">

{literal}
jQuery().ready(function(){ 
  jQuery('.cluetip').cluetip({ 
    width: 300,
    splitTitle: '|'    ,
    clickThrough: true
  });
 {/literal}
 {$reload}
 {if  ($reload==true) }
document.location.reload(false); // from cache
  
 {/if}
{literal}

   function set_chk() {
    var n = jQuery("input[name='defaut_type'].chk:checked").length;
    if (n == 0) {
      b = "select";
      a = "noselect";
    } else {
      a = "select";
      b = "noselect";
    }
    c = jQuery('input[name = "defaut_type"]').next();
    jQuery(c).removeClass(a);
    jQuery(c).next().removeClass(b);
    jQuery(c).addClass(b);
    jQuery(c).next().addClass(a);    
  }
  jQuery('input.chk ').click(function (i) {
    set_chk();
  })


  set_chk();

});

</script>
{/literal}
<!--============== assign visible =======================-->	
{assign var="affiche_cde" value="true"}
{if $affiche_cde == "true"}
  {assign var="visible" value="block"}
{else}
  {assign var="visible" value="none"}
{/if}

<div class="titrePage">
		<h2 class="cluetip" title="{'cl_autosize_help'|@translate}|{'cl_autosize_hlp_line6'|@translate}">{'Autosize'|translate} {'version'|translate} {$cl_version}  <img alt="(?)" src="admin/themes/clear/icon/help.png"/></h2>
</div>

<!--============== !DIV ==={$IMG_WIDTH  }=={$IMG_HEIGHT  }======-->	
  <form action="" method="post" name="form_autosize" id="form_autosize"    >

    <fieldset>
  	<legend class="cluetip" title="{'cl_autosize_config_title_1'|@translate}|{'cl_autosize_hlp_line1'|@translate}">{'cl_autosize_config_title_1'|@translate}</legend>
  <table class="sizeForUserStatus">
        <tr>
        <td class="td_autosize pluginBox">{'User status'|@translate}</td>
         <td class="td_autosize pluginBox">{'Photo sizes'|@translate}</td>        
        </tr>
        <tr name="webmaster_enabled">

        <td><label><input name="webmaster_enabled" id="webmaster_enabled" type="checkbox"  value ="on" {$webmaster_enabled}  /> {'user_status_webmaster'|@translate}</label></td>
         <td> 
         {if isset ($webmaster_type)}
          <select name="webmaster_type">
              {foreach from=$webmaster_type.OPTIONS item=type_size key=value}
        <option value="{$value}" {if $value == $webmaster_type.SELECTED}selected="selected"{/if} {if is_numeric($value)}disabled="disabled"{/if}>{$type_size}</option>
              {/foreach}
        </select>
        {/if}
      </td>
        </tr>

        <tr name="admin_enabled">
        <td><label><input name="admin_enabled" id="admin_enabled" type="checkbox"  value ="on" {$admin_enabled} /> {'user_status_admin'|@translate}</label></td>
        <td> {if isset ($admin_type)}
          <select name="admin_type">
              {foreach from=$admin_type.OPTIONS item=type_size key=value}
        <option value="{$value}" {if $value == $admin_type.SELECTED}selected="selected"{/if} {if is_numeric($value)}disabled="disabled"{/if}>{$type_size}</option>
              {/foreach}
        </select>
        {/if}
        </td>
        </tr>

        <tr name="generic_enabled">
        <td><label><input name="generic_enabled" id="generic_enabled" type="checkbox"  value ="on" {$generic_enabled} /> {'user_status_generic'|@translate}</label></td>
        <td>{if isset ($generic_type)}
          <select name="generic_type">
              {foreach from=$generic_type.OPTIONS item=type_size key=value}
        <option value="{$value}" {if $value == $generic_type.SELECTED}selected="selected"{/if} {if is_numeric($value)}disabled="disabled"{/if}>{$type_size}</option>
              {/foreach}
        </select>
        {/if}
        </td>
         <td ></td>
        </tr>

        <tr name="guest_enabled">
        <td><label><input name="guest_enabled" id="guest_enabled" type="checkbox"  value ="on" {$guest_enabled} /> {'user_status_guest'|@translate}</label></td>
        <td>{if isset ($guest_type)}
          <select name="guest_type">
              {foreach from=$guest_type.OPTIONS item=type_size key=value}
        <option value="{$value}" {if $value == $guest_type.SELECTED}selected="selected"{/if} {if is_numeric($value)}disabled="disabled"{/if}>{$type_size}</option>
              {/foreach}
        </select>
        {/if}</td>
        </tr>

        <tr name="normal_enabled">
        <td><label><input name="normal_enabled" id="normal_enabled" type="checkbox"  value ="on" {$normal_enabled} /> {'user_status_normal'|@translate}</label></td>
        <td>{if isset ($normal_type)}
          <select name="normal_type">
              {foreach from=$normal_type.OPTIONS item=type_size key=value}
        <option value="{$value}" {if $value == $normal_type.SELECTED}selected="selected"{/if} {if is_numeric($value)}disabled="disabled"{/if}>{$type_size}</option>
              {/foreach}
        </select>
        {/if}</td>
        </tr>
  </table>

  </fieldset>


   <fieldset>
  	<legend class="cluetip" title="{'cl_autosize_config_title_2'|@translate}|{'cl_autosize_hlp_line2'|@translate}">{'cl_autosize_config_title_2'|@translate}</legend>
 <table class="autosizeConfig">

    <!--======== Dimensions HL ===================-->	
    <tr> 
      <td class="cluetip" title="{'cl_autosize_miniheight'|@translate}|{'cl_autosize_hlp_line3'|@translate}" >{'cl_autosize_miniheight'|translate}</td>
      <td ><input name="mini_height" id="mini_height" type="text"  value ="{$MINI_HEIGHT}" /> px 
      </td> 
    </tr>
    <tr>
      <td class="cluetip" title="{'cl_autosize_miniwidth'|translate}|{'cl_autosize_hlp_line3'|@translate}"  > {'cl_autosize_miniwidth'|translate}</td>
      <td>
        <input name="mini_width"  id="mini_width" type="text" value =  "{$MINI_WIDTH}" /> px
      </td>
    </tr>

    <!--======== Dimensions HL2 ===================-->	
    <tr> 
      <td class="cluetip" title="{'cl_autosize_miniheight2'|@translate}|{'cl_autosize_hlp_line32'|@translate}" >{'cl_autosize_miniheight2'|translate}</td>
      <td ><input name="mini_height2" id="Text2" type="text"  value ="{$MINI_HEIGHT2}" /> px 
           </td> 
    </tr>
    <tr>
	 
     <td class="cluetip" title="{'cl_autosize_miniwidth2'|translate}|{'cl_autosize_hlp_line32'|@translate}"  > {'cl_autosize_miniwidth2'|translate}</td>
   <td  >
    <input name="mini_width2"  id="Text4" type="text" value =  "{$MINI_WIDTH2}" /> px
       </tr>
   <!--======== Positions  ===================-->	
<tr >
 <td class="cluetip" title="{'cl_autosize_echelle_max'|translate}|{'cl_autosize_hlp_line4'|@translate}" > {'cl_autosize_echelle_max'|translate}</td>
 <td  >
 <input name="echelle_max" id="echelle_max"  type="text" value ="{$ECHELLE_MAX}" /> 
 </td>
 
</tr>

<tr >  
<td class="cluetip" title="{'cl_autosize_marge_basse'|translate}|{'cl_autosize_hlp_line5'|@translate}" > {'cl_autosize_marge_basse'|translate}</td>
<td><input name="marge_basse" id="marge_basse"  type="text" value ="{$MARGE_BASSE}" /> px</td>

</tr>		  
<tr >  
<td class="cluetip" title="{'cl_autosize_fade_in'|translate}|{'cl_autosize_hlp_fade_in'|@translate}" > {'cl_autosize_fade_in'|translate}</td>
<td><input name="fade_in" id="fade_in"  type="text" value ="{$fade_in}" /> </td>

</tr>	
 </table>
</fieldset>

<fieldset>
  <legend>{'Options'|@translate}</legend>

  <label>
    <input type="checkbox" name="check_icon_v" value="on"  {$check_icon_v}  />
    {'cl_autosize_icon_view'|@translate}
  </label>
  <br>
  <label>
    <input type="checkbox" name="check_desc_v" value="on"  {$check_desc_v}  />
    {'cl_autosize_desc_view'|@translate}
  </label>
  <br>
  <label  class="cluetip" title="{'cl_autosize_default_type'|translate}|{'cl_autosize_default_type_hlp'|@translate}">
    <input type="checkbox" class="chk" name="defaut_type" value="on"  {$defaut_type}  />
    {'cl_autosize_default_type'|@translate}
  </label>
</fieldset>

<p class="formButtons">
  <input type="submit" name="submit" id="save" value="{'cl_autosize_save'|@translate}">
</p>
</form>
