From 83ba22c77b8790d8cbea8c684c4e1a0c431b83d6 Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 4 Nov 2010 09:59:55 +0000 Subject: - Unify template files naming --- program/steps/addressbook/edit.inc | 12 +++---- program/steps/addressbook/show.inc | 2 +- program/steps/mail/show.inc | 18 +++++----- program/steps/settings/edit_identity.inc | 6 ++-- skins/default/templates/addcontact.html | 22 ------------ skins/default/templates/contact.html | 20 +++++++++++ skins/default/templates/contactadd.html | 22 ++++++++++++ skins/default/templates/contactedit.html | 22 ++++++++++++ skins/default/templates/editcontact.html | 22 ------------ skins/default/templates/editidentity.html | 56 ------------------------------- skins/default/templates/identityedit.html | 56 +++++++++++++++++++++++++++++++ skins/default/templates/messageprint.html | 18 ++++++++++ skins/default/templates/printmessage.html | 18 ---------- skins/default/templates/showcontact.html | 20 ----------- 14 files changed, 157 insertions(+), 157 deletions(-) delete mode 100644 skins/default/templates/addcontact.html create mode 100644 skins/default/templates/contact.html create mode 100644 skins/default/templates/contactadd.html create mode 100644 skins/default/templates/contactedit.html delete mode 100644 skins/default/templates/editcontact.html delete mode 100644 skins/default/templates/editidentity.html create mode 100644 skins/default/templates/identityedit.html create mode 100644 skins/default/templates/messageprint.html delete mode 100644 skins/default/templates/printmessage.html delete mode 100644 skins/default/templates/showcontact.html diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc index d975c76f1..831390382 100644 --- a/program/steps/addressbook/edit.inc +++ b/program/steps/addressbook/edit.inc @@ -79,15 +79,15 @@ function get_form_tags($attrib) global $CONTACTS, $EDIT_FORM, $RCMAIL; $form_start = $form_end = ''; - + if (empty($EDIT_FORM)) { $hiddenfields = new html_hiddenfield(array( 'name' => '_source', 'value' => get_input_value('_source', RCUBE_INPUT_GPC))); $hiddenfields->add(array('name' => '_gid', 'value' => $CONTACTS->group_id)); - + if (($result = $CONTACTS->get_result()) && ($record = $result->first())) $hiddenfields->add(array('name' => '_cid', 'value' => $record['ID'])); - + $form_start = $RCMAIL->output->request_form(array( 'name' => "form", 'method' => "post", 'task' => $RCMAIL->task, 'action' => 'save', @@ -105,8 +105,8 @@ function get_form_tags($attrib) $OUTPUT->add_handler('contacteditform', 'rcmail_contact_editform'); -if (!$CONTACTS->get_result() && $OUTPUT->template_exists('addcontact')) - $OUTPUT->send('addcontact'); +if (!$CONTACTS->get_result() && $OUTPUT->template_exists('contactadd')) + $OUTPUT->send('contactadd'); // this will be executed if no template for addcontact exists -$OUTPUT->send('editcontact'); +$OUTPUT->send('contactedit'); diff --git a/program/steps/addressbook/show.inc b/program/steps/addressbook/show.inc index 67eaa53ef..f1c23b8e3 100644 --- a/program/steps/addressbook/show.inc +++ b/program/steps/addressbook/show.inc @@ -126,4 +126,4 @@ function rcmail_contact_record_groups($contact_id) //$OUTPUT->framed = $_framed; $OUTPUT->add_handler('contactdetails', 'rcmail_contact_details'); -$OUTPUT->send('showcontact'); +$OUTPUT->send('contact'); diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index 13b7ed650..41b4bc614 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -149,7 +149,7 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) { function rcmail_message_attachments($attrib) { global $PRINT_MODE, $MESSAGE; - + $out = $ol = ''; if (sizeof($MESSAGE->attachments)) { @@ -182,27 +182,27 @@ function rcmail_message_attachments($attrib) } $out = html::tag('ul', $attrib, $ol, html::$common_attrib); - } - + } + return $out; } function rcmail_remote_objects_msg($attrib) { global $MESSAGE, $RCMAIL; - + if (!$attrib['id']) $attrib['id'] = 'rcmremoteobjmsg'; - + $msg = Q(rcube_label('blockedimages')) . ' '; $msg .= html::a(array('href' => "#loadimages", 'onclick' => JS_OBJECT_NAME.".command('load-images')"), Q(rcube_label('showimages'))); - + // add link to save sender in addressbook and reload message if ($MESSAGE->sender['mailto'] && $RCMAIL->config->get('show_images') == 1) { $msg .= ' ' . html::a(array('href' => "#alwaysload", 'onclick' => JS_OBJECT_NAME.".command('always-load')", 'style' => "white-space:nowrap"), Q(rcube_label(array('name' => 'alwaysshow', 'vars' => array('sender' => $MESSAGE->sender['mailto']))))); } - + $RCMAIL->output->add_gui_object('remoteobjectsmsg', $attrib['id']); return html::div($attrib, $msg); } @@ -229,8 +229,8 @@ $OUTPUT->add_handlers(array( 'blockedobjects' => 'rcmail_remote_objects_msg')); -if ($RCMAIL->action=='print' && $OUTPUT->template_exists('printmessage')) - $OUTPUT->send('printmessage', false); +if ($RCMAIL->action=='print' && $OUTPUT->template_exists('messageprint')) + $OUTPUT->send('messageprint', false); else if ($RCMAIL->action=='preview' && $OUTPUT->template_exists('messagepreview')) $OUTPUT->send('messagepreview', false); else diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc index 89f4dde65..ef2be6584 100644 --- a/program/steps/settings/edit_identity.inc +++ b/program/steps/settings/edit_identity.inc @@ -153,9 +153,9 @@ $OUTPUT->set_env('identities_level', IDENTITIES_LEVEL); $OUTPUT->set_pagetitle(rcube_label(($RCMAIL->action=='add-identity' ? 'newidentity' : 'edititem'))); -if ($RCMAIL->action=='add-identity' && $OUTPUT->template_exists('addidentity')) - $OUTPUT->send('addidentity'); +if ($RCMAIL->action=='add-identity' && $OUTPUT->template_exists('identityadd')) + $OUTPUT->send('identityadd'); -$OUTPUT->send('editidentity'); +$OUTPUT->send('identityedit'); diff --git a/skins/default/templates/addcontact.html b/skins/default/templates/addcontact.html deleted file mode 100644 index 1a10f10ac..000000000 --- a/skins/default/templates/addcontact.html +++ /dev/null @@ -1,22 +0,0 @@ - - - -<roundcube:object name="pagetitle" /> - - - - - -
-
- -

- " class="button" onclick="history.back()" />  - -

- -
- - - - diff --git a/skins/default/templates/contact.html b/skins/default/templates/contact.html new file mode 100644 index 000000000..06d0fbee5 --- /dev/null +++ b/skins/default/templates/contact.html @@ -0,0 +1,20 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + +
+
+ +

+ +

+
+ + + + diff --git a/skins/default/templates/contactadd.html b/skins/default/templates/contactadd.html new file mode 100644 index 000000000..1a10f10ac --- /dev/null +++ b/skins/default/templates/contactadd.html @@ -0,0 +1,22 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + +
+
+ +

+ " class="button" onclick="history.back()" />  + +

+ +
+ + + + diff --git a/skins/default/templates/contactedit.html b/skins/default/templates/contactedit.html new file mode 100644 index 000000000..a15aaf22a --- /dev/null +++ b/skins/default/templates/contactedit.html @@ -0,0 +1,22 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + +
+
+ +

+   + +

+ +
+ + + + diff --git a/skins/default/templates/editcontact.html b/skins/default/templates/editcontact.html deleted file mode 100644 index a15aaf22a..000000000 --- a/skins/default/templates/editcontact.html +++ /dev/null @@ -1,22 +0,0 @@ - - - -<roundcube:object name="pagetitle" /> - - - - - -
-
- -

-   - -

- -
- - - - diff --git a/skins/default/templates/editidentity.html b/skins/default/templates/editidentity.html deleted file mode 100644 index 24c37a629..000000000 --- a/skins/default/templates/editidentity.html +++ /dev/null @@ -1,56 +0,0 @@ - - - -<roundcube:object name="pagetitle" /> - - - - - - - - - - - - -
- -
-
-
- -
-
- -
-
- - - -
-
- -
- -

- - -

-
- - -
- -
- - - diff --git a/skins/default/templates/identityedit.html b/skins/default/templates/identityedit.html new file mode 100644 index 000000000..24c37a629 --- /dev/null +++ b/skins/default/templates/identityedit.html @@ -0,0 +1,56 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + + + + + + + + +
+ +
+
+
+ +
+
+ +
+
+ + + +
+
+ +
+ +

+ + +

+
+ + +
+ +
+ + + diff --git a/skins/default/templates/messageprint.html b/skins/default/templates/messageprint.html new file mode 100644 index 000000000..f2775cd61 --- /dev/null +++ b/skins/default/templates/messageprint.html @@ -0,0 +1,18 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + + +
+ + + +
+ + + diff --git a/skins/default/templates/printmessage.html b/skins/default/templates/printmessage.html deleted file mode 100644 index f2775cd61..000000000 --- a/skins/default/templates/printmessage.html +++ /dev/null @@ -1,18 +0,0 @@ - - - -<roundcube:object name="pagetitle" /> - - - - - - -
- - - -
- - - diff --git a/skins/default/templates/showcontact.html b/skins/default/templates/showcontact.html deleted file mode 100644 index 06d0fbee5..000000000 --- a/skins/default/templates/showcontact.html +++ /dev/null @@ -1,20 +0,0 @@ - - - -<roundcube:object name="pagetitle" /> - - - - - -
-
- -

- -

-
- - - - -- cgit v1.2.3