summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2005-10-29 17:54:23 +0000
committerMax Kremmel <xing@synapse.plus.com>2005-10-29 17:54:23 +0000
commit300a03c554874c55d3a6861450a7c780e19c89f4 (patch)
tree8d981b7144d6720f2b2c28b27d3c4a1b4be6cb83 /templates
parent820d5024847583238bfc8cbc194887156e930dfc (diff)
downloadliberty-300a03c554874c55d3a6861450a7c780e19c89f4.tar.gz
liberty-300a03c554874c55d3a6861450a7c780e19c89f4.tar.bz2
liberty-300a03c554874c55d3a6861450a7c780e19c89f4.zip
merge recent changes into HEAD
Diffstat (limited to 'templates')
-rw-r--r--templates/attachment_browser.tpl108
-rw-r--r--templates/comments.tpl2
-rw-r--r--templates/edit_storage.tpl86
-rw-r--r--templates/list_content_inc.tpl2
4 files changed, 90 insertions, 108 deletions
diff --git a/templates/attachment_browser.tpl b/templates/attachment_browser.tpl
index 43716ac..7dbf389 100644
--- a/templates/attachment_browser.tpl
+++ b/templates/attachment_browser.tpl
@@ -1,80 +1,36 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>{tr}Attachment Browser{/tr}</title>
-
- {if $gBitSystem->mStyles.styleSheet}
- <link rel="stylesheet" title="{$style}" type="text/css" href="{$gBitSystem->mStyles.styleSheet}" media="all" />
- {/if}
- {if $gBitSystem->mStyles.browserStyleSheet}
- <link rel="stylesheet" title="{$style}" type="text/css" href="{$gBitSystem->mStyles.browserStyleSheet}" media="all" />
- {/if}
- {if $gBitSystem->mStyles.customStyleSheet}
- <link rel="stylesheet" title="{$style}" type="text/css" href="{$gBitSystem->mStyles.custumStyleSheet}" media="all" />
- {/if}
- {foreach from=$gBitSystem->mStyles.altStyleSheets item=alt_path key=alt_name}
- <link rel="alternate stylesheet" title="{$alt_name}" type="text/css" href="{$alt_path}" media="screen" />
- {/foreach}
-
- <script type="text/javascript" src="{$smarty.const.KERNEL_PKG_URL}bitweaver.js"></script>
-
- {literal}
- <script type="text/javascript"><!--
- function returnAttachmentId(attachmentId) {
- self.opener.document.getElementById("existing_attachment_id_input").value = attachmentId;
- self.close();
- }
- --></script>
- {/literal}
-
- <!--[if gte IE 5.5000]>
- <script type="text/javascript" src="{$smarty.const.THEMES_PKG_URL}js/pngfix.js"></script>
- <![endif]-->
-
{strip}
-</head>
-<body>
- <div id="attbrowser">
- <div class="display attbrowser">
- <div class="header">
- <h1>Attachment Browser</h1>
- <h2>at some point this page should only show attachments that aren't already attached.</h2>
- </div>
+ <noscript>
+ <p>Please insert {ldelim}attachment id=#{rdelim} where # is the appropriate attachment ID.</p>
+ </noscript>
- <div class="body">
- {legend legend="Avalable attachments"}
- <noscript>
- <p>Since you don't seem to have javascript enabled, please hover your mouse over an attachment and use the number that appears to attach a given item to your page.
- </p>
- </noscript>
+ <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}
- <table class="data">
- {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}
- <td>
- <a title="{tr}Attachment id: {$attachment.attachment_id}{/tr}" href="javascript:void();" style="cursor:hand;" onclick="returnAttachmentId({$attachment.attachment_id})">
- <img src="{$attachment.thumbnail_url.small}" alt="{$attachment.filename}" />
- <br />
- {$attachment.filename}
- </a>
- </td>
- {if $cells % 2 ne 0}
- </tr>
- {/if}
- {/foreach}
- {if $cells % 2 eq 0}
- <td>&nbsp;</td></tr>
- {/if}
- </table>
- {formhelp note="Clicking on an item will attach the item to your wiki page."}
- {/legend}
- </div><!-- end .body -->
- </div><!-- end .attbrowser -->
- </div><!-- end #attbrowser -->
-</body>
-</html>
+ <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}
+ {if $cells % 2 eq 0}
+ <td>&nbsp;</td></tr>
+ {/if}
+ </table>
+ {if $userAttachments}
+ {formhelp note="Clicking on an item will attach the item to your wiki page."}
+ {/if}
{/strip}
diff --git a/templates/comments.tpl b/templates/comments.tpl
index d7b8ee3..d8c046a 100644
--- a/templates/comments.tpl
+++ b/templates/comments.tpl
@@ -76,7 +76,7 @@ If cookie is not set, then use $gBitSystemPrefs.comments_display_expanded to det
<div class="row">
{formlabel label="Comment" for="commentpost"}
{forminput}
- <textarea id="commentpost" name="comment_data" rows="10" cols="80">{$postComment.data}</textarea>
+ <textarea id="commentpost" name="comment_data" rows="10" cols="50">{$postComment.data}</textarea>
{formhelp note="Use [http://www.foo.com] or [http://www.foo.com|description] for links.<br />HTML tags are not allowed inside comments."}
{/forminput}
</div>
diff --git a/templates/edit_storage.tpl b/templates/edit_storage.tpl
index 2dcf1ee..9dd02a6 100644
--- a/templates/edit_storage.tpl
+++ b/templates/edit_storage.tpl
@@ -1,8 +1,6 @@
-{php}
-include (LIBERTY_PKG_PATH."edit_storage_inc.php");
-{/php}
-{strip}
+{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'}
<div class="row">
@@ -14,43 +12,69 @@ include (LIBERTY_PKG_PATH."edit_storage_inc.php");
</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>
- <!-- Attach existing attachment -->
- <div class="row">
- {formlabel label="Existing Attachment ID"}
- {forminput}
- <input type="text" name="existing_attachment_id[]" id="existing_attachment_id_input" size="6"/><br />
- {jspopup href="`$smarty.const.LIBERTY_PKG_URL`attachment_browser.php" title="Attachment browser"}
- {/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">Thumbnail</th>
- <th scope="col" title="File Properties"></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 style="text-align:center;"><a href="{$storage.source_url}"><img src="{$storage.thumbnail_url.small}" alt="{$storage.filename}" /></a></td>
- <td>
- 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>
+ <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}
-{/if}
{/strip}
+{/if}
diff --git a/templates/list_content_inc.tpl b/templates/list_content_inc.tpl
index 4476e35..6c3e64c 100644
--- a/templates/list_content_inc.tpl
+++ b/templates/list_content_inc.tpl
@@ -30,6 +30,7 @@
<table class="data">
<caption>{tr}Available Content{/tr} <span class="total">[ {$contentCount} ]</span></caption>
<tr>
+ <th style="width:2%;">{smartlink ititle="ID" isort=content_id page=$page user_id=$user_id content_type_guid=$contentSelect}</th>
<th>{smartlink ititle="Title" isort=title page=$page user_id=$user_id idefault=1 content_type_guid=$contentSelect}</th>
<th>{smartlink ititle="Content Type" isort=content_type_guid page=$page user_id=$user_id content_type_guid=$contentSelect}</th>
<th>{smartlink ititle="Author" isort=$isort_author page=$page content_type_guid=$contentSelect}</th>
@@ -37,6 +38,7 @@
</tr>
{foreach from=$contentList item=item}
<tr class="{cycle values='odd,even'}">
+ <td style="text-align:right;">{$item.content_id}</td>
<td>{$item.display_link}</td>
<td>{assign var=content_type_guid value=`$item.content_type_guid`}{$contentTypes.$content_type_guid}</td>
<td>{displayname real_name=$item.creator_real_name user=$item.creator_user}</td>