summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2005-11-22 07:27:19 +0000
committerMax Kremmel <xing@synapse.plus.com>2005-11-22 07:27:19 +0000
commit065390ab852a58a14c6339e90dfb0d7eced2afba (patch)
treed112df21749dc050030bf4b665da4e3755a3a9f4 /templates
parent300a03c554874c55d3a6861450a7c780e19c89f4 (diff)
downloadliberty-065390ab852a58a14c6339e90dfb0d7eced2afba.tar.gz
liberty-065390ab852a58a14c6339e90dfb0d7eced2afba.tar.bz2
liberty-065390ab852a58a14c6339e90dfb0d7eced2afba.zip
merge recent changes into HEAD
Diffstat (limited to 'templates')
-rw-r--r--templates/admin_liberty.tpl22
-rw-r--r--templates/attachment_browser.tpl71
-rw-r--r--templates/edit_storage.tpl68
-rw-r--r--templates/edit_storage_list.tpl32
-rw-r--r--templates/libertypagination.tpl26
-rw-r--r--templates/storage_thumbs.tpl10
6 files changed, 110 insertions, 119 deletions
diff --git a/templates/admin_liberty.tpl b/templates/admin_liberty.tpl
index 07fcb5d..2599d4c 100644
--- a/templates/admin_liberty.tpl
+++ b/templates/admin_liberty.tpl
@@ -46,9 +46,26 @@
{/forminput}
</div>
+ {php}if( extension_loaded( 'magickwand' ) ) {{/php}{assign var=magickwandInstalled value=TRUE}{php}}{/php}
+ {if !$magickwandInstalled}
+ {formfeedback warning='To use MagickWand, you need to install the magickwand php extension. Unix and Windows users can find source code at <a href="http://www.magickwand.org/download/php/">the ImageMagick downloads website.</a>.'}
+ {/if}
+ <div class="row">
+ {formlabel label="
+ <a href='http://www.imagemagick.org/'>
+ <img class='icon' src=\"`$smarty.const.LIBERTY_PKG_URL`icons/imagick_logo.jpg\" alt='ImageMagick' />
+ </a>
+ "}
+ {forminput}
+ <label>
+ <input type="radio" name="image_processor" value="magickwand" {if !$magickwandInstalled}disabled="disabled"{/if} {if $gBitSystemPrefs.image_processor=='magickwand'}checked="checked"{/if}/> ImageMagick's MagickWand
+ </label>
+ {/forminput}
+ </div>
+
{php}if( extension_loaded( 'imagick' ) ) {{/php}{assign var=imagickInstalled value=TRUE}{php}}{/php}
{if !$imagickInstalled}
- {formfeedback warning='To use <a href="http://www.imagemagick.org/www/download.html">ImageMagick</a>, you need to install the php-imagick extension. For Linux users, RPM files can be found at <a href="http://phprpms.sourceforge.net/imagick">PHPRPMs</a> (or compile a <a href="http://sourceforge.net/project/showfiles.php?group_id=112092&package_id=139307&release_id=292417">source rpm</a>). Windows users can try <a href="http://www.bitweaver.org/builds/php_imagick.dll">this dll</a> however it has not been tested well.'}
+ {formfeedback warning='php-imagick is a no longer supported PECL extension for PHP + ImageMagick. We recommend using the much better supported magickwand option above. If you need to install the php-imagick extension, linux users can find RPM files at <a href="http://phprpms.sourceforge.net/imagick">PHPRPMs</a> (or compile a <a href="http://sourceforge.net/project/showfiles.php?group_id=112092&package_id=139307&release_id=292417">source rpm</a>). Windows users can try <a href="http://www.bitweaver.org/builds/php_imagick.dll">this dll</a> however it has not been tested well.'}
{/if}
<div class="row">
{formlabel label="
@@ -58,10 +75,11 @@
"}
{forminput}
<label>
- <input type="radio" name="image_processor" value="imagick" {if !$imagickInstalled}disabled="disabled"{/if} {if $gBitSystemPrefs.image_processor=='imagick'}checked="checked"{/if}/> ImageMagick
+ <input type="radio" name="image_processor" value="imagick" {if !$imagickInstalled}disabled="disabled"{/if} {if $gBitSystemPrefs.image_processor=='imagick'}checked="checked"{/if}/> php-imagick
</label>
{/forminput}
</div>
+
{foreach from=$formImageFeatures key=item item=output}
<div class="row">
{formlabel label=`$output.label` for=$item}
diff --git a/templates/attachment_browser.tpl b/templates/attachment_browser.tpl
index 7dbf389..0d4f3ad 100644
--- a/templates/attachment_browser.tpl
+++ b/templates/attachment_browser.tpl
@@ -1,36 +1,49 @@
{strip}
- <noscript>
- <p>Please insert {ldelim}attachment id=#{rdelim} where # is the appropriate attachment ID.</p>
- </noscript>
+<div class="row">
+ {formlabel label="Attach File(s)"}
+ {forminput}
+ <input type="text" name="existing_attachment_id[]" id="existing_attachment_id_input" size="20"/>
+ {formhelp note="Attaching an item to your page will insert a small icon representing the file. Please use the attachment IDs listed below.<br />You can attach multiple items at once by seperating them with a ',' (comma)."}
+ {/forminput}
+</div>
- <table class="data">
- <caption>{tr}Available Attachements{/tr}</caption>
- {counter start=-1 name="cells" print=false}
- {foreach from=$userAttachments item=attachment key=foo}
- {counter name="cells" assign="cells" print=false}
- {if $cells % 2 eq 0}
- <tr class="{cycle values="odd,even"}">
- {/if}
+<div class="row">
+ {formlabel label="Insert Attachment"}
+ {forminput}
+ <input type="text" name="dummy" id="copy" size="30" class="success" />
+ <input type="button" value="{tr}Clear{/tr}" onclick="document.getElementById( 'copy' ).value = '';" />
+ {formhelp note="Clicking on any of the attachments below, will display the correct attachment syntax in the textbox above. Insert this text into the textarea where needed."}
+ {/forminput}
+</div>
- <td>
- <a title="{tr}Attachment id: {$attachment.attachment_id}{/tr}" href="javascript:insertAt( 'copy', '{ldelim}attachment id={$attachment.attachment_id}{rdelim}' );">
- <img src="{$attachment.thumbnail_url.small}" alt="{$attachment.filename}" /><br />
- {$attachment.filename}<br />
- Attachment ID: {$attachment.attachment_id}
- </a>
- </td>
-
- {if $cells % 2 ne 0}
- </tr>
- {/if}
- {foreachelse}
- <tr class="norecords"><td>{tr}No Records Found{/tr}</td></tr>
- {/foreach}
+<table class="data">
+ <caption>{tr}Available Attachements{/tr} <span class="total">[ {$userAttachments.cant} ]</span></caption>
+ {counter start=-1 name="cells" print=false}
+ {foreach from=$userAttachments.data item=attachment key=foo}
+ {counter name="cells" assign="cells" print=false}
{if $cells % 2 eq 0}
- <td>&nbsp;</td></tr>
+ <tr class="{cycle values="odd,even"}">
+ {/if}
+
+ <td>
+ <a title="{tr}Attachment id: {$attachment.attachment_id}{/tr}" href="javascript:insertAt( 'copy', '{ldelim}attachment id={$attachment.attachment_id}{rdelim}' );">
+ <img src="{$attachment.thumbnail_url.small}" alt="{$attachment.filename}" /><br />
+ {$attachment.filename}<br />
+ Attachment ID: {$attachment.attachment_id}
+ </a>
+ </td>
+
+ {if $cells % 2 ne 0}
+ </tr>
{/if}
- </table>
- {if $userAttachments}
- {formhelp note="Clicking on an item will attach the item to your wiki page."}
+ {foreachelse}
+ <tr class="norecords"><td>{tr}No Records Found{/tr}</td></tr>
+ {/foreach}
+
+ {if $cells % 2 eq 0}
+ <td>&nbsp;</td></tr>
{/if}
+</table>
+
+{libertypagination pgnName="pgnPage" pgnPage=$curPage numPages=$numPages offset=$smarty.request.offset}
{/strip}
diff --git a/templates/edit_storage.tpl b/templates/edit_storage.tpl
index 9dd02a6..5de6896 100644
--- a/templates/edit_storage.tpl
+++ b/templates/edit_storage.tpl
@@ -1,5 +1,4 @@
{php} include (LIBERTY_PKG_PATH."edit_storage_inc.php"); {/php}
-{if $gContent->hasUserPermission('bit_p_content_attachments')}
{strip}
{foreach from=$gLibertySystem->mPlugins item=plugin key=guid}
{if $plugin.is_active eq 'y' and $plugin.edit_field and $plugin.plugin_type eq 'storage'}
@@ -12,69 +11,8 @@
</div>
{/if}
{/foreach}
-{/strip}
-
- <h2><a href="javascript:flip( 'attbrowser' );">{tr}Attachment Browser{/tr}</a> <small>click to show / hide</small></h2>
-
- <script type="text/javascript">//<![CDATA[
- this.document.write( '<div class="row" style="display:none;" id="attbrowser">' );
- //]]></script>
-
- <div class="row">
- {formlabel label="Attach File(s)"}
- {forminput}
- <input type="text" name="existing_attachment_id[]" id="existing_attachment_id_input" size="20"/>
- {formhelp note="Attaching an item to your page will insert a small icon representing the file. Please use the attachment IDs listed below.<br />You can attach multiple items at once by seperating them with a ',' (comma)."}
- {/forminput}
- </div>
-
- <div class="row">
- {formlabel label="Insert Attachment"}
- {forminput}
- <input type="text" name="dummy" id="copy" size="30" class="success" />
- <input type="button" value="{tr}Clear{/tr}" onclick="document.getElementById( 'copy' ).value = '';" />
- {formhelp note="Using this method will display the attachment within your text. See the help at the bottom of the page for more details.<br />Please copy the above to your textarea and insert where needed."}
- {/forminput}
- </div>
-
- <div class="attbrowser" style="overflow:auto; width:auto; height:400px;">
- {include file="bitpackage:liberty/attachment_browser.tpl"}
- </div>
-
- <script type="text/javascript">//<![CDATA[
- this.document.write( '</div>' );
- //]]></script>
-
-{strip}
- {if $gContent->mStorage}
- <div class="row">
- <table class="data" summary="List of attached files">
- <caption>{tr}Attached Items{/tr}</caption>
- <tr>
- <th scope="col" title="{tr}Thumbnail{/tr}">{tr}Thumbnail{/tr}</th>
- <th scope="col" title="{tr}File Properties{/tr}">{tr}File Properties{/tr}</th>
- </tr>
- {foreach from=$gContent->mStorage item=storage key=attachmentId}
- <tr class="{cycle values="odd,even"}">
- <td style="text-align:center;"><a href="{$storage.source_url}"><img src="{$storage.thumbnail_url.small}" alt="{$storage.filename}" /></a></td>
- <td>
- Attachment ID: {$attachmentId}
- <br />
- Filename: {$storage.filename}
- <br />
- Actions:
- {if $gBitUser->isAdmin() || $bit_p_detach_attachment || $storage.user_id == $gBitUser->mUserId}
- <a href="{$attachmentActionBaseURL}&amp;detachAttachment={$storage.attachment_id}">{biticon ipackage=liberty iname="detach" iexplain="detach"}</a>
- {/if}
- {if $gBitUser->isAdmin() || $storage.user_id == $gBitUser->mUserId}
- <a href="{$attachmentActionBaseURL}&amp;deleteAttachment={$storage.attachment_id}">{biticon ipackage=liberty iname="delete" iexplain="delete"}</a>
- {/if}
- </td>
- </tr>
- {/foreach}
- </table>
- </div>
- {/if}
+ <h2 class="clear"><a href="javascript:sendRequest( 'attbrowser' );" onclick="javascript:document.getElementById( 'attbrowser' ).innerHTML = '<br />{tr}Loading Attachment Browser...{/tr}'">{tr}Attachment Browser{/tr}</a></h2>
+ <noscript><div class="warning">{tr}The attachment browser only works with javascript enabled.{/tr}</div></noscript>
+ <div id="attbrowser" class="attbrowser"></div>
{/strip}
-{/if}
diff --git a/templates/edit_storage_list.tpl b/templates/edit_storage_list.tpl
index 93c046f..52fd46d 100644
--- a/templates/edit_storage_list.tpl
+++ b/templates/edit_storage_list.tpl
@@ -1,26 +1,32 @@
-{php}
-include (LIBERTY_PKG_PATH."edit_storage_inc.php");
-{/php}
+{php} include (LIBERTY_PKG_PATH."edit_storage_inc.php"); {/php}
{strip}
{if $gContent->mStorage}
<div class="row">
- <table class="data">
- <caption>{tr}Insert attached items{/tr}</caption>
+ <table class="data" summary="List of attached files">
+ <caption>{tr}Attached Items{/tr}</caption>
<tr>
- <th style="width:30%">Filename</th>
- <th style="width:70%">Attachment Tag</th>
+ <th scope="col" title="{tr}Thumbnail{/tr}">{tr}Thumbnail{/tr}</th>
+ <th scope="col" title="{tr}File Properties{/tr}">{tr}File Properties{/tr}</th>
</tr>
+
{foreach from=$gContent->mStorage item=storage key=attachmentId}
<tr class="{cycle values="odd,even"}">
- <td>{$storage.filename}</td>
- <td style="text-align:right;">
- <a title="{$storage.wiki_plugin_link}" href="javascript:insertAt('{$textarea_id}','{$storage.wiki_plugin_link|escape:"javascript"}');">{$storage.wiki_plugin_link}</a>
+ <td style="text-align:center;"><a href="{$storage.source_url}"><img src="{$storage.thumbnail_url.avatar}" alt="{$storage.filename}" /></a></td>
+ <td>
+ Attachment ID: {$attachmentId}
+ <br />
+ Filename: {$storage.filename}
+ <br />
+ Actions:
+ {if $gBitUser->isAdmin() || $bit_p_detach_attachment || $storage.user_id == $gBitUser->mUserId}
+ <a href="{$attachmentActionBaseURL}&amp;detachAttachment={$storage.attachment_id}">{biticon ipackage=liberty iname="detach" iexplain="detach"}</a>
+ {/if}
+ {if $gBitUser->isAdmin() || $storage.user_id == $gBitUser->mUserId}
+ <a href="{$attachmentActionBaseURL}&amp;deleteAttachment={$storage.attachment_id}">{biticon ipackage=liberty iname="delete" iexplain="delete"}</a>
+ {/if}
</td>
</tr>
{/foreach}
- {if $textarea_id}
- <tr><td colspan="2">{tr}Click on the Attachment Tag to insert it in the textarea{/tr}</td></tr>
- {/if}
</table>
</div>
{/if}
diff --git a/templates/libertypagination.tpl b/templates/libertypagination.tpl
index 5997322..7cc0ec0 100644
--- a/templates/libertypagination.tpl
+++ b/templates/libertypagination.tpl
@@ -1,28 +1,36 @@
{strip}
<div class="pagination">
- {if $page gt 1}
- <a href="{$smarty.server.PHP_SELF}?{$pgnName}={$page-1}{$pgnVars}">&laquo;</a>&nbsp;
+ {if $pgnPage gt 1}
+ {if $smarty.request.ajaxid}
+ <a href="javascript:sendRequest( '{$smarty.request.ajaxid}','{$pgnName}={$pgnPage-1}{$pgnVars}' )">&laquo;</a>&nbsp;
+ {else}
+ <a href="{$smarty.server.PHP_SELF}?{$pgnName}={$pgnPage-1}{$pgnVars}">&laquo;</a>&nbsp;
+ {/if}
{else}
- &nbsp;
+ &nbsp;&nbsp;
{/if}
- {tr}Page {$page} of {$numPages}{/tr}
+ {tr}Page {$pgnPage} of {$numPages}{/tr}
- {if $page lt $numPages}
- &nbsp;<a href="{$smarty.server.PHP_SELF}?{$pgnName}={$page+1}{$pgnVars}">&raquo;</a>
+ {if $pgnPage lt $numPages}
+ {if $smarty.request.ajaxid}
+ &nbsp;<a href="javascript:sendRequest( '{$smarty.request.ajaxid}','{$pgnName}={$pgnPage+1}{$pgnVars}' )">&raquo;</a>
+ {else}
+ &nbsp;<a href="{$smarty.server.PHP_SELF}?{$pgnName}={$pgnPage+1}{$pgnVars}">&raquo;</a>
+ {/if}
{else}
- &nbsp;
+ &nbsp;&nbsp;
{/if}
<br />
- {if $gBitSystem->isFeatureActive( 'direct_pagination' )}
+ {* MSIE dies when we use a form in the pagination when doing ajax stuff *}
+ {if $gBitSystem->isFeatureActive( 'direct_pagination' ) or $smarty.request.ajaxid}
{foreach from=$pgnPages item=link}
{$link}&nbsp;
{/foreach}
{else}
{form id="fPageSelect"}
-
<input type="hidden" name="comments_maxComments" value="{$maxComments}" />
<input type="hidden" name="comments_style" value="{$comments_style}" />
<input type="hidden" name="comments_sort_mode" value="{$comments_sort_mode}" />
diff --git a/templates/storage_thumbs.tpl b/templates/storage_thumbs.tpl
index 738d87e..c43ad6d 100644
--- a/templates/storage_thumbs.tpl
+++ b/templates/storage_thumbs.tpl
@@ -1,11 +1,19 @@
{strip}
+{if !$gBitSystem->isFeatureActive( 'feature_helppopup' )}
+ {popup_init src="`$smarty.const.THEMES_PKG_URL`js/overlib.js"}
+{/if}
+
{if $gContent->mStorage}
<div class="storage">
{foreach from=$gContent->mStorage item=attachment }
+ {capture name="popup"}
+ {include file="bitpackage:kernel/popup_box.tpl" content="`$attachment.filename`<br />{tr}Size{/tr}: `$attachment.size` bytes" noclose=true}
+ {/capture}
+ {$popup}
<div class="item">
{if $attachment.thumbnail_url.small}
{if $attachment.source_url}<a href="{$attachment.source_url}">{/if}
- <img class="thumb" src="{$attachment.thumbnail_url.avatar}" alt="{$attachment.filename}" />
+ <img class="thumb" src="{$attachment.thumbnail_url.avatar}" alt="{$attachment.filename}" title="{$attachment.filename}" {popup fullhtml="1" text=$smarty.capture.popup|escape:"javascript"|escape:"html"}/>
{if $attachment.source_url}</a>{/if}
{else}
{tr}No thumbnail for{/tr} {$attachment.source_url}