has_mailbox 1.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. data/Gemfile +4 -0
  2. data/README.rdoc +95 -0
  3. data/Rakefile +2 -0
  4. data/app/controllers/mailboxes_controller.rb +3 -0
  5. data/has_mailbox.gemspec +24 -0
  6. data/lib/generators/has_mailbox/install/install_generator.rb +33 -0
  7. data/lib/generators/has_mailbox/install/templates/README +26 -0
  8. data/lib/generators/has_mailbox/install/templates/jquery.tokeninput.js +718 -0
  9. data/lib/generators/has_mailbox/install/templates/mailboxes.css +147 -0
  10. data/lib/generators/has_mailbox/install/templates/mailboxes.js +28 -0
  11. data/lib/generators/has_mailbox/install/templates/token-input-facebook.css +122 -0
  12. data/lib/generators/has_mailbox/install/templates/views/_head.html.erb +19 -0
  13. data/lib/generators/has_mailbox/install/templates/views/_messages.html.erb +39 -0
  14. data/lib/generators/has_mailbox/install/templates/views/_tabs_panel.html.erb +11 -0
  15. data/lib/generators/has_mailbox/install/templates/views/index.html.erb +10 -0
  16. data/lib/generators/has_mailbox/install/templates/views/index.js.erb +1 -0
  17. data/lib/generators/has_mailbox/install/templates/views/new.html.erb +28 -0
  18. data/lib/generators/has_mailbox/install/templates/views/show.html.erb +35 -0
  19. data/lib/generators/has_mailbox/migration/migration_generator.rb +22 -0
  20. data/lib/generators/has_mailbox/migration/templates/create_message_copies_table.rb +17 -0
  21. data/lib/generators/has_mailbox/migration/templates/create_messages_table.rb +19 -0
  22. data/lib/has_mailbox.rb +14 -0
  23. data/lib/has_mailbox/controllers/method_helpers.rb +112 -0
  24. data/lib/has_mailbox/has_mailbox.rb +95 -0
  25. data/lib/has_mailbox/mailboxes/engine.rb +6 -0
  26. data/lib/has_mailbox/mailboxes/routing.rb +22 -0
  27. data/lib/has_mailbox/models/message.rb +52 -0
  28. data/lib/has_mailbox/models/message_copies.rb +30 -0
  29. data/lib/has_mailbox/version.rb +3 -0
  30. metadata +96 -0
