folder list sidebar for compose, prefenses and filsters pages

This commit is contained in:
Eugene Korbut 2009-02-08 05:01:59 +10:00
parent 0199223976
commit c1cd42fc5f
7 changed files with 26 additions and 15 deletions

View file

@ -350,7 +350,7 @@ class WebmailController < ApplicationController
end end
def load_imap_session def load_imap_session
return if ['compose', 'prefs', 'error_connection'].include?(action_name) return if ['error_connection'].include?(action_name)
get_imap_session get_imap_session
end end
@ -375,7 +375,7 @@ class WebmailController < ApplicationController
def have_to_load_folders? def have_to_load_folders?
return true if ['messages', 'delete', 'reply', 'forward', 'empty', 'message', 'download', return true if ['messages', 'delete', 'reply', 'forward', 'empty', 'message', 'download',
'filter', 'filter_add', 'view_source'].include?(action_name) 'filter', 'filter_add', 'view_source', 'compose', 'prefs', 'filters'].include?(action_name)
return false return false
end end

View file

@ -15,9 +15,9 @@
<div id="wholepage"> <div id="wholepage">
<div id="container"> <div id="container">
<div id="sidebar_outer"> <div id="sidebar_outer">
<div id="sidebar"><%= @content_for_sidebar %></div> <div id="sidebar"><%= yield :sidebar %></div>
</div> </div>
<div id="content"><%= @content_for_layout %></div> <div id="content"><%= yield %></div>
<br class="clear"/> <br class="clear"/>
</div> </div>
</div> </div>

View file

@ -0,0 +1,10 @@
<div id="folders">
<h4><%=_('Folders')%><br/><%=link_manage_folders%></h4>
<hr/>
<ul> <% for folder in @folders %>
<li><%=folder_link(folder)%></li> <% end %>
</ul>
</div>
<div style="text-align: center; padding: 10px;">
<input type="button" value="<%= _('Logout')%>" onclick="window.location='/login/logout'">
</div>

View file

@ -1,3 +1,7 @@
<% content_for('sidebar') { %>
<%= render :partial => 'shared/folders' %>
<% } %>
<h1><%=_('Mailbox')%></h1> <h1><%=_('Mailbox')%></h1>
<form name="composeMail" id='composeMail' action="/webmail/compose" enctype="multipart/form-data" method="post"> <form name="composeMail" id='composeMail' action="/webmail/compose" enctype="multipart/form-data" method="post">
<div id="header"> <div id="header">

View file

@ -1,3 +1,6 @@
<% content_for('sidebar') { %>
<%= render :partial => 'shared/folders' %>
<% } %>
<h1><%=_('Mailbox')%></h1> <h1><%=_('Mailbox')%></h1>
<div id="header"> <div id="header">
<ul id="primary"> <ul id="primary">

View file

@ -15,17 +15,8 @@
<div id="tab_main"> <div id="tab_main">
<div id="tab_content"> <div id="tab_content">
<% content_for('sidebar') { %> <% content_for('sidebar') { %>
<div id="folders"> <%= render :partial => 'shared/folders' %>
<h4><%=_('Folders')%><br/><%=link_manage_folders%></h4>
<hr/>
<ul> <% for folder in @folders %>
<li><%=folder_link(folder)%></li> <% end %>
</ul>
</div>
<div style="text-align: center; padding: 10px;">
<input type="button" value="<%= _('Logout')%>" onclick="window.location='/login/logout'">
</div>
<% } %> <% } %>
<div id="messages"> <div id="messages">

View file

@ -1,3 +1,6 @@
<% content_for('sidebar') { %>
<%= render :partial => 'shared/folders' %>
<% } %>
<h1><%=_('Mailbox')%></h1> <h1><%=_('Mailbox')%></h1>
<div id="header"> <div id="header">
<ul id="primary"> <ul id="primary">