devel
This commit is contained in:
parent
7879dd49a2
commit
da8d0e4389
|
@ -80,12 +80,15 @@ class MessagesController < ApplicationController
|
|||
|
||||
mail = Mail.new(imap_message)
|
||||
@plain_header = mail.header.to_s
|
||||
@from = mail.From.addrs
|
||||
@to = mail.To.addrs
|
||||
@cc = mail.Cc
|
||||
@bcc = mail.Bcc
|
||||
|
||||
|
||||
# FIXME missing fields
|
||||
@from = mail.From.addrs.presence
|
||||
@to = mail.To.addrs.presence
|
||||
@cc = mail.Cc.presence
|
||||
@bcc = mail.Bcc.presence
|
||||
#@subject = mail.Subject
|
||||
@date = mail.date
|
||||
@date = mail.date.presence
|
||||
|
||||
if mail.multipart? == true
|
||||
if not mail.text_part.nil?
|
||||
|
@ -169,7 +172,7 @@ class MessagesController < ApplicationController
|
|||
|
||||
def prepare_multi2_buttons
|
||||
@multi2_buttons = []
|
||||
@multi2_buttons << {:text => 'delete',:scope=>:message,:image => 'trash.png'}
|
||||
@multi2_buttons << {:text => 'trash',:scope=>:message,:image => 'trash.png'}
|
||||
@multi2_buttons << {:text => 'set_unread',:scope=>:message,:image => 'unseen.png'}
|
||||
@multi2_buttons << {:text => 'set_read',:scope=>:message,:image => 'seen.png'}
|
||||
end
|
||||
|
@ -183,7 +186,7 @@ class MessagesController < ApplicationController
|
|||
def prepare_multi3_buttons
|
||||
@multi3_buttons = []
|
||||
@multi3_buttons << {:text => 'show_header',:scope=>:show,:image => 'zoom.png'}
|
||||
@multi3_buttons << {:text => 'delete',:scope=>:show,:image => 'trash.png'}
|
||||
@multi3_buttons << {:text => 'trash',:scope=>:show,:image => 'trash.png'}
|
||||
@multi3_buttons << {:text => 'reply',:scope=>:show,:image => 'reply.png'}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -45,7 +45,7 @@ class MessagesOpsController < ApplicationController
|
|||
set_unread
|
||||
elsif params[:set_read]
|
||||
set_read
|
||||
elsif params[:delete]
|
||||
elsif params[:trash]
|
||||
trash
|
||||
elsif params[:copy]
|
||||
copy
|
||||
|
|
|
@ -11,7 +11,7 @@ module MessagesHelper
|
|||
end
|
||||
|
||||
def date_formatter(date)
|
||||
date.nil? ? t(:no_data) : date.strftime("%Y-%m-%d %H:%M")
|
||||
date.nil? ? t(:no_date,:scope=>:message) : date.strftime("%Y-%m-%d %H:%M")
|
||||
end
|
||||
|
||||
def address_formatter(addr,mode)
|
||||
|
|
|
@ -41,16 +41,23 @@ class Message < ActiveRecord::Base
|
|||
|
||||
mail = Mail.new(message.attr['RFC822.HEADER'])
|
||||
|
||||
mail.date.nil? ? date = nil : date = mail.date.to_s
|
||||
mail.From.nil? ? from = nil : from = mail.From.charseted
|
||||
mail.To.nil? ? to = nil : to = mail.To.charseted
|
||||
mail.Subject.nil? ? subject = nil : subject = mail.Subject.charseted
|
||||
|
||||
#logger.custom('mail',mail.inspect)
|
||||
|
||||
create(
|
||||
:user_id => user.id,
|
||||
:folder_id => folder.id,
|
||||
:msg_id => mail.message_id,
|
||||
:uid => message.attr['UID'].to_i,
|
||||
:from_addr => mail.From.charseted,
|
||||
:to_addr => mail.To.charseted,
|
||||
:subject => mail.Subject.charseted,
|
||||
:from_addr => from,
|
||||
:to_addr => to,
|
||||
:subject => subject,
|
||||
:content_type => mail.content_type,
|
||||
:date => mail.date.to_s(:db),
|
||||
:date => date,
|
||||
:unseen => !(message.attr['FLAGS'].member? :Seen),
|
||||
:size => message.attr['RFC822.SIZE']
|
||||
)
|
||||
|
|
|
@ -121,6 +121,8 @@ pl:
|
|||
delete: Usuń zaznaczone
|
||||
move: Przenieś
|
||||
copy: Skopiuj
|
||||
trash: Usuń zaznaczone
|
||||
no_date: Brak daty
|
||||
|
||||
compose:
|
||||
compose: Nowa wiadomość
|
||||
|
@ -143,6 +145,7 @@ pl:
|
|||
show_header: Pokaż nagłówek
|
||||
delete: Usuń
|
||||
reply_string: "Odp: "
|
||||
trash: Usuń
|
||||
|
||||
user:
|
||||
login_failure: Nieudane logowanie. Podano błędny e-mail lub hasło.
|
||||
|
|
|
@ -363,22 +363,22 @@ a.button:link, a.button:visited, a.button:hover, a.button:active, button.button
|
|||
line-height: 1.3em;
|
||||
font-weight:bold;
|
||||
cursor:pointer;
|
||||
padding:5px 10px 6px 7px;
|
||||
padding:2px 5px 3px 3px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
button.button {
|
||||
width:auto;
|
||||
overflow:visible;
|
||||
padding:4px 10px 3px 7px; /* IE6 */
|
||||
padding:2px 5px 1px 3px; /* IE6 */
|
||||
}
|
||||
button.button[type] {
|
||||
padding:5px 10px 5px 7px; /* Firefox */
|
||||
padding:2px 5px 2px 3px; /* Firefox */
|
||||
line-height:17px; /* Safari */
|
||||
}
|
||||
|
||||
*:first-child+html button.button[type] {
|
||||
padding:4px 10px 3px 7px; /* IE7 */
|
||||
padding:2px 5px 1px 3px; /* IE7 */
|
||||
}
|
||||
|
||||
button.button img, a.button img {
|
||||
|
|
|
@ -135,10 +135,10 @@ p {
|
|||
}
|
||||
|
||||
#sidebar ul li {
|
||||
border-bottom: 1px solid #F0F0EE;Załączniki burnet.tar.gz
|
||||
border-bottom: 1px solid #F0F0EE;
|
||||
}
|
||||
|
||||
#sidebar ul li a:hover, #sidebar ul li a:active {Załączniki burnet.tar.gz
|
||||
#sidebar ul li a:hover, #sidebar ul li a:active {
|
||||
background: #ADBFD6;
|
||||
color: #FFF;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="block">
|
||||
<h3><%=t(:folders,:scope=>:folder) %> <%= link_to t(:refresh), folders_refresh_status_path, :class=>'minor' %></h3>
|
||||
<h3><%=t(:folders,:scope=>:folder) %></h3>
|
||||
<div class="content">
|
||||
<% if @folders_shown.nil? or @folders_shown.size.zero? %>
|
||||
<p><%= t(:no_shown,:scope=>:folder) %> <%= link_to t(:folders,:scope=>:folder), folders_path %></p>
|
||||
|
|
Loading…
Reference in a new issue