@@ -0,0 +1,147 @@
1
+ /* CUSTOM
2
+ ---------------------------------------------------- */
3
+ .message { padding-left: 10px;}
4
+ .recipient_name { color: red; }
5
+
6
+ /* TABLE
7
+ ---------------------------------------------------- */
8
+ table { font-size: 0.9em; color: #333333; padding: 5px; margin-top: 5px;}
9
+ td { padding: 7px; text-align: left;}
10
+ th { font-size: 1em; color: #333333; text-align: left; background-color: #EBEBEB; padding: 7px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #999999;}
11
+ tr.alt { background-color: #EBEBEB; }
12
+ tr.unread { font-weight: bold;}
13
+ td a { color: #333333;}
14
+
15
+ /* ---------------------------------------
16
+ FORM ELEMENTS
17
+ ---------------------------------------- */
18
+
19
+ form label { font-size: 12px; color: #666666; margin-right: 10px; font-family: Tahoma, Arial, Verdana, sans-serif; font-variant: normal; text-transform: uppercase;
20
+ margin-top: 5px; margin-bottom: 5px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; }
21
+ form input.text { width: 35%; border: 1px solid #BFBFBF; font-size: 13px; color: #222; padding: 5px; vertical-align: middle; border-radius: 3px;
22
+ -webkit-border-radius: 3px; -moz-border-radius: 3px; margin-top: 5px; margin-right: 0px; margin-bottom: 8px; margin-left: 0px; }
23
+ form textarea { border: 1px solid #BFBFBF; font-size: 13px; color: #222; padding: 5px; vertical-align: middle; border-radius: 3px;
24
+ -webkit-border-radius: 3px; -moz-border-radius: 3px; margin-top: 5px; margin-right: 0px; margin-bottom: 8px; margin-left: 0px; }
25
+
26
+ form textarea.medium { width: 65%; height: 250px; }
27
+ form textarea.large { width: 98%; height: 400px; }
28
+ form input:focus, textarea:focus { border: 1px solid #999999;}
29
+ form input.text.date { width: 20%;}
30
+ form input.text.medium { width: 65%;}
31
+ form input.text.big { width: 95%;}
32
+ form input.radio,
33
+ form input.checkbox { vertical-align: middle;}
34
+
35
+ form input.file { width: 250px; height: 20px; background: #fefefe; border: 1px solid #bbb; border-right: 0; font-size: 13px; color: #333; padding: 4px; border-top-left-radius: 3px; border-bottom-left-radius: 3px;
36
+ -webkit-border-top-left-radius: 3px; -webkit-border-bottom-left-radius: 3px; -moz-border-radius-topleft: 3px; -moz-border-radius-bottomleft: 3px; }
37
+
38
+ form input.submit:hover, a.submit:hover { background-color: #333333; }
39
+ form input.submit, a.submit:link, a.submit:visited, a.submit:active, a.submit:hover
40
+ { text-transform: uppercase; text-decoration:none; color: #fff; }
41
+
42
+ form .select { padding: 2px; margin: 5px 5px 5px 0px;}
43
+
44
+ /* SUBMIT BUTTONS
45
+ ----------------------- */
46
+ form input.submit, a.submit {
47
+ line-height: 20px;
48
+ border: 0;
49
+ font-size: 9px;
50
+ font-weight: normal;
51
+ cursor: pointer;
52
+ vertical-align: middle;
53
+ background-color: #258cd1;
54
+ -webkit-border-radius: 3px;
55
+ -moz-border-radius: 3px;
56
+ border-radius: 3px;
57
+ height: 25px;
58
+ margin: 0px 7px 0px 0px;
59
+ padding: 5px 8px 5px 8px;
60
+ background-repeat: repeat-x;
61
+ }
62
+
63
+ /* Pagination: Style
64
+ ------------------------------- */
65
+ .pagination { border:0; margin:0; padding:0; font-size:11px; float:left; }
66
+ .pagination a { border:1px solid #CCC; margin-right:2px; color: #258cd1; }
67
+ .pagination .disabled { border:solid 1px #DEDEDE; color:#888888; display:block; float:left; font-weight:bold; margin-right:2px; padding:3px 4px; }
68
+ .pagination .next_page a,
69
+ .pagination .previous_page a { font-weight:bold; }
70
+ .pagination em { color:#FFFFFF; font-weight:bold; display:block; float:left; padding:4px 6px; margin-right:2px; background-color: #258cd1; }
71
+ .pagination a:link,
72
+ .pagination a:visited { color:#258cd1; display:block; float:left; padding:3px 6px; text-decoration:none; }
73
+ .pagination a:hover { border:1px solid #258cd1; }
74
+
75
+
76
+ /*
77
+ * jQuery UI CSS Framework
78
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
79
+ * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
80
+ */
81
+
82
+
83
+ /* Layout helpers
84
+ ----------------------------------*/
85
+ .ui-helper-hidden { display: none; }
86
+ .ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
87
+ .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
88
+ .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
89
+ .ui-helper-clearfix { display: inline-block; }
90
+ /* required comment for clearfix to work in Opera \*/
91
+ * html .ui-helper-clearfix { height:1%; }
92
+ .ui-helper-clearfix { display:block; }
93
+ /* end clearfix */
94
+ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
95
+
96
+ /* Component containers
97
+ ----------------------------------*/
98
+ .ui-widget { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }
99
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 1em; }
100
+ .ui-widget-content { border: 1px solid #e1e1e1; background-color: #ffffff; color: #333333; }
101
+ .ui-widget-content a { color: #333333; }
102
+ .ui-widget-header { border: 1px solid #258cd1; background-color: #258cd1; color: #ffffff; font-weight: bold; }
103
+ .ui-widget-header a { color: #ffffff; }
104
+
105
+ /* Interaction states
106
+ ----------------------------------*/
107
+ .ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #e1e1e1; background-color: #f6f6f6; font-weight: bold; color: #1c94c4; outline: none; }
108
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; outline: none; }
109
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #258cd1; background-color: #fdf5ce; font-weight: bold; color: #258cd1; outline: none; }
110
+ .ui-state-hover a, .ui-state-hover a:hover { color: #258cd1; text-decoration: none; outline: none; }
111
+ .ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #258cd1; background-color: #258cd1; font-weight: bold; color: #ffffff; outline: none; }
112
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; outline: none; text-decoration: none; }
113
+
114
+ /* Interaction Cues
115
+ ----------------------------------*/
116
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fed22f; background-color: #ffe45c; color: #363636; }
117
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; }
118
+ .ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background-color: #b81900; color: #ffffff; }
119
+ .ui-state-error a, .ui-widget-content .ui-state-error a { color: #ffffff; }
120
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #ffffff; }
121
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
122
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
123
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
124
+
125
+ /* Misc visuals
126
+ ----------------------------------*/
127
+
128
+ /* Corner radius */
129
+ .ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; }
130
+ .ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; }
131
+ .ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; }
132
+ .ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; }
133
+ .ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; }
134
+ .ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; }
135
+ .ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; }
136
+ .ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; }
137
+ .ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; }
138
+
139
+ .ui-tabs { padding: .2em; zoom: 1; }
140
+ .ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
141
+ .ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; }
142
+ .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }
143
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; }
144
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
145
+ .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
146
+ .ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
147
+ .ui-tabs .ui-tabs-hide { display: none !important; }
@@ -0,0 +1,28 @@
1
+ $(function() {
2
+ // Check all the checkboxes when the head one is selected
3
+ $(".checkall").live("click", function() {
4
+ $("input[type='checkbox']").attr('checked', $(this).is(':checked'));
5
+ });
6
+
7
+ // change current active tabs styles
8
+ $('.ui-state-default a').click(function(){
9
+ $('.ui-state-default').removeClass("ui-tabs-selected");
10
+ $('.ui-state-default').removeClass("ui-state-active");
11
+ $(this).parent().addClass("ui-tabs-selected");
12
+ $(this).parent().addClass("ui-state-active");
13
+ history.pushState(null, document.title, this.href);
14
+ });
15
+
16
+ // handle pagination through ajax
17
+ $("#tabs-messages .pagination a").live("click", function(e) {
18
+ $.getScript(this.href);
19
+ history.pushState(null, document.title, this.href);
20
+ e.preventDefault();
21
+ });
22
+
23
+ //bind window for postate
24
+ $(window).bind("popstate", function() {
25
+ $.getScript(location.href);
26
+ });
27
+
28
+ });
@@ -0,0 +1,122 @@
1
+ /* Example tokeninput style #2: Facebook style */
2
+ ul.token-input-list-facebook {
3
+ overflow: hidden;
4
+ height: auto !important;
5
+ height: 1%;
6
+ width: 400px;
7
+ border: 1px solid #8496ba;
8
+ cursor: text;
9
+ font-size: 12px;
10
+ font-family: Verdana;
11
+ min-height: 1px;
12
+ z-index: 999;
13
+ margin: 0;
14
+ padding: 0;
15
+ background-color: #fff;
16
+ list-style-type: none;
17
+ clear: left;
18
+ }
19
+
20
+ ul.token-input-list-facebook li input {
21
+ border: 0;
22
+ width: 100px;
23
+ padding: 3px 8px;
24
+ background-color: white;
25
+ margin: 2px 0;
26
+ -webkit-appearance: caret;
27
+ }
28
+
29
+ li.token-input-token-facebook {
30
+ overflow: hidden;
31
+ height: auto !important;
32
+ height: 15px;
33
+ margin: 3px;
34
+ padding: 1px 3px;
35
+ background-color: #eff2f7;
36
+ color: #000;
37
+ cursor: default;
38
+ border: 1px solid #ccd5e4;
39
+ font-size: 11px;
40
+ border-radius: 5px;
41
+ -moz-border-radius: 5px;
42
+ -webkit-border-radius: 5px;
43
+ float: left;
44
+ white-space: nowrap;
45
+ }
46
+
47
+ li.token-input-token-facebook p {
48
+ display: inline;
49
+ padding: 0;
50
+ margin: 0;
51
+ }
52
+
53
+ li.token-input-token-facebook span {
54
+ color: #a6b3cf;
55
+ margin-left: 5px;
56
+ font-weight: bold;
57
+ cursor: pointer;
58
+ }
59
+
60
+ li.token-input-selected-token-facebook {
61
+ background-color: #5670a6;
62
+ border: 1px solid #3b5998;
63
+ color: #fff;
64
+ }
65
+
66
+ li.token-input-input-token-facebook {
67
+ float: left;
68
+ margin: 0;
69
+ padding: 0;
70
+ list-style-type: none;
71
+ }
72
+
73
+ div.token-input-dropdown-facebook {
74
+ position: absolute;
75
+ width: 400px;
76
+ background-color: #fff;
77
+ overflow: hidden;
78
+ border-left: 1px solid #ccc;
79
+ border-right: 1px solid #ccc;
80
+ border-bottom: 1px solid #ccc;
81
+ cursor: default;
82
+ font-size: 11px;
83
+ font-family: Verdana;
84
+ z-index: 1;
85
+ }
86
+
87
+ div.token-input-dropdown-facebook p {
88
+ margin: 0;
89
+ padding: 5px;
90
+ font-weight: bold;
91
+ color: #777;
92
+ }
93
+
94
+ div.token-input-dropdown-facebook ul {
95
+ margin: 0;
96
+ padding: 0;
97
+ }
98
+
99
+ div.token-input-dropdown-facebook ul li {
100
+ background-color: #fff;
101
+ padding: 3px;
102
+ margin: 0;
103
+ list-style-type: none;
104
+ }
105
+
106
+ div.token-input-dropdown-facebook ul li.token-input-dropdown-item-facebook {
107
+ background-color: #fff;
108
+ }
109
+
110
+ div.token-input-dropdown-facebook ul li.token-input-dropdown-item2-facebook {
111
+ background-color: #fff;
112
+ }
113
+
114
+ div.token-input-dropdown-facebook ul li em {
115
+ font-weight: bold;
116
+ font-style: normal;
117
+ }
118
+
119
+ div.token-input-dropdown-facebook ul li.token-input-selected-dropdown-item-facebook {
120
+ background-color: #3b5998;
121
+ color: #fff;
122
+ }
@@ -0,0 +1,19 @@
1
+ <% content_for :head do %>
2
+ <%= stylesheet_link_tag "mailboxes" %>
3
+ <%= javascript_include_tag "mailboxes" %>
4
+
5
+ <% if controller.action_name == "new" -%>
6
+ <%= stylesheet_link_tag "token-input-facebook" %>
7
+ <%= javascript_include_tag "jquery.tokeninput" %>
8
+ <script type="text/javascript">
9
+
10
+ $(document).ready(function() {
11
+ $("#user_tokens").tokenInput("/mailbox/token.json", {
12
+ crossDomain: false,
13
+ theme: "facebook"
14
+ });
15
+ });
16
+
17
+ </script>
18
+ <% end -%>
19
+ <% end %>
@@ -0,0 +1,39 @@
1
+ <%= form_tag update_mailboxes_path, :method => :post, :remote => true do %>
2
+ <%= select_tag "option", options_for_select(@options) %>
3
+ <%= submit_tag "Apply to Selected", :class => "submit" %>
4
+ <%= hidden_field_tag :mailbox, @mailbox %>
5
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
6
+ <tbody>
7
+ <tr>
8
+ <th width="5%" scope="col"><input type="checkbox" class="checkall" id="checkbox" name="checkbox"></th>
9
+ <%- unless @mailbox == "outbox" -%>
10
+ <th width="20%" scope="col">From</th>
11
+ <%- else -%>
12
+ <th width="20%" scope="col">To</th>
13
+ <%- end -%>
14
+ <th width="55%" scope="col">Subject</th>
15
+ <th width="20%" scope="col">Date</th>
16
+ </tr>
17
+ <!-- check opened message first and then set alternate style -->
18
+ <%- x = 0 -%>
19
+ <%- for msg in @messages -%>
20
+ <tr class="<%= ( (@mailbox != "outbox") ? ( msg.read? ? "" : "unread " ) : "" ) + ( ((x += 1) % 2 == 0) ? "alt" : "") -%>">
21
+ <td scope="col"><%= check_box_tag "[messages][]", msg.id %></td>
22
+ <%- unless @mailbox == "outbox" -%>
23
+ <td scope="col"><%= msg.from.email %></td>
24
+ <%- else -%>
25
+ <td scope="col"><%= msg.to.email %></td>
26
+ <%- end -%>
27
+ <td scope="col"><%= link_to msg.subject, show_mailboxes_path(@mailbox,msg) %></td>
28
+ <td scope="col" title='<%= msg.created_at.strftime("%a, %b %d, %Y at %I:%M %p") %>'><%= msg.created_at.strftime( ((msg.created_at < 1.days.ago) ? "%b %d, %Y" : "%I:%M %p")) %></td>
29
+ </tr>
30
+ <%- end -%>
31
+ <tr>
32
+ <td colspan="4"><%= will_paginate @messages, :class => "pagination" %></td>
33
+ </tr>
34
+ </tbody>
35
+ </table>
36
+ <%- end -%>
37
+ <p>
38
+ <%= link_to "Compose New Message", new_mailboxes_path %>
39
+ </p>
@@ -0,0 +1,11 @@
1
+ <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all ui-sortable">
2
+ <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active">
3
+ <%= link_to "Inbox", box_mailboxes_path(:inbox), :remote => true %>
4
+ </li>
5
+ <li class="ui-state-default ui-corner-top">
6
+ <%= link_to "Outbox", box_mailboxes_path(:outbox), :remote => true %>
7
+ </li>
8
+ <li class="ui-state-default ui-corner-top">
9
+ <%= link_to "Trash", box_mailboxes_path(:trash), :remote => true %>
10
+ </li>
11
+ </ul>
@@ -0,0 +1,10 @@
1
+ <h2>Mailbox</h2>
2
+
3
+ <%= render "head" %>
4
+
5
+ <div class="ui-tabs ui-widget ui-widget-content ui-corner-all">
6
+ <%= render :partial => "tabs_panel" %>
7
+ <div id="tabs-messages" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
8
+ <%= render "messages" %>
9
+ </div>
10
+ </div>
@@ -0,0 +1 @@
1
+ $("#tabs-messages").html("<%= escape_javascript(render("messages")) %>");
@@ -0,0 +1,28 @@
1
+ <h2>Mailbox</h2>
2
+
3
+ <%= render "head" %>
4
+
5
+ <div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
6
+
7
+ <%= render :partial => "tabs_panel" %>
8
+
9
+ <div id="tabs-messages" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
10
+ <%= form_tag create_mailboxes_path, :method => :post do %>
11
+ <p>
12
+ <%= label_tag :user_tokens, "User :" %><br />
13
+ <%= text_field_tag :user_tokens, "", :class => "text small" %>
14
+ </p>
15
+ <p>
16
+ <%= label_tag :subject, "Subject :" %><br />
17
+ <%= text_field_tag :subject, "", :class => "text medium" %>
18
+ </p>
19
+ <p>
20
+ <%= label_tag :body, "Messages :" %><br />
21
+ <%= text_area_tag :body, "", :class => "medium" %>
22
+ </p>
23
+ <p>
24
+ <%= submit_tag "Send", :class => "submit" %>
25
+ </p>
26
+ <% end %>
27
+ </div>
28
+ </div>
@@ -0,0 +1,35 @@
1
+ <h2>Mailbox</h2>
2
+
3
+ <%= render "head" %>
4
+
5
+ <div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
6
+ <%= render :partial => "tabs_panel" %>
7
+ <div id="tabs-messages" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
8
+ <%= form_tag create_mailboxes_path, :method => :post do %>
9
+ <h3><%= @message.subject %></h3>
10
+ <div class="message ui-widget-content ui-corner-all">
11
+ <h5><%= raw @message_description %></h5>
12
+ <p><%= @message.body %></p>
13
+ </div>
14
+ <% unless params[:mailbox] == "outbox" %>
15
+ <p>
16
+ <%= label_tag :body, "Reply Message :" %><br />
17
+ <%= text_area_tag :body, "", :class => "medium" %>
18
+ </p>
19
+ <p>
20
+ <%= submit_tag "Reply", :class => "submit" %>
21
+ </p>
22
+ <%= hidden_field_tag :user_tokens, @user_tokens %>
23
+ <%= hidden_field_tag :subject, @message.subject %>
24
+ <% end -%>
25
+ <% end -%>
26
+ </div>
27
+ </div>
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+