| 1 | {**************************************************************************} |
| 2 | {* *} |
| 3 | {* Copyright (C) 2003-2006 Polytechnique.org *} |
| 4 | {* http://opensource.polytechnique.org/ *} |
| 5 | {* *} |
| 6 | {* This program is free software; you can redistribute it and/or modify *} |
| 7 | {* it under the terms of the GNU General Public License as published by *} |
| 8 | {* the Free Software Foundation; either version 2 of the License, or *} |
| 9 | {* (at your option) any later version. *} |
| 10 | {* *} |
| 11 | {* This program is distributed in the hope that it will be useful, *} |
| 12 | {* but WITHOUT ANY WARRANTY; without even the implied warranty of *} |
| 13 | {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} |
| 14 | {* GNU General Public License for more details. *} |
| 15 | {* *} |
| 16 | {* You should have received a copy of the GNU General Public License *} |
| 17 | {* along with this program; if not, write to the Free Software *} |
| 18 | {* Foundation, Inc., *} |
| 19 | {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} |
| 20 | {* *} |
| 21 | {**************************************************************************} |
| 22 | |
| 23 | |
| 24 | {literal} |
| 25 | <script type="text/javascript">//<![CDATA[ |
| 26 | function medal_add() |
| 27 | { |
| 28 | var selid = document.forms.prof_annu.medal_sel.selectedIndex; |
| 29 | document.forms.prof_annu.medal_id.value = document.forms.prof_annu.medal_sel.options[selid].value; |
| 30 | document.forms.prof_annu.medal_op.value = "ajouter"; |
| 31 | document.forms.prof_annu.submit(); |
| 32 | } |
| 33 | |
| 34 | function medal_del( id ) |
| 35 | { |
| 36 | document.forms.prof_annu.medal_id.value = id; |
| 37 | document.forms.prof_annu.medal_op.value = "retirer"; |
| 38 | document.forms.prof_annu.submit(); |
| 39 | } |
| 40 | //]]> |
| 41 | </script> |
| 42 | {/literal} |
| 43 | |
| 44 | <div class="blocunite_tab"> |
| 45 | <input type="hidden" value="" name="medal_op" /> |
| 46 | <input type="hidden" value="" name="medal_id" /> |
| 47 | <table class="bicol" cellspacing="0" cellpadding="0"> |
| 48 | <tr> |
| 49 | <th colspan="3"> |
| 50 | Médailles, Décorations, Prix, ... |
| 51 | </th> |
| 52 | </tr> |
| 53 | <tr> |
| 54 | <td colspan="3" class="pflags"> |
| 55 | <table class="flags" summary="Flags" cellpadding="0" cellspacing="0"> |
| 56 | <tr> |
| 57 | <td class="vert"> |
| 58 | <input type="checkbox" name="medals_pub"{if $medals_pub eq 'public'} checked="checked"{/if} /> |
| 59 | </td> |
| 60 | <td class="texte"> |
| 61 | ces informations sont normalement publiques (JO, ...) mais tu peux choisir de les associer a ta fiche publique |
| 62 | </td> |
| 63 | </tr> |
| 64 | </table> |
| 65 | </td> |
| 66 | </tr> |
| 67 | {foreach from=$medals item=m} |
| 68 | <tr> |
| 69 | <td class="colg"> |
| 70 | <img src='images/medals/{$m.img}' width="32" alt="{$m.medal}" title="{$m.medal}" /> |
| 71 | </td> |
| 72 | <td class="colm"> |
| 73 | <span class="valeur">{$m.medal}</span><br /> |
| 74 | {if $grades[$m.id]|@count} |
| 75 | <select name="grade[{$m.id}]"> |
| 76 | <option value='0'>-- non précisé --</option> |
| 77 | {foreach from=$grades[$m.id] item=g} |
| 78 | <option value='{$g.gid}' {if $g.gid eq $m.gid}selected='selected'{/if}>{$g.text}</option> |
| 79 | {/foreach} |
| 80 | </select> |
| 81 | {else} |
| 82 | -- non précisé -- |
| 83 | {/if} |
| 84 | </td> |
| 85 | <td class="cold"> |
| 86 | <span class="lien"> |
| 87 | <a href="javascript:medal_del({$m.id});">retirer</a> |
| 88 | </span> |
| 89 | </td> |
| 90 | </tr> |
| 91 | {/foreach} |
| 92 | <tr> |
| 93 | <td class="colg"> |
| 94 | |
| 95 | </td> |
| 96 | <td class="colm"> |
| 97 | <select name="medal_sel"> |
| 98 | <option value=''></option> |
| 99 | {foreach from=$medal_list key=type item=list} |
| 100 | <optgroup label="{$trad[$type]}"> |
| 101 | {foreach from=$list item=m} |
| 102 | <option value="{$m.id}">{$m.text}</option> |
| 103 | {/foreach} |
| 104 | </optgroup> |
| 105 | {/foreach} |
| 106 | </select> |
| 107 | </td> |
| 108 | <td class="cold"> |
| 109 | <span class="lien"> |
| 110 | <a href="javascript:medal_add();">ajouter</a> |
| 111 | </span> |
| 112 | </td> |
| 113 | </tr> |
| 114 | </table> |
| 115 | </div> |
| 116 | |
| 117 | {* vim:set et sw=2 sts=2 sws=2: *} |