summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-12-20 20:50:17 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-12-20 20:50:17 +0000
commit869cc91bfaa459a50fb2825349f1575f0fa80cd3 (patch)
tree25eb1e738cc4d45e1687113349565dafb179d7f1 /templates
parent87ea0a1c3d8c8de9f949b7a50434eda84897d11b (diff)
downloadmessages-869cc91bfaa459a50fb2825349f1575f0fa80cd3.tar.gz
messages-869cc91bfaa459a50fb2825349f1575f0fa80cd3.tar.bz2
messages-869cc91bfaa459a50fb2825349f1575f0fa80cd3.zip
massive messages cleanup, rename files to closer match bitweaver standard. create messages class only when needed and don't crete global class on evey page load. still some work needed with broadcast messages
Diffstat (limited to 'templates')
-rw-r--r--templates/broadcast.tpl74
-rw-r--r--templates/compose.tpl (renamed from templates/messages_compose.tpl)1
-rw-r--r--templates/mailbox.tpl (renamed from templates/messages_mailbox.tpl)37
-rw-r--r--templates/message_notification.tpl (renamed from templates/messages_message_notification.tpl)8
-rw-r--r--templates/messages_broadcast.tpl55
-rw-r--r--templates/preferences_inc.tpl (renamed from templates/messages_preferences_inc.tpl)0
-rw-r--r--templates/read.tpl (renamed from templates/messages_read.tpl)1
7 files changed, 100 insertions, 76 deletions
diff --git a/templates/broadcast.tpl b/templates/broadcast.tpl
new file mode 100644
index 0000000..c54656c
--- /dev/null
+++ b/templates/broadcast.tpl
@@ -0,0 +1,74 @@
+<div class="display messages">
+ <div class="header">
+ <h1>{tr}Broadcast message{/tr}</h1>
+ </div>
+
+ {include file="bitpackage:users/my_bitweaver_bar.tpl"}
+ {include file="bitpackage:messages/messages_nav.tpl"}
+
+ <div class="body">
+ {formfeedback hash=$feedback}
+
+ {if !$feedback}
+ {form legend="Broadcast message"}
+ <div class="row">
+ {formlabel label="Group" for="broadcast-group"}
+ {forminput}
+ <select name="group_id" id="broadcast-group">
+ {section name=ix loop=$groups}
+ {if $groups[ix].group_id && $groups[ix].group_name}
+ <option value="{$groups[ix].group_id}">{$groups[ix].group_name}</option>
+ {/if}
+ {/section}
+ </select>
+ {formhelp note=""}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Priority" for="broadcast-priority"}
+ {forminput}
+ <select name="priority" id="broadcast-priority">
+ <option value="1" {if $priority eq 1}selected="selected"{/if}>{tr}1 -Lowest-{/tr}</option>
+ <option value="2" {if $priority eq 2}selected="selected"{/if}>{tr}2 -Low-{/tr}</option>
+ <option value="3" {if $priority eq 3}selected="selected"{/if}>{tr}3 -Normal-{/tr}</option>
+ <option value="4" {if $priority eq 4}selected="selected"{/if}>{tr}4 -High-{/tr}</option>
+ <option value="5" {if $priority eq 5}selected="selected"{/if}>{tr}5 -Very High-{/tr}</option>
+ </select>
+ {formhelp note=""}
+ {/forminput}
+ </div>
+
+ <div class="row">
+ {formlabel label="Subject" for="broadcast-subject"}
+ {forminput}
+ <input type="text" name="subject" id="broadcast-subject" value="{$subject|escape}" size="50" maxlength="255" />
+ {formhelp note=""}
+ {/forminput}
+ </div>
+
+ {* only display quicktags if tikiwiki quicktags are available *}
+ {if $gBitSystem->isPackageActive( 'quicktags' ) and $gLibertySystem->mPlugins.tikiwiki.is_active eq 'y'}
+ {include file="bitpackage:quicktags/quicktags_full.tpl" textarea_id=message_body default_format=tikiwiki}
+ {/if}
+
+ {* only display quicktags if tikiwiki quicktags are available *}
+ {if $gBitSystem->isPackageActive( 'smileys' ) and $gLibertySystem->mPlugins.tikiwiki.is_active eq 'y'}
+ {include file="bitpackage:smileys/smileys_full.tpl" textarea_id=message_body default_format=tikiwiki}
+ {/if}
+
+ <div class="row">
+ {formlabel label="" for=""}
+ {forminput}
+ <textarea rows="20" cols="50" name="body" id="message_body">{$body|escape}</textarea>
+ {formhelp note=""}
+ {/forminput}
+ </div>
+
+ <div class="submit">
+ <input type="submit" name="send" value="{tr}Send message{/tr}" />
+ </div>
+ {/form}
+ {/if}
+ </div><!-- end .body -->
+</div><!-- end .messages -->
diff --git a/templates/messages_compose.tpl b/templates/compose.tpl
index 9fad99f..56a0cad 100644
--- a/templates/messages_compose.tpl
+++ b/templates/compose.tpl
@@ -6,6 +6,7 @@
</div>
{include file="bitpackage:users/my_bitweaver_bar.tpl"}
+ {include file="bitpackage:messages/messages_nav.tpl"}
<div class="body">
{formfeedback hash=$feedback}
diff --git a/templates/messages_mailbox.tpl b/templates/mailbox.tpl
index 8adb5f5..3582338 100644
--- a/templates/messages_mailbox.tpl
+++ b/templates/mailbox.tpl
@@ -6,10 +6,10 @@
</div>
{include file="bitpackage:users/my_bitweaver_bar.tpl"}
+ {include file="bitpackage:messages/messages_nav.tpl"}
<div class="body">
{form legend="Your Personal Messages"}
- <input type="hidden" name="offset" value="{$offset|escape}" />
<input type="hidden" name="find" value="{$find|escape}" />
<input type="hidden" name="sort_mode" value="{$sort_mode|escape}" />
<input type="hidden" name="flag" value="{$flag|escape}" />
@@ -23,10 +23,10 @@
<caption>{tr}Messages{/tr}</caption>
<tr>
<th style="width:1%">&nbsp;</th>
- <th style="width:1%">{smartlink ititle="Flagged" isort=is_flagged ibiticon="icons/mail-mark-important" find=$find flag=$flag offset=$offset priority=$priority flagval=$flagval}</th>
- <th>{smartlink ititle="From" isort=$displayName find=$find flag=$flag offset=$offset priority=$priority flagval=$flagval}</th>
- <th>{smartlink ititle="Subject" isort=subject find=$find flag=$flag offset=$offset priority=$priority flagval=$flagval}</th>
- <th>{smartlink ititle="Date" isort=msg_date find=$find flag=$flag offset=$offset priority=$priority flagval=$flagval}</th>
+ <th style="width:1%">{smartlink ititle="Flagged" isort=is_flagged ibiticon="icons/mail-mark-important" find=$find flag=$flag priority=$priority flagval=$flagval}</th>
+ <th>{smartlink ititle="From" isort=$displayName find=$find flag=$flag priority=$priority flagval=$flagval}</th>
+ <th>{smartlink ititle="Subject" isort=subject find=$find flag=$flag priority=$priority flagval=$flagval}</th>
+ <th>{smartlink ititle="Date" isort=msg_date find=$find flag=$flag priority=$priority flagval=$flagval}</th>
<th>{tr}Size{/tr}</th>
</tr>
@@ -35,7 +35,10 @@
<td><input type="checkbox" name="msg[{$items[user].msg_id}]" /></td>
<td class="prio{$items[user].priority}">{if $items[user].is_flagged eq 'y'}{biticon ipackage="icons" iname="mail-mark-important" iexplain="Flagged"}{/if}</td>
<td>{displayname hash=$items[user]}</td>
- <td><a href="{$smarty.const.MESSAGES_PKG_URL}read.php?offset={$offset}&amp;flag={$flag}&amp;priority={$priority}&amp;flagval={$flagval}&amp;sort_mode={$sort_mode}&amp;find={$find}&amp;msg_id={$items[user].msg_id}">{$items[user].subject}</a></td>
+ <td>
+ <a href="{$smarty.const.MESSAGES_PKG_URL}read.php?flag={$flag}&amp;priority={$priority}&amp;flagval={$flagval}&amp;sort_mode={$sort_mode}&amp;find={$find}&amp;msg_id={$items[user].msg_id}">{$items[user].subject}</a>
+ {if $items[user].is_broadcast_message} <small>[{tr}broadcast{/tr}]</small>{/if}
+ </td>
<td style="text-align:right;">{$items[user].msg_date|bit_short_datetime}</td>
<td style="text-align:right;">{$items[user].len|kbsize}</td>
</tr>
@@ -63,11 +66,11 @@
{formlabel label="Messages" for="messages"}
{forminput}
<select name="flags" id="messages">
- <option value="is_read_y" {if $flag eq 'is_read' and $flagval eq 'y'}selected="selected"{/if}>{tr}Read{/tr}</option>
- <option value="is_read_n" {if $flag eq 'is_read' and $flagval eq 'n'}selected="selected"{/if}>{tr}Unread{/tr}</option>
- <option value="is_flagged_y" {if $flag eq 'is_flagged' and $flagval eq 'y'}selected="selected"{/if}>{tr}Flagged{/tr}</option>
- <option value="is_flagged_y" {if $flag eq 'isflagged' and $flagval eq 'n'}selected="selected"{/if}>{tr}Unflagged{/tr}</option>
- <option value="" {if $flag eq ''}selected="selected"{/if}>{tr}All{/tr}</option>
+ <option value="">{tr}All{/tr}</option>
+ <option value="is_read_y" {if $smarty.request.flag eq 'is_read' and $smarty.request.flagval eq 'y'}selected="selected"{/if}>{tr}Read{/tr}</option>
+ <option value="is_read_n" {if $smarty.request.flag eq 'is_read' and $smarty.request.flagval eq 'n'}selected="selected"{/if}>{tr}Unread{/tr}</option>
+ <option value="is_flagged_y" {if $smarty.request.flag eq 'is_flagged' and $smarty.request.flagval eq 'y'}selected="selected"{/if}>{tr}Flagged{/tr}</option>
+ <option value="is_flagged_y" {if $smarty.request.flag eq 'isflagged' and $smarty.request.flagval eq 'n'}selected="selected"{/if}>{tr}Unflagged{/tr}</option>
</select>
{formhelp note=""}
{/forminput}
@@ -77,12 +80,12 @@
{formlabel label="Priority" for="priority"}
{forminput}
<select name="priority" id="priority">
- <option value="" {if $priority eq ''}selected="selected"{/if}>{tr}All{/tr}</option>
- <option value="1" {if $priority eq 1}selected="selected"{/if}>{tr}1{/tr}</option>
- <option value="2" {if $priority eq 2}selected="selected"{/if}>{tr}2{/tr}</option>
- <option value="3" {if $priority eq 3}selected="selected"{/if}>{tr}3{/tr}</option>
- <option value="4" {if $priority eq 4}selected="selected"{/if}>{tr}4{/tr}</option>
- <option value="5" {if $priority eq 5}selected="selected"{/if}>{tr}5{/tr}</option>
+ <option value="" {if $smarty.request.priority eq ''}selected="selected"{/if}>{tr}All{/tr}</option>
+ <option value="1" {if $smarty.request.priority eq 1}selected="selected"{/if}>{tr}1{/tr}</option>
+ <option value="2" {if $smarty.request.priority eq 2}selected="selected"{/if}>{tr}2{/tr}</option>
+ <option value="3" {if $smarty.request.priority eq 3}selected="selected"{/if}>{tr}3{/tr}</option>
+ <option value="4" {if $smarty.request.priority eq 4}selected="selected"{/if}>{tr}4{/tr}</option>
+ <option value="5" {if $smarty.request.priority eq 5}selected="selected"{/if}>{tr}5{/tr}</option>
</select>
{formhelp note=""}
{/forminput}
diff --git a/templates/messages_message_notification.tpl b/templates/message_notification.tpl
index 2fccab5..56fa855 100644
--- a/templates/messages_message_notification.tpl
+++ b/templates/message_notification.tpl
@@ -1,8 +1,8 @@
{tr}Hi,
A new message was posted to you. To respond, please visit http://{$smarty.server.HTTP_HOST}{$smarty.const.MESSAGES_PKG_URL}message_box.php
-From: {$mail_from}
-Subject: {$mail_subject}
-Date:{/tr} {$mail_date|date_format:"%a %b %Y [%H:%I]"}
+From: {$from}
+Subject: {$msgHash.subject}
+Date:{/tr} {$msgHash.msg_date|bit_long_datetime}
-{$mail_body}
+{$msgHash.body}
diff --git a/templates/messages_broadcast.tpl b/templates/messages_broadcast.tpl
deleted file mode 100644
index dc7f318..0000000
--- a/templates/messages_broadcast.tpl
+++ /dev/null
@@ -1,55 +0,0 @@
-<div class="floaticon">{bithelp}</div>
-<div class="contain usermessages">
-<div class="header">
-<h1><a href="{$smarty.const.MESSAGES_PKG_URL}broadcast.php">{tr}Broadcast message{/tr}</a></h1>
-</div>
-
-{include file="bitpackage:users/my_bitweaver_bar.tpl"}
-{include file="bitpackage:messages/messages_nav.tpl"}
-
-<div class="body">
-{formfeedback error=$errors success=$message}
-{if $sent}
- {$message}
-{else}
-<form action="{$smarty.const.MESSAGES_PKG_URL}broadcast.php" method="post">
-<table class="panel">
- <tr>
- <td><label for="broadcast-group">{tr}Group{/tr}:</label></td>
- <td>
- <select name="group" id="broadcast-group">
-
- {section name=ix loop=$groups}
- {if $groups[ix].group_id && $groups[ix].group_name}
- <option value="{$groups[ix].group_id}">{$groups[ix].group_name}</option>
- {/if}
- {/section}
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="broadcast-priority">{tr}Priority{/tr}:</label></td><td>
- <select name="priority" id="broadcast-priority">
- <option value="1" {if $priority eq 1}selected="selected"{/if}>{tr}1 -Lowest-{/tr}</option>
- <option value="2" {if $priority eq 2}selected="selected"{/if}>{tr}2 -Low-{/tr}</option>
- <option value="3" {if $priority eq 3}selected="selected"{/if}>{tr}3 -Normal-{/tr}</option>
- <option value="4" {if $priority eq 4}selected="selected"{/if}>{tr}4 -High-{/tr}</option>
- <option value="5" {if $priority eq 5}selected="selected"{/if}>{tr}5 -Very High-{/tr}</option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="broadcast-subject">{tr}Subject{/tr}:</label></td><td><input type="text" name="subject" id="broadcast-subject" value="{$subject|escape}" size="50" maxlength="255"/></td>
- </tr>
- <tr>
- <td><label for="broadcast-body">{tr}Body{/tr}:</label></td><td align="center"><textarea rows="20" cols="50" name="body">{$body|escape}</textarea></td>
- </tr>
- <tr class="panelsubmitrow">
- <td colspan="2"><input type="submit" name="send" value="{tr}send message{/tr}" /></td>
- </tr>
-</table>
-</form>
-{/if}
-
-</div><!-- end .body -->
-</div><!-- end .messages -->
diff --git a/templates/messages_preferences_inc.tpl b/templates/preferences_inc.tpl
index ff5af53..ff5af53 100644
--- a/templates/messages_preferences_inc.tpl
+++ b/templates/preferences_inc.tpl
diff --git a/templates/messages_read.tpl b/templates/read.tpl
index de0ce25..95fad21 100644
--- a/templates/messages_read.tpl
+++ b/templates/read.tpl
@@ -5,6 +5,7 @@
</div>
{include file="bitpackage:users/my_bitweaver_bar.tpl"}
+ {include file="bitpackage:messages/messages_nav.tpl"}
{if $next}
{assign var=read_id value=$next}