| 1 | {if $action eq "edit"} |
| 2 | |
| 3 | <form action="{$post}" method="post"> |
| 4 | <input type="hidden" name="target" value="{$target}"> |
| 5 | <input type="hidden" name="action" value="update"> |
| 6 | <table class="light"> |
| 7 | <tr> |
| 8 | <th colspan="2">{$target}</th> |
| 9 | </tr> |
| 10 | <tr> |
| 11 | <td>{$msg_title}</td> |
| 12 | <td><input type="text" name="title" value="{$v_title}" size="60" /></td> |
| 13 | </tr> |
| 14 | <tr> |
| 15 | <td>{$msg_desc}</td> |
| 16 | <td><input type="text" name="description" value="{$v_desc}" size="60" /></td> |
| 17 | </tr> |
| 18 | <tr> |
| 19 | <td>{$msg_keywords}</td> |
| 20 | <td><input type="text" name="keywords" value="{$v_keywords}" size="60" /></td> |
| 21 | </tr> |
| 22 | <tr> |
| 23 | <td>{$msg_vhost}</td> |
| 24 | <td><input type="text" name="vhost" value="{$v_vhost}" size="60" /></td> |
| 25 | </tr> |
| 26 | <tr> |
| 27 | <td>{$msg_flags}</td> |
| 28 | <td>{html_checkboxes name="flags" options=$v_flag_opts selected=$v_flags}</td> |
| 29 | </tr> |
| 30 | <tr> |
| 31 | <td colspan="2"> |
| 32 | <input type="submit" value="{$msg_submit}" /> |
| 33 | </td> |
| 34 | </tr> |
| 35 | </table> |
| 36 | </form> |
| 37 | |
| 38 | <p> |
| 39 | {$msg_vhost_note} |
| 40 | </p> |
| 41 | |
| 42 | {else} |
| 43 | |
| 44 | {if !$readonly} |
| 45 | {literal} |
| 46 | <script type="text/javascript"> |
| 47 | <!-- |
| 48 | function del( mysite ) { |
| 49 | if (confirm ("You are about to destroy the site '" + mysite + |
| 50 | "'. All data associated with it will irremediably lost! Do you want to proceed?")) { |
| 51 | document.operations.action.value = "delete"; |
| 52 | document.operations.target.value = mysite; |
| 53 | document.operations.submit(); |
| 54 | return true; |
| 55 | } |
| 56 | } |
| 57 | // --> |
| 58 | </script> |
| 59 | {/literal} |
| 60 | |
| 61 | <form method="post" action="{$post}" name="operations"> |
| 62 | <input type="hidden" name="target" value=""/> |
| 63 | <input type="hidden" name="action" value="" /> |
| 64 | </form> |
| 65 | {/if} |
| 66 | |
| 67 | <table class="light" style="width:90%"> |
| 68 | <tr> |
| 69 | {if !$readonly} |
| 70 | <th>{$msg_alias}</th> |
| 71 | {/if} |
| 72 | <th>{$msg_title}</th> |
| 73 | <th>{$msg_desc}</th> |
| 74 | <th> </th> |
| 75 | </tr> |
| 76 | {if $sites} |
| 77 | {counter start=0 assign=cnt print=0} |
| 78 | {foreach from=$sites item=mysite} |
| 79 | <tr{if $cnt % 2} class="odd"{/if}> |
| 80 | {if !$readonly} |
| 81 | <td>{$mysite.alias}</td> |
| 82 | {/if} |
| 83 | <td>{a lnk=$mysite.title}</td> |
| 84 | <td>{$mysite.description}</td> |
| 85 | <td> |
| 86 | {foreach from=$mysite.actions item=action} |
| 87 | {a lnk=$action class="action"} |
| 88 | {/foreach} |
| 89 | </td> |
| 90 | </tr>{counter} |
| 91 | {/foreach} |
| 92 | {else} |
| 93 | <tr> |
| 94 | <td colspan="{if $readonly}3{else}4{/if}"><i>{$msg_no_barrels}</i></td> |
| 95 | </tr> |
| 96 | {/if} |
| 97 | </table> |
| 98 | |
| 99 | {if !$readonly} |
| 100 | <form method="post" action="{$post}"> |
| 101 | <input type="hidden" name="action" value="create" /> |
| 102 | <p> |
| 103 | {$msg_create} : <input type="text" name="target" maxlength="16"/><input type="submit" value="create"/> |
| 104 | </p> |
| 105 | <p> |
| 106 | {$msg_create_note} |
| 107 | </p> |
| 108 | </form> |
| 109 | {/if} |
| 110 | |
| 111 | {/if} |