diff options
| author | wjames5 <will@tekimaki.com> | 2008-12-19 19:42:07 +0000 |
|---|---|---|
| committer | wjames5 <will@tekimaki.com> | 2008-12-19 19:42:07 +0000 |
| commit | 3001e366a3db19799f504039e605a0ffd6b6d267 (patch) | |
| tree | f405a471fb1425adbb8c4f1077b58c03e6fde712 /templates/edit_storage_list.tpl | |
| parent | a0de1ed9b8a4987500dc2dc16337b2f264088357 (diff) | |
| download | liberty-3001e366a3db19799f504039e605a0ffd6b6d267.tar.gz liberty-3001e366a3db19799f504039e605a0ffd6b6d267.tar.bz2 liberty-3001e366a3db19799f504039e605a0ffd6b6d267.zip | |
improve inclusion code to have more options - especially html friendly ones
Diffstat (limited to 'templates/edit_storage_list.tpl')
| -rw-r--r-- | templates/edit_storage_list.tpl | 66 |
1 files changed, 63 insertions, 3 deletions
diff --git a/templates/edit_storage_list.tpl b/templates/edit_storage_list.tpl index b7d15bf..768f1ae 100644 --- a/templates/edit_storage_list.tpl +++ b/templates/edit_storage_list.tpl @@ -39,9 +39,14 @@ {/if} </td> <td class="aligncenter"> - {$storage.wiki_plugin_link} - {if $smarty.foreach.atts.first} - {formhelp note="copy this code into your edit window to embed the file into your text"} + {if $gBitThemes->isJavascriptEnabled()} + <div><a href="javascript:void(0);" onclick="BitBase.toggleElementDisplay('wiki_attachment_code_{$storage.attachment_id}','table-row');">Wiki Code</a></div> + <div><a href="javascript:void(0);" onclick="BitBase.toggleElementDisplay('html_attachment_code_{$storage.attachment_id}','table-row');">HTML Code</a></div> + {else} + {$storage.wiki_plugin_link} + {if $smarty.foreach.atts.first} + {formhelp note="copy this code into your edit window to embed the file into your text"} + {/if} {/if} </td> <td class="actionicon"> @@ -67,6 +72,61 @@ {/if} </td> </tr> + {if $gBitThemes->isJavascriptEnabled()} + <tr id="wiki_attachment_code_{$storage.attachment_id}" style="display:none;"> + <td colspan=3> + <table> + {if $smarty.foreach.atts.first} + <tr> + <td colspan=2 style="text-align:center"> + {formhelp note="copy this code into your edit window to embed the file into your text"} + </td> + </tr> + {/if} + <tr> + <td style="text-align:center; width:125px">wiki code</td> + <td style="text-align:right"><input name="attachment_source_wiki_{$storage.attachment_id}" value="{$storage.wiki_plugin_link}" readonly style="width:305px"/></td> + </tr> + </table> + </td> + </tr> + <tr id="html_attachment_code_{$storage.attachment_id}" style="display:none;"> + <td colspan=3> + <table> + {if $smarty.foreach.atts.first} + <tr> + <td colspan=2 style="text-align:center"> + {formhelp note="copy this code into the html source to embed the file into your text"} + </td> + </tr> + {/if} + + <tr> + <th>Size</th><th>Code</th> + </tr> + {if $storage.attachment_plugin_guid eq 'mimeimage'} + {foreach name=size key=size from=$storage.thumbnail_url item=url} + <tr> + <td style="text-align:center; width:125px">{$size}</td> + <td style="text-align:right"><input name="attachment_source_{$size}_{$storage.attachment_id}" value="<img src={$url|escape} />" readonly style="width:305px"/></td> + </tr> + {/foreach} + {if ( $storage.source_url ) } + <tr> + <td style="text-align:center">original</td> + <td style="text-align:right"><input name="attachment_source_original_{$storage.attachment_id}" value="<img src={$storage.source_url|escape} />" readonly style="width:305px"/></td> + </tr> + {/if} + {else} + <tr> + <td style="text-align:center; width:125px">icon</td> + <td style="text-align:right"><input name="attachment_source_icon_{$storage.attachment_id}" value='<a href="{$storage.download_url}" ><img src={$storage.thumbnail_url.icon} /></a><br />{$storage.filename}' readonly style="width:305px"/></td> + </tr> + {/if} + </table> + </td> + </tr> + {/if} {/foreach} </table> </div> |
