diff --git a/tailbone/templates/messages/view.mako b/tailbone/templates/messages/view.mako
index d101d1ef..b277da52 100644
--- a/tailbone/templates/messages/view.mako
+++ b/tailbone/templates/messages/view.mako
@@ -1,6 +1,24 @@
## -*- coding: utf-8 -*-
<%inherit file="/master/view.mako" />
+<%def name="head_tags()">
+ ${parent.head_tags()}
+
+%def>
+
<%def name="context_menu_items()">
% if request.has_perm('messages.create'):
${h.link_to("Send a new Message", url('messages.create'))}
@@ -10,12 +28,10 @@
${h.link_to("Back to Message Inbox", url('messages.inbox'))}
${h.link_to("Go to my Message Archive", url('messages.archive'))}
${h.link_to("Go to my Sent Messages", url('messages.sent'))}
- ${h.link_to("Move this Message to my Archive", url('messages.move', uuid=instance.uuid) + '?dest=archive')}
% else:
${h.link_to("Back to Message Archive", url('messages.archive'))}
${h.link_to("Go to my Message Inbox", url('messages.inbox'))}
${h.link_to("Go to my Sent Messages", url('messages.sent'))}
- ${h.link_to("Move this Message to my Inbox", url('messages.move', uuid=instance.uuid) + '?dest=inbox')}
% endif
% else:
${h.link_to("Back to Sent Messages", url('messages.sent'))}
@@ -24,11 +40,28 @@
% endif
%def>
+<%def name="message_tools()">
+ % if recipient:
+
+ % if recipient.status == rattail.enum.MESSAGE_STATUS_INBOX:
+ ${h.link_to("Move to Archive", url('messages.move', uuid=instance.uuid) + '?dest=archive', class_='button')}
+ % else:
+ ${h.link_to("Move to Inbox", url('messages.move', uuid=instance.uuid) + '?dest=inbox', class_='button')}
+ % endif
+
+ % endif
+%def>
+
+<%def name="message_body()">
+ ${instance.body}
+%def>
+
${parent.body()}
+${self.message_tools()}
+
+ ${self.message_body()}
+
-
-
-
-
+${self.message_tools()}