Changeset 27267


Ignore:
Timestamp:
02/08/14 13:37:59 (5 years ago)
Author:
flop25
Message:

all foreach reworked properly

Location:
extensions/music_player/template
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • extensions/music_player/template/admin.tpl

    r14095 r27267  
    3333</div> 
    3434<ul id="list"> 
    35   {foreach from=$list item=list} 
    36   <li><a href="{$pwg_root}plugins/music_player/music/{$list.URL}/{$list.URL}.xml">{'mp_admin_folder'|@translate} : {$list.URL} -- {'mp_admin_nm_pl'|@translate} : {$list.TEXTE}</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="admin.php?page=plugin&section=music_player/admin/admin_edit.php&id={$list.ID}" title="{'mp_admin_nm_edit'|@translate}"><img src="plugins/music_player/template/icon/category_edit.png" class="button" alt="{'mp_admin_nm_edit'|@translate}"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="admin.php?page=plugin&amp;section=music_player/admin/admin_edit.php&music={$list.ID}" title="{'mp_admin_pl'|@translate}"><img src="plugins/music_player/template/audio.png" class="button" alt="{'mp_admin_pl'|@translate}"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="admin.php?page=plugin&amp;section=music_player/admin/admin_img.php&id={$list.ID}" title="{'mp_admin_min'|@translate}"><img src="plugins/music_player/template/miniature.png" class="button" alt="{'mp_admin_min'|@translate}"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="admin.php?page=plugin&amp;section=music_player/admin/admin_suppr.php&id={$list.ID}" title="{'delete'|@translate}"><img src="{$pwg_root}{$themeconf.icon_dir}/delete.png" class="button" alt="{'delete'|@translate}"></a> </li> 
     35  {foreach from=$list item=list_item} 
     36  <li><a href="{$pwg_root}plugins/music_player/music/{$list_item.URL}/{$list_item.URL}.xml">{'mp_admin_folder'|@translate} : {$list_item.URL} -- {'mp_admin_nm_pl'|@translate} : {$list_item.TEXTE}</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="admin.php?page=plugin&section=music_player/admin/admin_edit.php&id={$list_item.ID}" title="{'mp_admin_nm_edit'|@translate}"><img src="plugins/music_player/template/icon/category_edit.png" class="button" alt="{'mp_admin_nm_edit'|@translate}"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="admin.php?page=plugin&amp;section=music_player/admin/admin_edit.php&music={$list_item.ID}" title="{'mp_admin_pl'|@translate}"><img src="plugins/music_player/template/audio.png" class="button" alt="{'mp_admin_pl'|@translate}"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="admin.php?page=plugin&amp;section=music_player/admin/admin_img.php&id={$list_item.ID}" title="{'mp_admin_min'|@translate}"><img src="plugins/music_player/template/miniature.png" class="button" alt="{'mp_admin_min'|@translate}"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="admin.php?page=plugin&amp;section=music_player/admin/admin_suppr.php&id={$list_item.ID}" title="{'delete'|@translate}"><img src="{$pwg_root}{$themeconf.icon_dir}/delete.png" class="button" alt="{'delete'|@translate}"></a> </li> 
    3737  {/foreach} 
    3838</ul> 
  • extensions/music_player/template/admin_edit.tpl

    r10294 r27267  
    55  <h2>Music player / {$PLAYLIST}</h2> 
    66</div> 
    7 {foreach from=$edit_txt item=edit_txt} 
     7{foreach from=$edit_txt item=edit_txt_item} 
    88<form action="" method="post" name="edit_txt"> 
    99  {'mp_adm_edit_1'|@translate} : 
    10   <input name="texte" type="text" value="{$edit_txt.TXT}" maxlength="255" /> 
    11   <input name="id" type="hidden" value="{$edit_txt.ID}" /> 
     10  <input name="texte" type="text" value="{$edit_txt_item.TXT}" maxlength="255" /> 
     11  <input name="id" type="hidden" value="{$edit_txt_item.ID}" /> 
    1212  <input name="envoi" value="edit_txt" type="hidden" /> 
    1313  <input name="submit" value="OK" type="submit" /> 
     
    1616{/foreach} 
    1717 
    18 {foreach from=$edit_ex item=edit_ex} 
     18{foreach from=$edit_ex item=edit_ex_item} 
    1919<form action="" method="post" name="edit_ex"> 
    2020  {'mp_adm_edit_1'|@translate} : 
    21   <input name="texte" type="text" value="{$edit_ex.TXT}" maxlength="255" /> 
     21  <input name="texte" type="text" value="{$edit_ex_item.TXT}" maxlength="255" /> 
    2222  <br /> 
    2323  URL : 
    24   <input name="url" type="text" value="{$edit_ex.URL}" size="60" maxlength="255" /> 
    25   <input name="id" type="hidden" value="{$edit_ex.ID}" /> 
     24  <input name="url" type="text" value="{$edit_ex_item.URL}" size="60" maxlength="255" /> 
     25  <input name="id" type="hidden" value="{$edit_ex_item.ID}" /> 
    2626  <input name="envoi" value="edit_ex" type="hidden" /> 
    2727  <input name="submit" value="OK" type="submit" /> 
     
    3030{/foreach} 
    3131 
    32 {foreach from=$suppr item=suppr} 
    33 <form action="admin.php?page=plugin&amp;section=music_player/admin/admin_edit.php&music={$suppr.PL}" method="post" name="suppr"> 
     32{foreach from=$suppr item=suppr_item} 
     33<form action="admin.php?page=plugin&amp;section=music_player/admin/admin_edit.php&music={$suppr_item.PL}" method="post" name="suppr"> 
    3434  <input name="envoi" type="hidden" value="suppr" /> 
    35   <input name="id" type="hidden" value="{$suppr.ID}" /> 
     35  <input name="id" type="hidden" value="{$suppr_item.ID}" /> 
    3636  <input name="submit" value="{'mp_adm_ed_sup_ok'|@translate}" type="submit" /> 
    3737  {'mp_adm_ed_sup_info'|@translate} 
    3838</form> 
    39 <p><a href="admin.php?page=plugin&amp;section=music_player/admin/admin_edit.php&music={$suppr.PL}">{'mp_adm_return_2'|@translate}</a></p> 
     39<p><a href="admin.php?page=plugin&amp;section=music_player/admin/admin_edit.php&music={$suppr_item.PL}">{'mp_adm_return_2'|@translate}</a></p> 
    4040{/foreach} 
    41 {foreach from=$edit_music item=edit_music} 
     41{foreach from=$edit_music item=edit_music_item} 
    4242<form action="" method="post" name="edit_music"> 
    4343  Texte : 
    44   <input name="nom" type="text" value="{$edit_music.NOM}" size="40" maxlength="255" /> 
     44  <input name="nom" type="text" value="{$edit_music_item.NOM}" size="40" maxlength="255" /> 
    4545  <br /> 
    4646  URL : 
    47   <input name="url" type="text" value="{$edit_music.URL}" size="80" maxlength="255" /> 
    48   <input name="id" type="hidden" value="{$edit_music.ID}" /> 
     47  <input name="url" type="text" value="{$edit_music_item.URL}" size="80" maxlength="255" /> 
     48  <input name="id" type="hidden" value="{$edit_music_item.ID}" /> 
    4949  <input name="envoi" type="hidden" value="edit_music" /> 
    5050  <input name="submit" value="OK" type="submit" /> 
    5151</form> 
    52 <p><a href="admin.php?page=plugin&amp;section=music_player/admin/admin_edit.php&music={$edit_music.PL}">{'mp_adm_return_2'|@translate}</a></p> 
     52<p><a href="admin.php?page=plugin&amp;section=music_player/admin/admin_edit.php&music={$edit_music_item.PL}">{'mp_adm_return_2'|@translate}</a></p> 
    5353{/foreach} 
    5454 
     
    7373</form> 
    7474<form action="" method="post" name="edit_music"> 
    75   {foreach from=$ajout item=ajout}<!-- BEGIN ajout --> 
     75  {foreach from=$ajout item=ajout_item}<!-- BEGIN ajout --> 
    7676  <fieldset> 
    7777  Texte : 
    78   <input name="nom_{$ajout.I}" type="text" size="40" maxlength="255" /> 
     78  <input name="nom_{$ajout_item.I}" type="text" size="40" maxlength="255" /> 
    7979  {'mp_adm_et2_rg'|@translate} 
    80   <input name="rang_{$ajout.I}" type="text" size="3" maxlength="20" /> 
     80  <input name="rang_{$ajout_item.I}" type="text" size="3" maxlength="20" /> 
    8181  {'mp_adm_et2_rg2'|@translate}<br /> 
    8282  URL : 
    83   <input name="url_{$ajout.I}" type="text" size="80" maxlength="255" /> 
     83  <input name="url_{$ajout_item.I}" type="text" size="80" maxlength="255" /> 
    8484  </fieldset> 
    8585  {/foreach} 
     
    106106    </tr> 
    107107  </thead> 
    108   {foreach from=$music item=music}<!-- BEGIN music --> 
    109   <tr class="{$music.CLASS}"> 
    110     <td>{$music.NOM}</td> 
    111     <td>{$music.FILE}</td> 
     108  {foreach from=$music item=music_item}<!-- BEGIN music --> 
     109  <tr class="{$music_item.CLASS}"> 
     110    <td>{$music_item.NOM}</td> 
     111    <td>{$music_item.FILE}</td> 
    112112        <td> 
    113     {if isset ($music.UP_RANG)} 
     113    {if isset ($music_item.UP_RANG)} 
    114114      <form action="" method="post"> 
    115         <input name="rang" type="hidden" value="{$music.UP_RANG}" /> 
    116         <input name="nouv_rang" type="hidden" value="{$music.UP_RANG_NEW}" /> 
     115        <input name="rang" type="hidden" value="{$music_item.UP_RANG}" /> 
     116        <input name="nouv_rang" type="hidden" value="{$music_item.UP_RANG_NEW}" /> 
    117117        <input type="hidden" name="envoi" id="hiddenField" value="rang" /> 
    118118        <input type="image" name="up" src="plugins/music_player/template/icon/page_top.png" /> 
     
    121121    </td> 
    122122    <td> 
    123     {if isset ($music.D_RANG)} 
     123    {if isset ($music_item.D_RANG)} 
    124124      <form action="" method="post"> 
    125         <input name="rang" type="hidden" value="{$music.D_RANG}" /> 
    126         <input name="nouv_rang" type="hidden" value="{$music.D_RANG_NEW}" /> 
     125        <input name="rang" type="hidden" value="{$music_item.D_RANG}" /> 
     126        <input name="nouv_rang" type="hidden" value="{$music_item.D_RANG_NEW}" /> 
    127127        <input type="hidden" name="envoi" id="hiddenField" value="rang" /> 
    128128        <input type="image" name="down" src="plugins/music_player/template/icon/page_end.png" /> 
     
    130130    {/if} 
    131131    </td> 
    132     <td><a href="admin.php?page=plugin&section=music_player/admin/admin_edit.php&music_id={$music.ID}" title="{'mp_admin_nm_edit'|@translate}"><img src="{$pwg_root}{$themeconf.icon_dir}/category_edit.png" class="button" alt="{'mp_admin_nm_edit'|@translate}"></a></td> 
    133     <td><a href="admin.php?page=plugin&section=music_player/admin/admin_edit.php&suppr={$music.ID}" title="{'delete'|@translate}"><img src="{$pwg_root}{$themeconf.icon_dir}/delete.png" class="button" alt="{'delete'|@translate}"></a> </td> 
     132    <td><a href="admin.php?page=plugin&section=music_player/admin/admin_edit.php&music_id={$music_item.ID}" title="{'mp_admin_nm_edit'|@translate}"><img src="{$pwg_root}{$themeconf.icon_dir}/category_edit.png" class="button" alt="{'mp_admin_nm_edit'|@translate}"></a></td> 
     133    <td><a href="admin.php?page=plugin&section=music_player/admin/admin_edit.php&suppr={$music_item.ID}" title="{'delete'|@translate}"><img src="{$pwg_root}{$themeconf.icon_dir}/delete.png" class="button" alt="{'delete'|@translate}"></a> </td> 
    134134  </tr> 
    135135  {/foreach}<!-- END music --> 
  • extensions/music_player/template/admin_envoi.tpl

    r3329 r27267  
    11<form action="" method="post"> 
    2     {foreach from=$syn item=syn}<!-- BEGIN syn --> 
    3     <strong>{'mp_adm_envoi_1'|@translate} "{$syn.RESULT}" :</strong> 
    4 <input name="texte_{$syn.NBR}" type="text" /><em>{'mp_adm_envoi_2'|@translate} : {$syn.RESULT_M}</em> 
    5 <input name="url_{$syn.NBR}" type="hidden" value="{$syn.RESULT}" /> 
     2    {foreach from=$syn item=syn_item}<!-- BEGIN syn --> 
     3    <strong>{'mp_adm_envoi_1'|@translate} "{$syn_item.RESULT}" :</strong> 
     4<input name="texte_{$syn_item.NBR}" type="text" /><em>{'mp_adm_envoi_2'|@translate} : {$syn_item.RESULT_M}</em> 
     5<input name="url_{$syn_item.NBR}" type="hidden" value="{$syn_item.RESULT}" /> 
    66    <!-- <input name="music/syn.RESULT" type="hidden" value="syn.RESULT_M" />--><br /> 
    77    {/foreach}<!-- END syn -->     
  • extensions/music_player/template/admin_img.tpl

    r3329 r27267  
    1111 --> 
    1212 
    13 {foreach from=$envoi item=envoi}<!-- BEGIN envoi --> 
     13{foreach from=$envoi item=envoi_item}<!-- BEGIN envoi --> 
    1414<fieldset> 
    1515<legend>Upload</legend> 
     
    1717  <input name="fichier" type="file" /> 
    1818  <input type="hidden" name="ajout_image" value="upload" /> 
    19   <input type="hidden" name="id" value="{$envoi.ID}" /> 
     19  <input type="hidden" name="id" value="{$envoi_item.ID}" /> 
    2020  <input type="submit" name="button" id="button" value="{'mp_send'|@translate}" /> 
    2121</form> 
     
    2727  <input name="lien" type="text" id="textfield" size="50" value="http://" /> 
    2828  <input type="hidden" name="ajout_image" value="lien" /> 
    29   <input type="hidden" name="id" value="{$envoi.ID}" /> 
     29  <input type="hidden" name="id" value="{$envoi_item.ID}" /> 
    3030  <input type="submit" name="button2" id="button2" value="{'mp_send'|@translate}" /> 
    3131</form> 
     
    3333  {/foreach}<!-- END envoi --> 
    3434   
    35   {foreach from=$miniature item=miniature}<!-- BEGIN miniature --> 
     35  {foreach from=$miniature item=miniature_item}<!-- BEGIN miniature --> 
    3636<div align="center"> 
    37   <img src="{$miniature.URL}" alt="La miniature de la playlist" /> 
     37  <img src="{$miniature_item.URL}" alt="La miniature de la playlist" /> 
    3838<form action="" method="post"> 
    3939  <input type="submit" name="suppr" id="suppr" value="{'delete'|@translate}" /> 
     
    4242</div> 
    4343  {/foreach}<!-- END miniature --> 
    44   {foreach from=$rien item=rien}<!-- BEGIN rien --> 
     44  {foreach from=$rien item=rien_item}<!-- BEGIN rien --> 
    4545<div align="center"> 
    46   {$rien.TXT} 
     46  {$rien_item.TXT} 
    4747</div> 
    4848  {/foreach}<!-- END rien --> 
  • extensions/music_player/template/admin_suppr.tpl

    r3329 r27267  
    88 --> 
    99 
    10 {foreach from=$suppr item=suppr}<!-- BEGIN suppr --> 
     10{foreach from=$suppr item=suppr_item}<!-- BEGIN suppr --> 
    1111<form action="" method="post" name="edit_txt"> 
    1212  <p>{'mp_adm_suppr_1'|@translate}</p> 
     
    1818{'mp_adm_suppr_3'|@translate}</p> 
    1919  <p align="center"> 
    20     <input name="id" type="hidden" value="{$suppr.ID}" /> 
     20    <input name="id" type="hidden" value="{$suppr_item.ID}" /> 
    2121    <input name="envoi" type="hidden" value="suppr" /> 
    2222    <input name="submit" value="OK" type="submit" /> 
  • extensions/music_player/template/lecteur_v4_5.tpl

    r3507 r27267  
    7171  <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='block';document.getElementById('cache').style.display ='none'">{'mp_cache'|@translate}</a><br /> 
    7272  <ul> 
    73   {foreach from=$playlist item=playlist}<!-- BEGIN playlist --> 
    74     <li><a href="javascript:void(0)" onclick="javascript:createPlayer('wrapper1', 'placeholder1', 'player1', '{$playlist.URL}')" >{$playlist.TEXTE}</a></li> 
     73  {foreach from=$playlist item=playlist_item}<!-- BEGIN playlist --> 
     74    <li><a href="javascript:void(0)" onclick="javascript:createPlayer('wrapper1', 'placeholder1', 'player1', '{$playlist_item.URL}')" >{$playlist_item.TEXTE}</a></li> 
    7575  {/foreach}<!-- END playlist --> 
    7676  </ul> 
  • extensions/music_player/template/style/default.tpl

    r10102 r27267  
    5353          <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='block';document.getElementById('cache').style.display ='none'">{'mp_cache'|@translate}</a><br /> 
    5454          <ul> 
    55           {foreach from=$playlist item=playlist}<!-- BEGIN playlist --> 
    56             <li><a href="javascript:void(0)" onclick="javascript:loadFile({literal}{{/literal}file:'{$playlist.URL}'{literal}}{/literal})" >{$playlist.TEXTE}</a></li> 
     55          {foreach from=$playlist item=playlist_item}<!-- BEGIN playlist --> 
     56            <li><a href="javascript:void(0)" onclick="javascript:loadFile({literal}{{/literal}file:'{$playlist_item.URL}'{literal}}{/literal})" >{$playlist_item.TEXTE}</a></li> 
    5757          {/foreach}<!-- END playlist --> 
    5858          </ul> 
  • extensions/music_player/template/style/default/lecteur.tpl

    r9668 r27267  
    4040          <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='block';document.getElementById('cache').style.display ='none'">{'mp_cache'|@translate}</a><br /> 
    4141          <ul> 
    42           {foreach from=$playlist item=playlist}<!-- BEGIN playlist --> 
    43             <li><a href="javascript:void(0)" onclick="javascript:loadFile({literal}{{/literal}file:'{$playlist.URL}'{literal}}{/literal})" >{$playlist.TEXTE}</a></li> 
     42          {foreach from=$playlist item=playlist_item}<!-- BEGIN playlist --> 
     43            <li><a href="javascript:void(0)" onclick="javascript:loadFile({literal}{{/literal}file:'{$playlist_item.URL}'{literal}}{/literal})" >{$playlist_item.TEXTE}</a></li> 
    4444          {/foreach}<!-- END playlist --> 
    4545          </ul> 
  • extensions/music_player/template/style/my_phone/my_phone.tpl

    r10102 r27267  
    5454          <a href="javascript:void(0)" onclick="document.getElementById('montre').style.display ='block';document.getElementById('cache').style.display ='none'">{'mp_cache'|@translate}</a><br /> 
    5555          <ul> 
    56           {foreach from=$playlist item=playlist}<!-- BEGIN playlist --> 
    57             <li><a href="javascript:void(0)" onclick="javascript:loadFile({literal}{{/literal}file:'{$playlist.URL}'{literal}}{/literal})" >{$playlist.TEXTE}</a></li> 
     56          {foreach from=$playlist item=playlist_item}<!-- BEGIN playlist --> 
     57            <li><a href="javascript:void(0)" onclick="javascript:loadFile({literal}{{/literal}file:'{$playlist_item.URL}'{literal}}{/literal})" >{$playlist_item.TEXTE}</a></li> 
    5858          {/foreach}<!-- END playlist --> 
    5959          </ul> 
Note: See TracChangeset for help on using the changeset viewer.