aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-30 06:09:20 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-30 06:09:20 -0700
commitb399b20dee2752a038a64a8be2c89df142aae280 (patch)
treed94e361d0ec77efa3b0ceade9b762f6595bbc7eb /view
parentf83aa6c8a57e0ba9be2cd5842899488a4c2a8514 (diff)
downloadvolse-hubzilla-b399b20dee2752a038a64a8be2c89df142aae280.tar.gz
volse-hubzilla-b399b20dee2752a038a64a8be2c89df142aae280.tar.bz2
volse-hubzilla-b399b20dee2752a038a64a8be2c89df142aae280.zip
mail, i18n, etc.
Diffstat (limited to 'view')
-rw-r--r--view/acl_selectors.php73
-rw-r--r--view/atom_mail.tpl6
-rw-r--r--view/jot-header.tpl2
-rw-r--r--view/mail_list.tpl9
-rw-r--r--view/prv_message.tpl15
-rw-r--r--view/style.css23
6 files changed, 89 insertions, 39 deletions
diff --git a/view/acl_selectors.php b/view/acl_selectors.php
index 09ce24d0e..0ffdc8ab3 100644
--- a/view/acl_selectors.php
+++ b/view/acl_selectors.php
@@ -30,14 +30,25 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
-function contact_select($selname,$selclass,$preselected = false,$size = 4) {
+function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false) {
$o = '';
- $o .= "<select name=\"{$selname}[]\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" />\r\n";
+ // When used for private messages, we limit correspondence to mutual friends and the selector
+ // to one recipient. By default our selector allows multiple selects amongst all contacts.
+
+ if($privmail) {
+ $sql_extra = " AND `issued-id` != '' AND `dfrn-id` != '' ";
+ $o .= "<select name=\"$selname\" class=\"$selclass\" size=\"$size\" />\r\n";
+ }
+ else {
+ $sql_extra = '';
+ $o .= "<select name=\"{$selname}[]\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" />\r\n";
+ }
$r = q("SELECT `id`, `name` FROM `contact`
WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0
+ $sql_extra
ORDER BY `name` ASC ",
$_SESSION['uid']
);
@@ -62,39 +73,39 @@ function contact_select($selname,$selclass,$preselected = false,$size = 4) {
function populate_acl() {
$o = '';
- $o .= "<div id=\"acl-wrapper\">";
- $o .= "<div id=\"acl-permit-outer-wrapper\">";
- $o .= "<div id=\"acl-permit-text\">Visible To:</div>";
- $o .= "<div id=\"acl-permit-text-end\"></div>";
- $o .= "<div id=\"acl-permit-wrapper\">";
- $o .= "<div id=\"group_allow_wrapper\">";
- $o .= "<label id=\"acl-allow-group-label\" for=\"group_allow\" >Groups</label>";
+ $o .= '<div id="acl-wrapper">';
+ $o .= '<div id="acl-permit-outer-wrapper">';
+ $o .= '<div id="acl-permit-text">' . t('Visible To:') . '</div>';
+ $o .= '<div id="acl-permit-text-end"></div>';
+ $o .= '<div id="acl-permit-wrapper">';
+ $o .= '<div id="group_allow_wrapper">';
+ $o .= '<label id="acl-allow-group-label" for="group_allow" >' . t('Groups') . '</label>';
$o .= group_select('group_allow','group_allow');
- $o .= "</div>";
- $o .= "<div id=\"contact_allow_wrapper\">";
- $o .= "<label id=\"acl-allow-contact-label\" for=\"contact_allow\" >Contacts</label>";
+ $o .= '</div>';
+ $o .= '<div id="contact_allow_wrapper">';
+ $o .= '<label id="acl-allow-contact-label" for="contact_allow" >' . t('Contacts') . '</label>';
$o .= contact_select('contact_allow','contact_allow');
- $o .= "</div>";
- $o .= "</div>\r\n";
- $o .= "<div id=\"acl-allow-end\"></div>\r\n";
- $o .= "</div>";
- $o .= "<div id=\"acl-deny-outer-wrapper\">";
- $o .= "<div id=\"acl-deny-text\">Except For:</div>";
- $o .= "<div id=\"acl-deny-text-end\"></div>";
- $o .= "<div id=\"acl-deny-wrapper\">";
- $o .= "<div id=\"group_deny_wrapper\" >";
- $o .= "<label id=\"acl-deny-group-label\" for=\"group_deny\" >Groups</label>";
+ $o .= '</div>';
+ $o .= '</div>' . "\r\n";
+ $o .= '<div id="acl-allow-end"></div>' . "\r\n";
+ $o .= '</div>';
+ $o .= '<div id="acl-deny-outer-wrapper">';
+ $o .= '<div id="acl-deny-text">' . t('Except For:') . '</div>';
+ $o .= '<div id="acl-deny-text-end"></div>';
+ $o .= '<div id="acl-deny-wrapper">';
+ $o .= '<div id="group_deny_wrapper" >';
+ $o .= '<label id="acl-deny-group-label" for="group_deny" >' . t('Groups') . '</label>';
$o .= group_select('group_deny','group_deny');
- $o .= "</div>";
- $o .= "<div id=\"contact_deny_wrapper\" >";
- $o .= "<label id=\"acl-deny-contact-label\" for=\"contact_deny\" >Contacts</label>";
+ $o .= '</div>';
+ $o .= '<div id="contact_deny_wrapper" >';
+ $o .= '<label id="acl-deny-contact-label" for="contact_deny" >' . t('Contacts') . '</label>';
$o .= contact_select('contact_deny','contact_deny');
- $o .= "</div>";
- $o .= "</div>\r\n";
- $o .= "<div id=\"acl-deny-end\"></div>\r\n";
- $o .= "</div>";
- $o .= "</div>\r\n";
- $o .= "<div id=\"acl-wrapper-end\"></div>";
+ $o .= '</div>';
+ $o .= '</div>' . "\r\n";
+ $o .= '<div id="acl-deny-end"></div>' . "\r\n";
+ $o .= '</div>';
+ $o .= '</div>' . "\r\n";
+ $o .= '<div id="acl-wrapper-end"></div>' . "\r\n";
return $o;
} \ No newline at end of file
diff --git a/view/atom_mail.tpl b/view/atom_mail.tpl
index ba251d068..bf7c3efc8 100644
--- a/view/atom_mail.tpl
+++ b/view/atom_mail.tpl
@@ -2,9 +2,9 @@
<dfrn:mail>
<dfrn:sender>
- <dfrn:name>$owner_name</dfrn:name>
- <dfrn:uri>$owner_profile_page</dfrn:uri>
- <dfrn:avatar>$owner_thumb</dfrn:avatar>
+ <dfrn:name>$name</dfrn:name>
+ <dfrn:uri>$profile_page</dfrn:uri>
+ <dfrn:avatar>$thumb</dfrn:avatar>
</dfrn:sender>
<dfrn:id>$item_id</dfrn:id>
diff --git a/view/jot-header.tpl b/view/jot-header.tpl
index 3a1d0a2ae..34837d075 100644
--- a/view/jot-header.tpl
+++ b/view/jot-header.tpl
@@ -6,7 +6,7 @@
tinyMCE.init({
theme : "advanced",
mode : "specific_textareas",
- editor_selector: "profile-jot-text",
+ editor_selector: /(profile-jot-text|prvmail-text)/,
plugins : "bbcode",
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
theme_advanced_buttons2 : "",
diff --git a/view/mail_list.tpl b/view/mail_list.tpl
new file mode 100644
index 000000000..d5a79ef35
--- /dev/null
+++ b/view/mail_list.tpl
@@ -0,0 +1,9 @@
+<div class="mail-list-outside-wrapper">
+ <div class="mail-list-sender" >
+ <a href="$from_url" class="mail-list-sender-url" ><img class="mail-list-sender-photo" src="$from_photo" alt="$from_name" /></a>
+ <div class="mail-list-sender-name" >$from_name</div>
+ </div>
+ <div class="mail-list-date">$date</div>
+ <div class="mail-list-subject"><a href="message/$id" class="mail-list-link">$subject</a></div>
+</div>
+<div class="mail-list-outside-wrapper-end"></div>
diff --git a/view/prv_message.tpl b/view/prv_message.tpl
index 6a0b161ef..64c36b998 100644
--- a/view/prv_message.tpl
+++ b/view/prv_message.tpl
@@ -1,22 +1,29 @@
+<h3>$header</h3>
+
<div id="prvmail-wrapper" >
<form id="prvmail-form" action="message" method="post" >
+<div id="prvmail-to-label">$to</div>
$select
-<textarea rows="5" cols="64" class="prvmail-text" id="prvmail-text" name="body" ></textarea>
+<div id="prvmail-subject-label">$subject</div>
+<input type="text" size="64" maxlength="255" id="prvmail-subject" name="subject" />
+
+<div id="prvmail-message-label">$yourmessage</div>
+<textarea rows="8" cols="72" class="prvmail-text" id="prvmail-text" name="body" ></textarea>
</div>
<div id="prvmail-submit-wrapper" >
<input type="submit" id="prvmail-submit" name="submit" value="Submit" />
<div id="prvmail-upload-wrapper" >
- <div id="prvmail-upload-div" ><img id="prvmail-upload" src="images/camera-icon.gif" alt="Upload Photo" title="Upload Photo" /></div>
+ <div id="prvmail-upload-div" ><img id="prvmail-upload" src="images/camera-icon.gif" alt="$upload" title="$upload" /></div>
</div>
<div id="prvmail-link-wrapper" >
- <img id="prvmail-link" src="images/link-icon.gif" alt="Insert web link" title="Insert web link" onclick="jotGetLink();" />
+ <img id="prvmail-link" src="images/link-icon.gif" alt="$insert" title="$insert" onclick="jotGetLink();" />
</div>
<div id="prvmail-rotator-wrapper" >
- <img id="prvmail-rotator" src="images/rotator.gif" alt="Please wait" title="Please wait" style="display: none;" />
+ <img id="prvmail-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
</div>
</div>
<div id="prvmail-end"></div>
diff --git a/view/style.css b/view/style.css
index 8b67be08c..ba5102fd3 100644
--- a/view/style.css
+++ b/view/style.css
@@ -1051,4 +1051,27 @@ input#dfrn-url {
}
#group-edit-name-end {
clear: both;
+}
+
+#prvmail-to-label, #prvmail-subject-label, #prvmail-message-label {
+ margin-bottom: 10px;
+ margin-top: 20px;
+}
+
+#prvmail-submit {
+ float: left;
+ margin-top: 10px;
+ margin-right: 30px;
+}
+#prvmail-upload-wrapper,
+#prvmail-link-wrapper,
+#prvmail-rotator-wrapper {
+ float: left;
+ margin-top: 10px;
+ margin-right: 10px;
+ width: 24px;
+}
+
+#prvmail-end {
+ clear: both;
} \ No newline at end of file