devel
|
@ -108,13 +108,22 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
def prepare_compose_buttons
|
||||
@buttons = []
|
||||
@buttons << {:text => 'send',:image => 'tick.png'}
|
||||
@buttons << {:text => 'save_as_draft',:image => 'tick.png'}
|
||||
@buttons << {:text => 'send',:scope=>:compose,:image => 'email.png'}
|
||||
@buttons << {:text => 'save_as_draft',:scope=>:compose,:image => 'save.png'}
|
||||
end
|
||||
|
||||
##################################### protected section ########################################
|
||||
|
||||
protected
|
||||
def create_message_with_params
|
||||
@message = Message.new
|
||||
if params[:message]
|
||||
@message.update_attributes(params[:message])
|
||||
end
|
||||
files = Dir.glob(File.join($defaults["msg_upload_dir"],@current_user.username + "*"))
|
||||
@attachments = []
|
||||
files.each do |f|
|
||||
@attachments << {:name => File.basename(f).gsub!(/#{@current_user.username}_/,"") , :size => File.stat(f).size }
|
||||
end
|
||||
logger.custom('a',@attachments.inspect)
|
||||
end
|
||||
|
||||
def get_system_folders
|
||||
@drafts_folder = @current_user.folders.drafts.first
|
||||
|
@ -128,8 +137,8 @@ class ApplicationController < ActionController::Base
|
|||
private
|
||||
|
||||
def plugins_configuration
|
||||
WillPaginate::ViewHelpers.pagination_options[:previous_label] = t(:previous_page)
|
||||
WillPaginate::ViewHelpers.pagination_options[:next_label] = t(:next_page)
|
||||
WillPaginate::ViewHelpers.pagination_options[:previous_label] = t(:previous_page,:scope=>:common)
|
||||
WillPaginate::ViewHelpers.pagination_options[:next_label] = t(:next_page,:scope=>:common)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -4,6 +4,8 @@ class ContactsController < ApplicationController
|
|||
|
||||
before_filter :get_contacts, :only => [:index]
|
||||
|
||||
before_filter :prepare_ops_buttons, :only => [:index]
|
||||
|
||||
theme :theme_resolver
|
||||
|
||||
def index
|
||||
|
@ -11,14 +13,18 @@ class ContactsController < ApplicationController
|
|||
end
|
||||
|
||||
def ops
|
||||
if params["create_new"]
|
||||
redirect_to(new_contact_path)
|
||||
return
|
||||
end
|
||||
if !params["cids"]
|
||||
flash[:warning] = t(:no_selected,:scope=>:contact)
|
||||
else
|
||||
if params["delete"]
|
||||
if params["delete_selected"]
|
||||
params["cids"].each do |id|
|
||||
@current_user.contacts.find_by_id(id).destroy
|
||||
end
|
||||
elsif params["compose"]
|
||||
elsif params["compose_to_selected"]
|
||||
redirect_to :controller=>'messages',:action=>'compose',:cids=>params["cids"]
|
||||
return
|
||||
end
|
||||
|
@ -61,6 +67,17 @@ class ContactsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
####################################### protected section ################################
|
||||
|
||||
protected
|
||||
|
||||
def prepare_ops_buttons
|
||||
@buttons = []
|
||||
@buttons << {:text => 'compose_to_selected',:scope=> 'contact', :image => 'email.png'}
|
||||
@buttons << {:text => 'create_new',:scope=> 'contact', :image => 'plus.png'}
|
||||
@buttons << {:text => 'delete_selected',:scope=>'contact',:image => 'minus.png'}
|
||||
end
|
||||
|
||||
####################################### private section ##################################
|
||||
|
||||
private
|
||||
|
|
2
app/controllers/events_controller.rb
Executable file
|
@ -0,0 +1,2 @@
|
|||
class EventsController < ApplicationController
|
||||
end
|
|
@ -17,8 +17,8 @@ class FoldersController < ApplicationController
|
|||
|
||||
def index
|
||||
@buttons = []
|
||||
@buttons << {:text => 'show_hide',:image => 'tick.png'}
|
||||
@buttons << {:text => 'refresh',:image => 'tick.png'}
|
||||
@buttons << {:text => 'show_hide',:scope=>'folder',:image => 'flag.png'}
|
||||
@buttons << {:text => 'refresh',:scope=>'folder',:image => 'refresh.png'}
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
@ -12,15 +12,13 @@ class MessagesController < ApplicationController
|
|||
include MessagesHelper
|
||||
|
||||
before_filter :check_current_user ,:selected_folder,:get_current_folders
|
||||
|
||||
before_filter :open_imap_session, :select_imap_folder
|
||||
|
||||
before_filter :prepare_compose_buttons, :only => [:compose]
|
||||
|
||||
#before_filter :mail_defaults, :only => [:sendout_or_save]
|
||||
|
||||
before_filter :get_system_folders, :only => [:index]
|
||||
|
||||
before_filter :create_message_with_params, :only => [:compose]
|
||||
before_filter :prepare_multi1_buttons, :only => [:index,:show]
|
||||
before_filter :prepare_multi2_buttons, :only => [:index]
|
||||
before_filter :prepare_multi3_buttons, :only => [:show]
|
||||
after_filter :close_imap_session
|
||||
|
||||
theme :theme_resolver
|
||||
|
@ -67,10 +65,7 @@ class MessagesController < ApplicationController
|
|||
end
|
||||
|
||||
def compose
|
||||
@message = Message.new
|
||||
if params[:message]
|
||||
@message = update_attributes(params[:message])
|
||||
end
|
||||
#before_filter
|
||||
end
|
||||
|
||||
def show
|
||||
|
@ -89,7 +84,7 @@ class MessagesController < ApplicationController
|
|||
@to = mail.To.addrs
|
||||
@cc = mail.Cc
|
||||
@bcc = mail.Bcc
|
||||
@subject = mail.Subject
|
||||
#@subject = mail.Subject
|
||||
@date = mail.date
|
||||
|
||||
if mail.multipart? == true
|
||||
|
@ -118,7 +113,7 @@ class MessagesController < ApplicationController
|
|||
part.parent_id = @message.uid
|
||||
if part.isText?
|
||||
@text_part = part.decoded_and_charseted
|
||||
elsif part.isImage?
|
||||
elsif part.isImage? and @current_user.prefs.msg_image_view_as.to_sym == :thumbnail
|
||||
@images << part
|
||||
elsif part.isHtml?
|
||||
@html_part = part.decoded_and_charseted
|
||||
|
@ -136,8 +131,18 @@ class MessagesController < ApplicationController
|
|||
else
|
||||
@body = mail.decoded_and_charseted
|
||||
end
|
||||
|
||||
if @body.nil?
|
||||
@body = t(:no_body,:scope=>:message)
|
||||
else
|
||||
if @body=~/cid:([\w@\.]+)/
|
||||
attachments = mail.attachments
|
||||
if not attachments.size.zero?
|
||||
for idx in 0..attachments.size - 1
|
||||
@body.gsub!(/cid:#{attachments[idx].cid}/,messages_attachment_download_path(message.uid,idx))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
render 'html_body',:layout => 'html_body'
|
||||
end
|
||||
|
@ -157,8 +162,28 @@ class MessagesController < ApplicationController
|
|||
render :text => a.decoded
|
||||
end
|
||||
|
||||
|
||||
############################################# protected section ##########################################
|
||||
|
||||
protected
|
||||
|
||||
def prepare_multi2_buttons
|
||||
@multi2_buttons = []
|
||||
@multi2_buttons << {:text => 'delete',: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
|
||||
|
||||
def prepare_multi1_buttons
|
||||
@multi1_buttons = []
|
||||
@multi1_buttons << {:text => 'copy',:scope=>:message,:image => 'copy.png'}
|
||||
@multi1_buttons << {:text => 'move',:scope=>:message,:image => 'move.png'}
|
||||
end
|
||||
|
||||
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 => 'reply',:scope=>:show,:image => 'reply.png'}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,6 +14,7 @@ class MessagesOpsController < ApplicationController
|
|||
before_filter :open_imap_session, :select_imap_folder
|
||||
before_filter :prepare_compose_buttons
|
||||
before_filter :get_system_folders, :only => [:sendout_or_save,:single,:multi]
|
||||
before_filter :create_message_with_params , :only => [:sendout_or_save]
|
||||
after_filter :close_imap_session
|
||||
theme :theme_resolver
|
||||
|
||||
|
@ -26,6 +27,10 @@ class MessagesOpsController < ApplicationController
|
|||
return
|
||||
elsif params[:trash]
|
||||
trash
|
||||
elsif params[:move]
|
||||
move
|
||||
elsif params[:copy]
|
||||
copy
|
||||
end
|
||||
redirect_to :controller => 'messages', :action => 'index'
|
||||
end
|
||||
|
@ -40,7 +45,7 @@ class MessagesOpsController < ApplicationController
|
|||
set_unread
|
||||
elsif params[:set_read]
|
||||
set_read
|
||||
elsif params[:trash]
|
||||
elsif params[:delete]
|
||||
trash
|
||||
elsif params[:copy]
|
||||
copy
|
||||
|
@ -53,6 +58,9 @@ class MessagesOpsController < ApplicationController
|
|||
redirect_to :controller => 'messages', :action => 'index'
|
||||
end
|
||||
|
||||
############################################### ################################################
|
||||
|
||||
|
||||
def set_unread
|
||||
params["uids"].each do |uid|
|
||||
@mailbox.set_unread(uid)
|
||||
|
@ -115,26 +123,76 @@ class MessagesOpsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def upload
|
||||
name = params[:upload][:datafile].original_filename
|
||||
upload_dir = $defaults["msg_upload_dir"]
|
||||
path = File.join(upload_dir, @current_user.username + "_" + name)
|
||||
File.open(path, "wb") { |f| f.write(params[:upload][:datafile].read) }
|
||||
create_message_with_params
|
||||
render 'messages/compose'
|
||||
end
|
||||
|
||||
# Files uploaded from Internet Explorer:
|
||||
#
|
||||
#Internet Explorer includes the entire path of a file in the filename sent, so the original_filename routine will return something like:
|
||||
#
|
||||
#C:\Documents and Files\user_name\Pictures\My File.jpg
|
||||
#
|
||||
#instead of just:
|
||||
#
|
||||
#My File.jpg
|
||||
#
|
||||
#This is easily handled by File.basename, which strips out everything before the filename.
|
||||
#
|
||||
#def sanitize_filename(file_name)
|
||||
# # get only the filename, not the whole path (from IE)
|
||||
# just_filename = File.basename(file_name)
|
||||
# # replace all none alphanumeric, underscore or perioids
|
||||
# # with underscore
|
||||
# just_filename.sub(/[^\w\.\-]/,'_')
|
||||
#end
|
||||
#
|
||||
#Deleting an existing File:
|
||||
#
|
||||
#If you want to delete any existing file then its simple and need to write following code:
|
||||
#
|
||||
# def cleanup
|
||||
# File.delete("#{RAILS_ROOT}/dirname/#{@filename}")
|
||||
# if File.exist?("#{RAILS_ROOT}/dirname/#{@filename}")
|
||||
# end
|
||||
|
||||
|
||||
############################################### sendout_or_save ############################
|
||||
|
||||
def sendout_or_save
|
||||
|
||||
if params[:delete_marked] and params[:files]
|
||||
params[:files].each do |filename|
|
||||
path = File.join(Rails.root,$defaults["msg_upload_dir"],@current_user.username + "_" +filename)
|
||||
File.delete(path) if File.exist?(path)
|
||||
end
|
||||
create_message_with_params
|
||||
render 'messages/compose'
|
||||
return
|
||||
end
|
||||
|
||||
mail = Mail.new
|
||||
mail.subject = params[:message][:subject]
|
||||
mail.from = @current_user.full_address
|
||||
mail.to = params[:message][:to_addr]
|
||||
mail.body = params[:message][:body]
|
||||
#mail.add_file :filename => 'somefile.png', :content => File.read('/tmp/script_monitor_20110810143216.log')
|
||||
|
||||
attachments = Dir.glob(File.join($defaults["msg_upload_dir"],@current_user.username + "*"))
|
||||
logger.custom('attach',attachments.inspect)
|
||||
attachments.each do |a|
|
||||
mail.add_file :filename => File.basename(a.gsub(/#{@current_user.username}_/,"")), :content => File.read(a)
|
||||
end
|
||||
|
||||
if params[:send]
|
||||
smtp_server = @current_user.servers.primary_for_smtp
|
||||
|
||||
if smtp_server.nil?
|
||||
flash[:error] = t(:not_configured_smtp,:scope => :compose)
|
||||
@message = Message.new
|
||||
if params[:message]
|
||||
@message = update_attributes(params[:message])
|
||||
end
|
||||
render 'messages/compose'
|
||||
return
|
||||
end
|
||||
|
@ -157,6 +215,12 @@ class MessagesOpsController < ApplicationController
|
|||
redirect_to :controller => 'messages', :action => 'index'
|
||||
return
|
||||
end
|
||||
|
||||
attachments.each do |filename|
|
||||
path = File.join(Rails.root,filename)
|
||||
File.delete(path) if File.exist?(path)
|
||||
end
|
||||
|
||||
flash[:notice] = t(:was_sent,:scope => :compose)
|
||||
redirect_to :controller => 'messages', :action => 'index'
|
||||
elsif params[:save_as_draft]
|
||||
|
@ -194,6 +258,7 @@ class MessagesOpsController < ApplicationController
|
|||
else
|
||||
@message.body = mail.decoded_and_charseted
|
||||
end
|
||||
@attachments = []
|
||||
render 'messages/compose'
|
||||
end
|
||||
|
||||
|
@ -201,15 +266,16 @@ class MessagesOpsController < ApplicationController
|
|||
old_message = @current_user.messages.find(params[:uids].first)
|
||||
@message = Message.new
|
||||
@message.to_addr = address_formatter(old_message.from_addr,:raw)
|
||||
@message.subject = old_message.subject
|
||||
@message.subject = t(:reply_string,:scope=>:show) + old_message.subject
|
||||
|
||||
imap_message = @mailbox.fetch_body(old_message.uid)
|
||||
mail = Mail.new(imap_message)
|
||||
if mail.multipart?
|
||||
@message.body = mail.text_part.decoded_and_charseted
|
||||
else
|
||||
@message.body = mail.decoded_and_charseted
|
||||
@message.body = mail.decoded_and_charseted.gsub(/<\/?[^>]*>/, "")
|
||||
end
|
||||
@attachments = []
|
||||
render 'messages/compose'
|
||||
end
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ class PrefsController < ApplicationController
|
|||
if params[:prefs]
|
||||
@prefs.update_attributes(params[:prefs])
|
||||
end
|
||||
flash[:notice] = t(:were_saved,:scope=>:prefs)
|
||||
redirect_to :action => 'look'
|
||||
end
|
||||
|
||||
|
|
|
@ -92,6 +92,67 @@ def form_button(text,image)
|
|||
html << "</button></div>"
|
||||
end
|
||||
|
||||
def single_action(text,scope,image)
|
||||
html = ""
|
||||
html << "<div class=\"actiongroup wat-cf\">"
|
||||
html << "<button class=\"button\" name=\"#{text}\" type=\"submit\">"
|
||||
html << "<img src=\""
|
||||
html << current_theme_image_path(image)
|
||||
html << "\" alt=\""
|
||||
html << t(text.to_sym, :scope => scope.to_sym)
|
||||
html << "\" />"
|
||||
html << t(text.to_sym, :scope => scope.to_sym)
|
||||
html << "</button></div>"
|
||||
end
|
||||
|
||||
def single_action_onclick(text,scope,image,onclick)
|
||||
html = ""
|
||||
html << "<div class=\"actiongroup navform wat-cf\">"
|
||||
html << "<button class=\"button\" type=\"submit\" onclick=\"window.location='"
|
||||
html << onclick
|
||||
html << "'\">"
|
||||
html << "<img src=\""
|
||||
html << current_theme_image_path(image)
|
||||
html << "\" alt=\""
|
||||
html << t(text.to_sym, :scope => scope.to_sym)
|
||||
html << "\" />"
|
||||
html << t(text.to_sym, :scope => scope.to_sym)
|
||||
html << "</button></div>"
|
||||
end
|
||||
|
||||
def group_action(buttons)
|
||||
html = ""
|
||||
html << "<div class=\"actiongroup navform wat-cf\">"
|
||||
buttons.each do |b|
|
||||
html << "<button class=\"button\" type=\"submit\" name=\"#{b[:text]}\">"
|
||||
html << "<img src=\""
|
||||
html << current_theme_image_path(b[:image])
|
||||
html << "\" alt=\""
|
||||
html << t(b[:text].to_sym,:scope=>b[:scope].to_sym)
|
||||
html << "\" />"
|
||||
html << t(b[:text].to_sym,:scope=>b[:scope].to_sym)
|
||||
html << "</button> "
|
||||
end
|
||||
html << "</div>"
|
||||
end
|
||||
|
||||
def group_action_text(buttons,text)
|
||||
html = ""
|
||||
html << "<div class=\"group navform wat-cf\">"
|
||||
buttons.each do |b|
|
||||
html << "<button class=\"button\" type=\"submit\" name=\"#{b[:text]}\">"
|
||||
html << "<img src=\""
|
||||
html << current_theme_image_path(b[:image])
|
||||
html << "\" alt=\""
|
||||
html << t(b[:text].to_sym,:scope=>b[:scope].to_sym)
|
||||
html << "\" />"
|
||||
html << t(b[:text].to_sym,:scope=>b[:scope].to_sym)
|
||||
html << "</button> "
|
||||
end
|
||||
html << text
|
||||
html << "</div>"
|
||||
end
|
||||
|
||||
def form_buttons(buttons)
|
||||
html = ""
|
||||
html << "<div class=\"group navform wat-cf\">"
|
||||
|
@ -150,6 +211,19 @@ def select_field_table(object,field,table_choices,choice,blank)
|
|||
html << "</div>"
|
||||
end
|
||||
|
||||
def select_field_table_t(object,field,table_choices,choice,blank)
|
||||
model_name = eval(object.class.model_name)
|
||||
html = ""
|
||||
html << "<div class=\"param_group\">"
|
||||
html << "<label class=\"label\">#{model_name.human_attribute_name(field)}</label>"
|
||||
t = []
|
||||
table_choices.each do |c|
|
||||
t << [t(c.to_sym,:scope=>:prefs),c.to_s]
|
||||
end
|
||||
html << select(object.class.to_s.downcase, field, options_for_select(t,choice), {:include_blank => blank})
|
||||
html << "</div>"
|
||||
end
|
||||
|
||||
#def form_simle_field(name,label,value)
|
||||
# html = ""
|
||||
# html << "<div class=\"group\">"
|
||||
|
@ -158,56 +232,45 @@ end
|
|||
# html << "</div>"
|
||||
#end
|
||||
|
||||
def nav_to_folders
|
||||
link_to( t(:folders,:scope=>:folder), :controller=>:folders, :action=>:index )
|
||||
end
|
||||
|
||||
def nav_to_messages
|
||||
link_to( t(:messages,:scope=>:message), :controller=>:messages, :action=>:index )
|
||||
end
|
||||
|
||||
def nav_to_compose
|
||||
link_to( t(:compose,:scope=>:compose), :controller=>:messages, :action=>:compose )
|
||||
end
|
||||
|
||||
def nav_to_contacts
|
||||
link_to( t(:contacts,:scope=>:contact), contacts_path )
|
||||
end
|
||||
|
||||
def nav_to_prefs
|
||||
link_to( t(:prefs,:scope=>:prefs), prefs_look_path )
|
||||
end
|
||||
#def nav_to_folders
|
||||
# link_to( t(:folders,:scope=>:folder), :controller=>:folders, :action=>:index )
|
||||
#end
|
||||
#
|
||||
#def nav_to_messages
|
||||
# link_to( t(:messages,:scope=>:message), :controller=>:messages, :action=>:index )
|
||||
#end
|
||||
#
|
||||
#def nav_to_compose
|
||||
# link_to( t(:compose,:scope=>:compose), :controller=>:messages, :action=>:compose )
|
||||
#end
|
||||
#
|
||||
#def nav_to_contacts
|
||||
# link_to( t(:contacts,:scope=>:contact), contacts_path )
|
||||
#end
|
||||
#
|
||||
#def nav_to_prefs
|
||||
# link_to( t(:prefs,:scope=>:prefs), prefs_look_path )
|
||||
#end
|
||||
|
||||
def main_navigation(active)
|
||||
instance_variable_set("@#{active}", "active")
|
||||
s = ""
|
||||
s += "<ul class=\"wat-cf\">"
|
||||
active == :messages ? s += "<li class=\"first active\">#{nav_to_messages}</li>" : s += "<li class=\"first\">#{nav_to_messages}</li>"
|
||||
active == :compose ? s += "<li class=\"active\">#{nav_to_compose}</li>" : s += "<li>#{nav_to_compose}</li>"
|
||||
active == :folders ? s += "<li class=\" active\">#{nav_to_folders}</li>" : s += "<li class=\"first\">#{nav_to_folders}</li>"
|
||||
active == :contacts ? s += "<li class=\"active\">#{nav_to_contacts}</li>" : s += "<li>#{nav_to_contacts}</li>"
|
||||
active == :prefs ? s += "<li class=\"active\">#{nav_to_prefs}</li>" : s += "<li>#{nav_to_prefs}</li>"
|
||||
# active == :filters ? s += "<li class=\"active\">#{link_mail_filters}</li>" : s += "<li>#{link_mail_filters}</li>"
|
||||
|
||||
s += "<li class=\"first #{@messages_tab}\">#{link_to( t(:messages,:scope=>:message), messages_path )}</li>"
|
||||
s += "<li class=\"#{@compose_tab}\">#{link_to( t(:compose,:scope=>:compose), compose_path )}</li>"
|
||||
s += "<li class=\"#{@folders_tab}\">#{link_to( t(:folders,:scope=>:folder), folders_path )}</li>"
|
||||
s += "<li class=\"#{@contacts_tab}\">#{link_to( t(:contacts,:scope=>:contact), contacts_path )}</li>"
|
||||
s += "<li class=\"last #{@prefs_tab}\">#{link_to( t(:prefs,:scope=>:prefs), prefs_look_path )}</li>"
|
||||
s += "</ul>"
|
||||
end
|
||||
|
||||
def prefs_navigation(active)
|
||||
look_active = ""
|
||||
identity_active = ""
|
||||
servers_active = ""
|
||||
case active
|
||||
when :look
|
||||
look_active = "active"
|
||||
when :identity
|
||||
identity_active ="active"
|
||||
when :servers
|
||||
servers_active ="active"
|
||||
end
|
||||
instance_variable_set("@#{active}", "active")
|
||||
s = ""
|
||||
s += "<ul class=\"wat-cf\">"
|
||||
s += "<li class=\"first #{look_active}\">#{link_to( t(:look,:scope=>:prefs), prefs_look_path )}</li>"
|
||||
s += "<li class=\"#{identity_active}\">#{link_to( t(:identity,:scope=>:prefs), prefs_identity_path )}</li>"
|
||||
s += "<li class=\"last #{servers_active}\">#{link_to( t(:servers,:scope=>:prefs), prefs_servers_path )}</li>"
|
||||
s += "<li class=\"first #{@look_tab}\">#{link_to( t(:look,:scope=>:prefs), prefs_look_path )}</li>"
|
||||
s += "<li class=\"#{@identity_tab}\">#{link_to( t(:identity,:scope=>:prefs), prefs_identity_path )}</li>"
|
||||
s += "<li class=\"last #{@servers_tab}\">#{link_to( t(:servers,:scope=>:prefs), prefs_servers_path )}</li>"
|
||||
s += "</ul>"
|
||||
end
|
||||
|
||||
|
@ -246,5 +309,12 @@ def force_charset(text)
|
|||
end
|
||||
end
|
||||
|
||||
def content_for_sidebar
|
||||
s = render :partial => 'folders/list'
|
||||
s += render :partial => 'events/calendar'
|
||||
s += render :partial => 'internal/version'
|
||||
s
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
55
app/helpers/events_helper.rb
Executable file
|
@ -0,0 +1,55 @@
|
|||
module EventsHelper
|
||||
#DAYNAMES = [:mon, :tue, :wed, :thu, :fri, :sat, :sun]
|
||||
def calendar(yeard,monthd,addMonths)
|
||||
now = DateTime.now
|
||||
first = Date.new(now.year,now.month,1)
|
||||
last = Date.new(now.year,now.month,-1)
|
||||
curr_week = first.cweek
|
||||
html = "<h3>"
|
||||
html << t(:month_names,:scope=>:date)[now.month]
|
||||
html << "</h3><div class=\"content\">"
|
||||
html << "<table class=\"side_calendar width100\">"
|
||||
html << "<tr><td></td>"
|
||||
|
||||
1.upto(6) do |i|
|
||||
html << "<td class=\"wday\">#{t(:abbr_day_names,:scope=>:date)[i]}</td>"
|
||||
end
|
||||
html << "<td class=\"wday\">#{t(:abbr_day_names,:scope=>:date)[0]}</td>"
|
||||
html << "</tr>"
|
||||
html << "<tr>"
|
||||
html << "<td class=\"week\">#{first.cweek}</td>"
|
||||
|
||||
(first.wday-1).downto(1) do |i|
|
||||
prev = first - i
|
||||
html << "<td class=\"off\">#{prev.day}</td>"
|
||||
end
|
||||
|
||||
(first.day).upto(last.day) do |i|
|
||||
curr = Date.new(now.year,now.month,i)
|
||||
if curr.wday == 1
|
||||
html << "</tr>"
|
||||
html << "<tr>"
|
||||
curr_week += 1
|
||||
html << "<td class=\"week\">#{curr_week}</td>"
|
||||
end
|
||||
if now.day == i
|
||||
html << "<td class=\"today\">#{i}</td>"
|
||||
else
|
||||
if curr.wday == 0 || curr.wday == 6
|
||||
html << "<td class=\"weekend\">#{i}</td>"
|
||||
else
|
||||
html << "<td>#{i}</td>"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
1.upto(7-last.wday) do |i|
|
||||
post = last + i
|
||||
html << "<td class=\"off\">#{post.day}</td>"
|
||||
end
|
||||
|
||||
html << "</tr>"
|
||||
html << "</table></div>"
|
||||
html
|
||||
end
|
||||
end
|
|
@ -2,11 +2,11 @@ module MessagesHelper
|
|||
|
||||
def size_formatter(size)
|
||||
if size <= 2**10
|
||||
"#{size} #{t(:bytes)}"
|
||||
"#{size} #{t(:bytes,:scope=>:common)}"
|
||||
elsif size <= 2**20
|
||||
sprintf("%.1f #{t(:kbytes)}",size.to_f/2**10)
|
||||
sprintf("%.1f #{t(:kbytes,:scope=>:common)}",size.to_f/2**10)
|
||||
else
|
||||
sprintf("%.1f #{t(:mbytes)}",size.to_f/2**20)
|
||||
sprintf("%.1f #{t(:mbytes,:scope=>:common)}",size.to_f/2**20)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -15,51 +15,57 @@ module MessagesHelper
|
|||
end
|
||||
|
||||
def address_formatter(addr,mode)
|
||||
|
||||
s = ""
|
||||
length = $defaults["msg_address_length"].to_i
|
||||
fs = addr.split(/</)
|
||||
|
||||
if not fs.size.zero?
|
||||
case mode
|
||||
when :index
|
||||
fs = addr.gsub(/\"/,"").split(/</)
|
||||
fs[0].size.zero? ? s = fs[1] : s = fs[0]
|
||||
s.length >= length ? s = s[0,length]+"..." : s
|
||||
return h(s)
|
||||
when :message
|
||||
fs[0].size.zero? ? s = "<" + fs[1] + ">" : s << fs[0] + " <" + fs[1] + ">"
|
||||
return h(s)
|
||||
when :show
|
||||
addr = addr[0].charseted.gsub(/\"/,"")
|
||||
return h(addr)
|
||||
when :raw
|
||||
fs[0].size.zero? ? s = fs[1] : s << fs[0] + " <" + fs[1] + ">"
|
||||
return s
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def show_addr_formatter(addrs)
|
||||
return h(force_charset(addrs[0].decoded))
|
||||
end
|
||||
|
||||
def show_subject_formatter(subject)
|
||||
if subject.to_s.nil?
|
||||
t(:no_subject,:scope=>:message)
|
||||
else
|
||||
return h(force_charset(subject.decoded))
|
||||
#fs = addr.gsub(/\"/,"").split(/</)
|
||||
#fs[0].size.zero? ? s = fs[1] : s << fs[0] + " <" + fs[1] + ">"
|
||||
return addr
|
||||
end
|
||||
end
|
||||
|
||||
# def show_addr_formatter(addrs)
|
||||
# return h(force_charset(addrs[0].decoded))
|
||||
# end
|
||||
|
||||
def subject_formatter(message)
|
||||
# def show_subject_formatter(subject)
|
||||
# if subject.to_s.nil?
|
||||
# t(:no_subject,:scope=>:message)
|
||||
# else
|
||||
# return h(force_charset(subject.decoded))
|
||||
# end
|
||||
# end
|
||||
|
||||
|
||||
def subject_formatter(message,mode)
|
||||
if message.subject.size.zero?
|
||||
s = t(:no_subject,:scope=>:message)
|
||||
else
|
||||
case mode
|
||||
when :index
|
||||
length = $defaults["msg_subject_length"].to_i
|
||||
message.subject.length >= length ? s = message.subject[0,length]+"..." : s = message.subject
|
||||
end
|
||||
link_to s,{:controller => 'messages', :action => 'show', :id => message.uid} , :title => message.subject
|
||||
when :show
|
||||
message.subject
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def attachment_formatter(message)
|
||||
message.content_type == 'text' ? "" : "A"
|
||||
message.content_type =~ /^text\/plain/ ? "" : image_tag(current_theme_image_path('star.png'))
|
||||
end
|
||||
|
||||
def headers_links
|
||||
|
|
2
app/models/event.rb
Executable file
|
@ -0,0 +1,2 @@
|
|||
class Event < ActiveRecord::Base
|
||||
end
|
|
@ -1,4 +1,5 @@
|
|||
require 'iconv'
|
||||
require 'mail'
|
||||
|
||||
class Message < ActiveRecord::Base
|
||||
|
||||
|
@ -30,26 +31,28 @@ class Message < ActiveRecord::Base
|
|||
Message.paginate :page => page , :per_page => user.prefs.msgs_per_page.to_i, :conditions=> ['user_id = ? and folder_id = ?', user.id,folder.id],:order => order
|
||||
end
|
||||
|
||||
def self.createForUser(user,folder,imap_message)
|
||||
def self.createForUser(user,folder,message)
|
||||
|
||||
envelope = imap_message.attr['ENVELOPE']
|
||||
# envelope = imap_message.attr['ENVELOPE']
|
||||
#
|
||||
# envelope.from.nil? ? from = "" : from = addr_to_db(envelope.from[0])
|
||||
# envelope.to.nil? ? to = "" : to = addr_to_db(envelope.to[0])
|
||||
# envelope.subject.nil? ? subject = "" : subject = ApplicationController.decode_quoted(envelope.subject)
|
||||
|
||||
envelope.from.nil? ? from = "" : from = addr_to_db(envelope.from[0])
|
||||
envelope.to.nil? ? to = "" : to = addr_to_db(envelope.to[0])
|
||||
envelope.subject.nil? ? subject = "" : subject = ApplicationController.decode_quoted(envelope.subject)
|
||||
mail = Mail.new(message.attr['RFC822.HEADER'])
|
||||
|
||||
create(
|
||||
:user_id => user.id,
|
||||
:folder_id => folder.id,
|
||||
:msg_id => envelope.message_id,
|
||||
:uid => imap_message.attr['UID'].to_i,
|
||||
:from_addr => from,
|
||||
:to_addr => to,
|
||||
:subject => subject,
|
||||
:content_type => imap_message.attr['BODYSTRUCTURE'].media_type.downcase,
|
||||
:date => envelope.date,
|
||||
:unseen => !(imap_message.attr['FLAGS'].member? :Seen),
|
||||
:size => imap_message.attr['RFC822.SIZE']
|
||||
: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,
|
||||
:content_type => mail.content_type,
|
||||
:date => mail.date.to_s(:db),
|
||||
:unseen => !(message.attr['FLAGS'].member? :Seen),
|
||||
:size => message.attr['RFC822.SIZE']
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -43,4 +43,8 @@ class User < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def username
|
||||
email.gsub(/\@/,"_").gsub(/\./,"_")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
version: Build 2011-09-09
|
||||
|
||||
theme: olive
|
||||
locale: pl
|
||||
|
||||
|
@ -5,6 +7,8 @@ themes: [olive]
|
|||
locales: [en, pl]
|
||||
msgs_per_page_table: [15, 20, 25, 30, 35, 40, 45, 50]
|
||||
msg_send_type: [html, text]
|
||||
msg_image_view_as: [attachment, thumbnail]
|
||||
msg_image_thumbnail_size: [128x128, 128x96, 192x192, 192x144, 256x256, 256x192]
|
||||
|
||||
contacts_table_fields: [nick, first_name, last_name, email, info]
|
||||
contacts_per_page: 25
|
||||
|
@ -16,9 +20,10 @@ msgs_update_time: 600
|
|||
msgs_inbox_view_fields: [from_addr, subject, date, size]
|
||||
msgs_sent_view_fields: [to_addr, subject, date, size]
|
||||
|
||||
msg_subject_length: 45
|
||||
msg_subject_length: 50
|
||||
msg_address_length: 35
|
||||
msg_search_fields: [subject, from, to]
|
||||
msg_upload_dir: "tmp/uploads"
|
||||
|
||||
# if encoding can not be get from data
|
||||
msg_unknown_charset: ISO-8859-2
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
pl:
|
||||
date:
|
||||
day_names: [Niedziela, Poniedziałek, Wtorek, Środa, Czwartek, Piątek, Sobota]
|
||||
abbr_day_names: [Ni, Po, Wt, Śr, Cz, Pi, So]
|
||||
month_names: [~, Styczeń, Luty, Marzec, Kwiecień, Maj, Czerwiec, Lipiec, Sierpień, Wrzesień, Październik, Listopad, Grudzień]
|
||||
abbr_month_names: [~, Sty, Lut, Mar, Kwi, Maj, Czer, Lip, Sier, Wrze, Paź, Lis, Grudz]
|
||||
order: [ :year, :month, :day ]
|
||||
activerecord:
|
||||
errors:
|
||||
messages:
|
||||
|
@ -22,6 +28,8 @@ pl:
|
|||
locale: Ustawienia językowe
|
||||
msgs_per_page: Ilość wiadomości wyświetlanych na stronie
|
||||
msg_send_type: Format wysyłanej wiadomości
|
||||
msg_image_view_as: Prezentuj obraz jako
|
||||
msg_image_thumbnail_size: Rozmiar miniaturki obrazu
|
||||
message:
|
||||
from_addr: Od
|
||||
to_addr: Do
|
||||
|
@ -58,6 +66,9 @@ pl:
|
|||
look: Wygląd
|
||||
identity: Tożsamość
|
||||
servers: Serwery
|
||||
were_saved: Ustawienia zostały zapisane
|
||||
thumbnail: Miniaturka
|
||||
attachment: Załącznik
|
||||
|
||||
folder:
|
||||
folder: Folder
|
||||
|
@ -88,6 +99,8 @@ pl:
|
|||
not_configured_sent: Folder Wysłany nie został przypisany
|
||||
not_configured_trash: Folder Kosz nie został przypisany
|
||||
not_configured_inbox: Folder Odebrane nie został przypisany
|
||||
show_hide: Pokaż/Ukryj
|
||||
refresh: Odśwież
|
||||
|
||||
message:
|
||||
messages: Wiadomości
|
||||
|
@ -105,6 +118,9 @@ pl:
|
|||
show_header: Pokaż nagłówek
|
||||
edit: Edycja
|
||||
images: Obrazy
|
||||
delete: Usuń zaznaczone
|
||||
move: Przenieś
|
||||
copy: Skopiuj
|
||||
|
||||
compose:
|
||||
compose: Nowa wiadomość
|
||||
|
@ -114,11 +130,19 @@ pl:
|
|||
write_your_message_here: Tu wpisz swoją wiadomość
|
||||
was_sent: Wiadomość została wysłana
|
||||
was_saved: Wiadomość została zapisana w katalogu roboczym
|
||||
reply_string: "Odp: "
|
||||
|
||||
not_configured_smtp: Brak konfiguracji SMTP
|
||||
select_file: Wybierz plik
|
||||
delete_marked: Usuń zaznaczone
|
||||
send_file: Wyślij plik
|
||||
send: Wyślij
|
||||
save_as_draft: Zapisz w katalogu roboczym
|
||||
|
||||
show:
|
||||
replay_to: Odpowiedz
|
||||
reply: Odpowiedz
|
||||
show_header: Pokaż nagłówek
|
||||
delete: Usuń
|
||||
reply_string: "Odp: "
|
||||
|
||||
user:
|
||||
login_failure: Nieudane logowanie. Podano błędny e-mail lub hasło.
|
||||
|
@ -140,16 +164,16 @@ pl:
|
|||
internal_server_error: Błąd aplikacji
|
||||
unprocessable_entity: Błąd procesowania
|
||||
|
||||
common:
|
||||
must_be_unique: musi być unikalny
|
||||
some_add_info: jakieś dodatkowe informacje
|
||||
example: przykład
|
||||
refresh: Odśwież
|
||||
|
||||
create: Utwórz
|
||||
delete: Usuń
|
||||
show_hide: Pokaż/Ukryj
|
||||
|
||||
mailr: MailR
|
||||
save: Zapisz
|
||||
|
||||
copy: Skopiuj
|
||||
move: Przenieś
|
||||
to: do
|
||||
|
@ -159,12 +183,11 @@ pl:
|
|||
kbytes: kB
|
||||
mbytes: MB
|
||||
site_link: https://github.com/lmanolov/mailr
|
||||
send: Wyślij
|
||||
|
||||
no_data: Brak danych
|
||||
logout: Wyloguj
|
||||
download: Pobierz
|
||||
view: Pokaż
|
||||
version: Wersja
|
||||
save_as_draft: Zapisz w katalogu roboczym
|
||||
set: Ustaw
|
||||
|
||||
set: Ustaw
|
||||
logout: Wyloguj
|
||||
|
|
|
@ -34,8 +34,11 @@ Mailr::Application.routes.draw do
|
|||
match "messages_ops/single" => 'messages_ops#single'
|
||||
match "messages_ops/multi" => 'messages_ops#multi'
|
||||
match "messages_ops/sendout_or_save" => 'messages_ops#sendout_or_save' ,:as =>:sendout_or_save
|
||||
match "messages_ops/upload" => 'messages_ops#upload',:as => :upload
|
||||
|
||||
root :to => "messages#index"
|
||||
match "messages/index" => 'messages#index', :as => :messages
|
||||
match "messages/compose" => 'messages#compose', :as => :compose
|
||||
#get "messages/refresh_status"
|
||||
#get "messages/emptybin"
|
||||
#match "messages/select/:id" => 'messages#select', :as => :messages_select
|
||||
|
@ -43,7 +46,7 @@ Mailr::Application.routes.draw do
|
|||
#match 'messages/folder/:id' => 'messages#folder', :as => :messages_folder
|
||||
#post "messages/ops"
|
||||
#post "messages/msgops"
|
||||
match "messages/compose" => 'messages#compose'
|
||||
|
||||
#match "messages/edit/:id" => 'messages#edit' ,:as => :messages_edit
|
||||
#match "messages/reply/:id" => 'messages#reply'
|
||||
|
||||
|
|
19
db/migrate/20110906094129_create_events.rb
Executable file
|
@ -0,0 +1,19 @@
|
|||
class CreateEvents < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :events do |t|
|
||||
t.integer :user_id
|
||||
t.integer :priority
|
||||
t.text :description
|
||||
t.string :category
|
||||
t.datetime :start
|
||||
t.datetime :stop
|
||||
t.boolean :allday
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :events
|
||||
end
|
||||
end
|
11
db/migrate/20110908094506_add_msg_params_to_prefs.rb
Executable file
|
@ -0,0 +1,11 @@
|
|||
class AddMsgParamsToPrefs < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :prefs, :msg_image_view_as, :string
|
||||
add_column :prefs, :msg_image_thumbnail_size, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :prefs, :msg_image_thumbnail_size
|
||||
remove_column :prefs, :msg_image_view_as
|
||||
end
|
||||
end
|
16
db/schema.rb
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20110901120826) do
|
||||
ActiveRecord::Schema.define(:version => 20110908094506) do
|
||||
|
||||
create_table "contacts", :force => true do |t|
|
||||
t.string "nick"
|
||||
|
@ -23,6 +23,18 @@ ActiveRecord::Schema.define(:version => 20110901120826) do
|
|||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "events", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "priority"
|
||||
t.text "description"
|
||||
t.string "category"
|
||||
t.datetime "start"
|
||||
t.datetime "stop"
|
||||
t.boolean "allday"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "folders", :force => true do |t|
|
||||
t.string "name"
|
||||
t.string "delim"
|
||||
|
@ -62,6 +74,8 @@ ActiveRecord::Schema.define(:version => 20110901120826) do
|
|||
t.datetime "updated_at"
|
||||
t.string "msgs_per_page"
|
||||
t.string "msg_send_type"
|
||||
t.string "msg_image_view_as"
|
||||
t.string "msg_image_thumbnail_size"
|
||||
end
|
||||
|
||||
create_table "servers", :force => true do |t|
|
||||
|
|
|
@ -45,7 +45,7 @@ end
|
|||
|
||||
class IMAPMessage
|
||||
|
||||
@@fetch_attr = ['ENVELOPE','BODYSTRUCTURE', 'FLAGS', 'UID', 'RFC822.SIZE']
|
||||
@@fetch_attr = ['RFC822.HEADER', 'FLAGS', 'UID', 'RFC822.SIZE']
|
||||
#@@fetch_attr = ['RFC822','FLAGS', 'UID', 'RFC822.SIZE']
|
||||
|
||||
# attr_accessor :envelope,:uid,:content_type,:size,:unseen,:from,:message_id,:to,:from,:subject,:date
|
||||
|
|
|
@ -42,4 +42,58 @@ module Mail
|
|||
|
||||
end
|
||||
|
||||
class Field
|
||||
def charseted
|
||||
begin
|
||||
if encoded =~ /\=\?([\w\-]+)\?/
|
||||
source_charset = $1
|
||||
if source_charset.upcase == 'UTF-8'
|
||||
return decoded
|
||||
end
|
||||
else
|
||||
source_charset = $defaults["msg_unknown_charset"]
|
||||
end
|
||||
Iconv.iconv("UTF-8",source_charset,decoded).first
|
||||
rescue
|
||||
decoded
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Address
|
||||
def charseted
|
||||
begin
|
||||
if encoded =~ /\=\?([\w\-]+)\?/
|
||||
source_charset = $1
|
||||
if source_charset.upcase == 'UTF-8'
|
||||
return decoded
|
||||
end
|
||||
else
|
||||
source_charset = $defaults["msg_unknown_charset"]
|
||||
end
|
||||
Iconv.iconv("UTF-8",source_charset,decoded).first
|
||||
rescue
|
||||
decoded
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Part
|
||||
def filename_charseted
|
||||
begin
|
||||
if content_type =~ /\=\?([\w\-]+)\?/
|
||||
source_charset = $1
|
||||
if source_charset.upcase == 'UTF-8'
|
||||
return filename
|
||||
end
|
||||
else
|
||||
source_charset = $defaults["msg_unknown_charset"]
|
||||
end
|
||||
Iconv.iconv("UTF-8",source_charset,filename).first
|
||||
rescue
|
||||
filename
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
19
test/fixtures/events.yml
vendored
Executable file
|
@ -0,0 +1,19 @@
|
|||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
|
||||
one:
|
||||
user_id: 1
|
||||
priority: 1
|
||||
description: MyText
|
||||
category: MyString
|
||||
start: 2011-09-06 11:41:29
|
||||
stop: 2011-09-06 11:41:29
|
||||
allday: false
|
||||
|
||||
two:
|
||||
user_id: 1
|
||||
priority: 1
|
||||
description: MyText
|
||||
category: MyString
|
||||
start: 2011-09-06 11:41:29
|
||||
stop: 2011-09-06 11:41:29
|
||||
allday: false
|
8
test/functional/events_controller_test.rb
Executable file
|
@ -0,0 +1,8 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EventsControllerTest < ActionController::TestCase
|
||||
# Replace this with your real tests.
|
||||
test "the truth" do
|
||||
assert true
|
||||
end
|
||||
end
|
8
test/unit/event_test.rb
Executable file
|
@ -0,0 +1,8 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EventTest < ActiveSupport::TestCase
|
||||
# Replace this with your real tests.
|
||||
test "the truth" do
|
||||
assert true
|
||||
end
|
||||
end
|
4
test/unit/helpers/events_helper_test.rb
Executable file
|
@ -0,0 +1,4 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EventsHelperTest < ActionView::TestCase
|
||||
end
|
6
themes/olive/images/License.txt
Executable file
|
@ -0,0 +1,6 @@
|
|||
This icons pack made by Freeiconsdownload from http://www.freeiconsdownload.com
|
||||
These icons are free for personal,non-commercial use.
|
||||
if you wish to these icons for Commercial website,software or commercial project.
|
||||
You must indicate the icons Author "Icons are from http://www.freeiconsdownload.com" in your projects.
|
||||
Thanks
|
||||
Matt.
|
BIN
themes/olive/images/copy.png
Executable file
After Width: | Height: | Size: 726 B |
Before Width: | Height: | Size: 655 B |
BIN
themes/olive/images/download.png
Executable file
After Width: | Height: | Size: 806 B |
BIN
themes/olive/images/email.png
Executable file
After Width: | Height: | Size: 851 B |
BIN
themes/olive/images/flag.png
Executable file
After Width: | Height: | Size: 795 B |
BIN
themes/olive/images/forward.png
Executable file
After Width: | Height: | Size: 817 B |
Before Width: | Height: | Size: 612 B |
BIN
themes/olive/images/minus.png
Executable file
After Width: | Height: | Size: 738 B |
BIN
themes/olive/images/move.png
Executable file
After Width: | Height: | Size: 783 B |
BIN
themes/olive/images/plus.png
Executable file
After Width: | Height: | Size: 790 B |
BIN
themes/olive/images/power.png
Executable file
After Width: | Height: | Size: 872 B |
BIN
themes/olive/images/refresh.png
Executable file
After Width: | Height: | Size: 855 B |
BIN
themes/olive/images/reply.png
Executable file
After Width: | Height: | Size: 809 B |
BIN
themes/olive/images/save.png
Executable file
After Width: | Height: | Size: 856 B |
BIN
themes/olive/images/seen.png
Executable file
After Width: | Height: | Size: 815 B |
BIN
themes/olive/images/star.png
Executable file
After Width: | Height: | Size: 816 B |
Before Width: | Height: | Size: 537 B |
BIN
themes/olive/images/trash.png
Executable file
After Width: | Height: | Size: 891 B |
Before Width: | Height: | Size: 4.3 KiB |
BIN
themes/olive/images/unseen.png
Executable file
After Width: | Height: | Size: 875 B |
BIN
themes/olive/images/up.png
Executable file
After Width: | Height: | Size: 804 B |
BIN
themes/olive/images/zoom.png
Executable file
After Width: | Height: | Size: 854 B |
|
@ -196,7 +196,7 @@ body {
|
|||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 15px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.table th {
|
||||
|
@ -382,11 +382,11 @@ button.button[type] {
|
|||
}
|
||||
|
||||
button.button img, a.button img {
|
||||
margin:0 3px -3px 0 !important;
|
||||
margin:0 6px -4px 0 !important;
|
||||
padding:0;
|
||||
border:none;
|
||||
width:16px;
|
||||
height:16px;
|
||||
width:18px;
|
||||
height:18px;
|
||||
}
|
||||
|
||||
button.button:hover, a.button:hover {
|
||||
|
|
|
@ -135,10 +135,10 @@ p {
|
|||
}
|
||||
|
||||
#sidebar ul li {
|
||||
border-bottom: 1px solid #F0F0EE;
|
||||
border-bottom: 1px solid #F0F0EE;Załączniki burnet.tar.gz
|
||||
}
|
||||
|
||||
#sidebar ul li a:hover, #sidebar ul li a:active {
|
||||
#sidebar ul li a:hover, #sidebar ul li a:active {Załączniki burnet.tar.gz
|
||||
background: #ADBFD6;
|
||||
color: #FFF;
|
||||
}
|
||||
|
@ -371,12 +371,6 @@ tr.unseen td {
|
|||
font-weight:bold;
|
||||
}
|
||||
|
||||
div.ops {
|
||||
border: 1px solid #DACF77;
|
||||
padding: 5px;
|
||||
margin: 3px 0;
|
||||
}
|
||||
|
||||
div.actions-bar div.header_info {
|
||||
float: left;
|
||||
color: #5E634E;
|
||||
|
@ -471,13 +465,8 @@ div.attachments span.title {
|
|||
font-size: 14px;
|
||||
}
|
||||
|
||||
div.attachments table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
div.attachments table td{
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
div.render_text{
|
||||
margin: 5px 0 0 0;
|
||||
font-size: 14px;
|
||||
|
@ -527,6 +516,7 @@ div.images span.title {
|
|||
div.images div.image {
|
||||
margin: 5px;
|
||||
padding: 2px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.images div.image div.desc {
|
||||
|
@ -535,6 +525,58 @@ div.images div.image div.desc {
|
|||
padding: 2px;
|
||||
}
|
||||
|
||||
div.desc span.size {
|
||||
float: right;
|
||||
}
|
||||
|
||||
div.params input,div.params select,div.params textarea {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.width100 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.side_calendar td {
|
||||
text-align: right;
|
||||
background-color: #EFF3E4;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
table.side_calendar td.wday, table.side_calendar td.week {
|
||||
color: white;
|
||||
background-color: #DACF77;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table.side_calendar td.weekend {
|
||||
color: white;
|
||||
background-color: #5E634E;
|
||||
}
|
||||
|
||||
table.side_calendar td.off {
|
||||
background-color: white;
|
||||
}
|
||||
table.side_calendar td.today {
|
||||
color: white;
|
||||
background-color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p.version {
|
||||
color: #5E634E;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
div.fileselect {
|
||||
margin-top: 5px;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
div.actiongroup {
|
||||
display: block;
|
||||
margin: 5px 0;
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
<%= raw form_field(@contact,"email",nil,"joe.doe@domain.com",@contact.email) %>
|
||||
<%= raw form_field(@contact,"info",nil,t(:some_add_info),@contact.info) %>
|
||||
</div>
|
||||
<%= raw form_button('save','tick.png') %>
|
||||
<%= raw single_action('save','common','save.png') %>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="inner">
|
||||
|
||||
<div class="actions-bar wat-cf">
|
||||
<span class="other_info"> <%= t(:total_entries,:scope=>:contact) %>: <%= @contacts.total_entries %> / <%= link_to t(:create_new,:scope=>:contact), new_contact_path %></span>
|
||||
<span class="other_info"> <%= t(:total_entries,:scope=>:contact) %>: <%= @contacts.total_entries %></span>
|
||||
</div>
|
||||
<%= will_paginate @contacts %>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<div id="ops" class="ops">
|
||||
<p>
|
||||
<%= submit_tag(t(:compose_to_selected,:scope => :contact), :name=> 'compose')%>
|
||||
<%= submit_tag(t(:delete_selected,:scope => :contact), :name=>'delete')%>
|
||||
<%= raw group_action(@buttons) %>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<td nowrap="nowrap"><%= link_to row.nick,edit_contact_path(row) %></td>
|
||||
<td nowrap="nowrap"><%= row.first_name %></td>
|
||||
<td nowrap="nowrap"><%= row.last_name %></td>
|
||||
<td nowrap="nowrap"><%= link_to row.email, {:controller => 'messages',:action => 'compose' , :cids => row.id.to_a} %></td>
|
||||
<td nowrap="nowrap"><%= link_to row.email, {:controller => 'messages',:action => 'compose' , :cids => row.id} %></td>
|
||||
<td colspan="2" nowrap="nowrap"><%= row.info %></td>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'folders/list' %>
|
||||
<%= content_for_sidebar %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title do %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'folders/list' %>
|
||||
<%= content_for_sidebar %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title do %>
|
||||
|
@ -8,16 +8,14 @@
|
|||
|
||||
<div class="block" id="block-tables">
|
||||
<div class="secondary-navigation">
|
||||
<%= raw main_navigation(:contacts) %>
|
||||
<%= raw main_navigation(:contacts_tab) %>
|
||||
</div>
|
||||
<div class="content">
|
||||
<%= form_tag(contacts_ops_path,{:name=>'contacts'})%>
|
||||
|
||||
<% if @contacts.size.zero? %>
|
||||
<div class="actions-bar wat-cf">
|
||||
<div class="header_info"><%= t(:no_entries,:scope=>:contact) %>
|
||||
<%= content_tag(:span, link_to(raw('('+t(:create_new,:scope=>:contact)+')'),new_contact_path),:class=>"other_info") %>
|
||||
</div>
|
||||
<h3><%= t(:no_entries,:scope=>:contact) %></h3>
|
||||
<%= raw single_action('create_new','contact','plus.png') %>
|
||||
<% else %>
|
||||
<%= render :partial => 'ops' %>
|
||||
<%= render :partial => 'list' %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'folders/list' %>
|
||||
<%= content_for_sidebar %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title do %>
|
||||
|
|
3
themes/olive/views/events/_calendar.html.erb
Executable file
|
@ -0,0 +1,3 @@
|
|||
<div class="block">
|
||||
<%= raw calendar(1,2,3) %>
|
||||
</div>
|
|
@ -3,5 +3,5 @@
|
|||
<%= raw select_for_folders("folder","parent",@folders,t(:parent,:scope=>:folder),"",true) %>
|
||||
<%= raw simple_input_field("folder","target",t(:to_create,:scope=>:folder),"") %>
|
||||
</div>
|
||||
<%= raw form_button('create','tick.png') %>
|
||||
<%= raw single_action('create','common','plus.png') %>
|
||||
</form>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= form_tag(folders_delete_path) %>
|
||||
<div class="params">
|
||||
<%= raw select_for_folders("folder","delete",@folders,t(:to_delete,:scope=>:folder),"",true) %>
|
||||
<%= raw form_button('delete','cross.png') %>
|
||||
<%= raw single_action('delete','common','minus.png') %>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -15,9 +15,6 @@
|
|||
</ul>
|
||||
<% end %>
|
||||
<br/>
|
||||
<%= raw form_button_value('logout','tick.png',user_logout_path) %>
|
||||
<%= raw single_action_onclick('logout','common','power.png',user_logout_path) %>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<%= t(:version) %>: Build 20110901
|
||||
</p>
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<div class="params">
|
||||
<%= raw multi_select("", 'folders_to_show[]', @folders, @folders_shown,t(:shown,:scope=>:folder),:id,"",{:text => [:parent,:delim,:name]}) %>
|
||||
</div>
|
||||
<%= raw form_buttons(@buttons) %>
|
||||
<%= raw group_action(@buttons) %>
|
||||
</form>
|
||||
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
<%= raw select_for_folders("folder","mailbox_trash",@folders,t(:folder,:scope => :folder) + " " + t(:trash_name,:scope=>:folder),@folder_trash,true) %>
|
||||
<%= raw select_for_folders("folder","mailbox_sent",@folders,t(:folder,:scope => :folder) + " " + t(:sent_name,:scope=>:folder),@folder_sent,true) %>
|
||||
<%= raw select_for_folders("folder","mailbox_drafts",@folders,t(:folder,:scope => :folder) + " " + t(:drafts_name,:scope=>:folder),@folder_drafts,true) %>
|
||||
<%= raw form_button('set','tick.png') %>
|
||||
<%= raw single_action('set','common','save.png') %>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'folders/list' %>
|
||||
<%= content_for_sidebar %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title do %>
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
<div class="block" id="block-tables">
|
||||
<div class="secondary-navigation">
|
||||
<%= raw main_navigation(:folders) %>
|
||||
<%= raw main_navigation(:folders_tab) %>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="inner">
|
||||
|
|
4
themes/olive/views/internal/_version.html.erb
Executable file
|
@ -0,0 +1,4 @@
|
|||
<p class="version">
|
||||
<%= t(:version) %>: <%= $defaults["version"] %>
|
||||
</p>
|
||||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>
|
||||
<%= t(:mailr) %>
|
||||
<%= t(:mailr,:scope=>:common) %>
|
||||
<%= yield :title %>
|
||||
</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
|
|
|
@ -3,7 +3,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title><%=t(:mailr) %> -
|
||||
<title><%=t(:mailr,:scope=>:common) %> -
|
||||
<%= yield :title %>
|
||||
</title>
|
||||
<%=stylesheet_link_tag current_theme_stylesheet_path('base') %>
|
||||
|
@ -11,6 +11,6 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
<div id="footer"><a href="<%= t(:site_link) %>">Mailr</a> - open source web mail client</div>
|
||||
<div id="footer"><a href="<%= t(:site_link,:scope=>:common) %>">Mailr</a> - open source web mail client</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<td>
|
||||
<%= link_to attachment.filename, messages_attachment_download_path(attachment.parent_id,attachment.idx) %>
|
||||
<%= link_to attachment.filename_charseted, messages_attachment_download_path(attachment.parent_id,attachment.idx) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= attachment.main_type %>/<%= attachment.sub_type %>
|
||||
|
@ -14,6 +14,6 @@
|
|||
<%= size_formatter(attachment.getSize) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to t(:download), messages_attachment_download_path(attachment.parent_id,attachment.idx) %>
|
||||
<%= link_to image_tag(current_theme_image_path('download.png')), messages_attachment_download_path(attachment.parent_id,attachment.idx) %>
|
||||
</td>
|
||||
|
||||
|
|
4
themes/olive/views/messages/_file_attach.html.erb
Executable file
|
@ -0,0 +1,4 @@
|
|||
<td><%= check_box_tag "files[]", file_attach[:name] %></td>
|
||||
<td><%= file_attach[:name] %></td>
|
||||
<td><%= size_formatter(file_attach[:size]) %></td>
|
||||
<td class="last"> </td>
|
16
themes/olive/views/messages/_file_attachs.html.erb
Executable file
|
@ -0,0 +1,16 @@
|
|||
<div class="attachments">
|
||||
<span class="title"><%= t(:attachments,:scope=>:message) %></span>
|
||||
<% if not @attachments.size.zero? %>
|
||||
<% trclass = :even %>
|
||||
<table>
|
||||
<% @attachments.each do |a| %>
|
||||
<tr class="<%= trclass.to_s %>">
|
||||
<%= render :partial => 'messages/file_attach', :object => a %>
|
||||
</tr>
|
||||
<% trclass == :even ? trclass = :odd : trclass = :even %>
|
||||
<% end %>
|
||||
</table>
|
||||
<%= raw single_action('delete_marked','compose','minus.png') %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
11
themes/olive/views/messages/_file_select.html.erb
Executable file
|
@ -0,0 +1,11 @@
|
|||
<div class="fileselect">
|
||||
<%= form_tag(upload_path, :multipart => true) %>
|
||||
<label for="upload_file"><%= t(:select_file,:scope=>:compose) %></label>:
|
||||
<%= file_field 'upload', 'datafile' %>
|
||||
<%= raw single_action('send_file','compose','up.png') %>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="msg_header">
|
||||
<%= raw show_param_view(@message,"from_addr",show_addr_formatter(@from)) %>
|
||||
<%= raw show_param_view(@message,"to_addr",show_addr_formatter(@to)) %>
|
||||
<%= raw show_param_view(@message,"from_addr",address_formatter(@from,:show)) %>
|
||||
<%= raw show_param_view(@message,"to_addr",address_formatter(@to,:show)) %>
|
||||
<% if @to.size > 1 %>
|
||||
<%= raw show_param_view(@message,"to_addr","To dodatkowe jest") %>
|
||||
<% end %>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<% if not @bcc.nil? %>
|
||||
<%= raw show_param_view(@message,"bcc_addr","BCC jest ") %>
|
||||
<% end %>
|
||||
<%= raw show_param_view(@message,"subject",show_subject_formatter(@subject)) %>
|
||||
<%= raw show_param_view(@message,"subject",subject_formatter(@message,:show)) %>
|
||||
<%= raw show_param_view(@message,"date",date_formatter(@date)) %>
|
||||
<%= hidden_field_tag 'uids[]', @message.uid %>
|
||||
<%= hidden_field_tag 'source', 'show' %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="image">
|
||||
<%= image_tag(messages_attachment_download_path(image.parent_id,image.idx), :size => "128x128", :alt=>image.filename, :title=>image.filename) %>
|
||||
<%= image_tag(messages_attachment_download_path(image.parent_id,image.idx), :size => @current_user.prefs.msg_image_thumbnail_size, :alt=>image.filename, :title=>image.filename) %>
|
||||
<div class="desc">
|
||||
<span class="name"><%= link_to (image.filename,messages_attachment_download_path(image.parent_id,image.idx)) %></span>
|
||||
<span class="size"><%= size_formatter(image.getSize) %></span>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<div class="images">
|
||||
<span class="title"><%= t(:images,:scope=>:message) %></span>
|
||||
|
||||
<% for idx in 0..@images.size-1 %>
|
||||
<%= render :partial => 'image', :object => @images[idx] %>
|
||||
<% end %>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
|
17
themes/olive/views/messages/_message.html.erb
Executable file
|
@ -0,0 +1,17 @@
|
|||
<td><%= check_box_tag "uids[]", message.uid %></td>
|
||||
<td><%= attachment_formatter(message) %></td>
|
||||
|
||||
<% if @current_folder == @sent_folder || @current_folder == @drafts_folder %>
|
||||
<td nowrap="nowrap"><%= address_formatter(message.to_addr,:index) %></td>
|
||||
<% else %>
|
||||
<td nowrap="nowrap"><%= address_formatter(message.from_addr,:index) %></td>
|
||||
<% end %>
|
||||
|
||||
<td nowrap="nowrap"><%= subject_formatter(message,:index) %></td>
|
||||
<td nowrap="nowrap"><%= date_formatter(message.date) %></td>
|
||||
</td><td nowrap="nowrap"><%= size_formatter(message.size) %></td>
|
||||
<% if @current_folder == @drafts_folder %>
|
||||
<td><%= link_to(t(:edit,:scope=>:message),messages_ops_single_path(message.uid)) %></td>
|
||||
<% else %>
|
||||
<td><%= raw(' ') %></td>
|
||||
<% end %>
|
|
@ -19,7 +19,7 @@
|
|||
<% @messages.each do |m| %>
|
||||
<% m.unseen == true ? unseen = "unseen" : unseen = "" %>
|
||||
<tr class="<%= trclass.to_s %> <%= unseen %>">
|
||||
<%= render :partial => 'messages/row', :object => m %>
|
||||
<%= render :partial => 'messages/message', :object => m %>
|
||||
</tr>
|
||||
<% trclass == :even ? trclass = :odd : trclass = :even %>
|
||||
<% end %>
|
|
@ -1,14 +1,4 @@
|
|||
<div id="ops" class="ops">
|
||||
<p>
|
||||
<%= submit_tag(t(:copy), :name=> 'copy')%>
|
||||
<%= submit_tag(t(:move), :name=>'move')%>
|
||||
<%= t(:checked,:scope=>:message) %>
|
||||
<%= t(:to_folder,:scope=>:folder) %>
|
||||
<%= raw simple_select_for_folders("folder","target",@folders_shown,'',true) %>
|
||||
<br/>
|
||||
<%= submit_tag(t(:delete), :name=>'trash')%>
|
||||
<%= submit_tag(t(:set_read,:scope=>:message), :name=>'set_read')%>
|
||||
<%= submit_tag(t(:set_unread,:scope=>:message), :name=>'set_unread')%>
|
||||
<%= t(:checked,:scope=>:message) %>
|
||||
</p>
|
||||
<%= raw group_action_text(@multi1_buttons,t(:checked,:scope=>:message) + " " + t(:to_folder,:scope=>:folder)+ " " + simple_select_for_folders("folder","target",@folders_shown,'',true)) %>
|
||||
<%= raw group_action(@multi2_buttons) %>
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<%= form_tag(sendout_or_save_path)%>
|
||||
<div class="params">
|
||||
<%= raw form_field(@message,"to_addr",nil,"joe@domain.com"+', '+t(:not_contain_at,:scope=>:compose),@message.to_addr) %>
|
||||
<% if not @reply.nil? %>
|
||||
|
@ -6,5 +7,7 @@
|
|||
<%= raw form_field(@message,"subject",nil,t(:subject_of_the_message,:scope=>:compose),@message.subject) %>
|
||||
<%= raw area_field(@message,"body",nil,t(:write_your_message_here,:scope=>:compose),@message.body,80,20) %>
|
||||
</div>
|
||||
<%= raw form_buttons(@buttons) %>
|
||||
<%= raw group_action(@buttons) %>
|
||||
<%= render :partial=> 'messages/file_attachs' %>
|
||||
</form>
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<td><%= check_box_tag "uids[]", row.uid %></td>
|
||||
<td><%= attachment_formatter(row) %></td>
|
||||
|
||||
<% if @current_folder == @sent_folder || @current_folder == @drafts_folder %>
|
||||
<td nowrap="nowrap"><%= address_formatter(row.to_addr,:index) %></td>
|
||||
<% else %>
|
||||
<td nowrap="nowrap"><%= address_formatter(row.from_addr,:index) %></td>
|
||||
<% end %>
|
||||
|
||||
<td nowrap="nowrap"><%= subject_formatter(row) %></td>
|
||||
<td nowrap="nowrap"><%= date_formatter(row.date) %></td>
|
||||
</td><td nowrap="nowrap"><%= size_formatter(row.size) %></td>
|
||||
<% if @current_folder == @drafts_folder %>
|
||||
<td><%= link_to(t(:edit,:scope=>:message),messages_ops_single_path(row.uid)) %></td>
|
||||
<% else %>
|
||||
<td><%= raw(' ') %></td>
|
||||
<% end %>
|
|
@ -1,11 +1,7 @@
|
|||
<div id="ops" class="ops">
|
||||
<%= submit_tag(t(:copy), :name=> 'copy')%>
|
||||
<%= submit_tag(t(:move), :name=>'move')%>
|
||||
<%= t(:to_folder,:scope=>:folder) %>
|
||||
<%= raw simple_select_for_folders("folder","target",@folders_shown,'',true) %><br/>
|
||||
<%= submit_tag(t(:show_header,:scope=>:message), :id=>'show_header')%>
|
||||
<%= submit_tag(t(:delete), :name=>'trash')%>
|
||||
<%= submit_tag(t(:replay_to,:scope => :show), :name=>'reply')%>
|
||||
<%= raw group_action_text(@multi1_buttons,t(:to_folder,:scope=>:folder)+ " " + simple_select_for_folders("folder","target",@folders_shown,'',true)) %>
|
||||
<%= raw group_action(@multi3_buttons) %>
|
||||
|
||||
<div id="header_source" title="<%= t(:header_source,:scope=>:message)%>">
|
||||
<pre>
|
||||
<%= @plain_header %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'folders/list' %>
|
||||
<%= content_for_sidebar %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title do %>
|
||||
|
@ -8,15 +8,14 @@
|
|||
|
||||
<div class="block" id="block-tables">
|
||||
<div class="secondary-navigation">
|
||||
<%= raw main_navigation(:compose) %>
|
||||
<%= raw main_navigation(:compose_tab) %>
|
||||
</div>
|
||||
<div class="content">
|
||||
<h2><%= t(:new_message,:scope=>:compose) %></h2>
|
||||
<%= form_tag(sendout_or_save_path)%>
|
||||
<div class="inner">
|
||||
<%= render :partial => 'messages/new' %>
|
||||
<%= render :partial => 'messages/file_select' %>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'folders/list' %>
|
||||
<%= content_for_sidebar %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title do %>
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
<div class="block" id="block-tables">
|
||||
<div class="secondary-navigation">
|
||||
<%= raw main_navigation(:messages) %>
|
||||
<%= raw main_navigation(:messages_tab) %>
|
||||
</div>
|
||||
<div class="content">
|
||||
<%= form_tag({:controller=>'messages_ops', :action=>'multi'},{:name=>'messages'})%>
|
||||
|
@ -23,7 +23,7 @@
|
|||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => 'multi_ops' %>
|
||||
<%= render :partial => 'list' %>
|
||||
<%= render :partial => 'messages' %>
|
||||
<% end %>
|
||||
|
||||
</form>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'folders/list' %>
|
||||
<%= content_for_sidebar %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title do %>
|
||||
- <%= show_subject_formatter(@subject) %>
|
||||
- <%= subject_formatter(@message,:show) %>
|
||||
<% end %>
|
||||
|
||||
<div class="block" id="block-tables">
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
<%= h @current_user.full_address %>
|
||||
</p>
|
||||
</div>
|
||||
<%= raw form_button('save','tick.png') %>
|
||||
<%= raw single_action('save','common','save.png') %>
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
<div class="params">
|
||||
<%= raw select_field_table(@prefs, "msgs_per_page", $defaults["msgs_per_page_table"],@prefs.msgs_per_page,false) %>
|
||||
<%= raw select_field_table(@prefs, "theme", $defaults["themes"],@prefs.theme,false) %>
|
||||
<%= raw select_field_table(@prefs, "locale", $defaults["locales"],@prefs.locale,false) %>
|
||||
<%= raw select_field_table(@prefs, "msg_send_type", $defaults["msg_send_type"],@prefs.msg_send_type,false) %>
|
||||
</div>
|
||||
<%= raw form_button('save','tick.png') %>
|
||||
<%= raw single_action('save','common','save.png') %>
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
<div class="params">
|
||||
<%= raw select_field_table_t(@prefs, "msg_image_view_as", $defaults["msg_image_view_as"],@prefs.msg_image_view_as,false) %>
|
||||
<%= raw select_field_table(@prefs, "msg_image_thumbnail_size", $defaults["msg_image_thumbnail_size"],@prefs.msg_image_thumbnail_size,false) %>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
<div class="params">
|
||||
<%= h @servers.inspect %>
|
||||
</div>
|
||||
<%= raw form_button('save','tick.png') %>
|
||||
<%= raw single_action('save','common','save.png') %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'folders/list' %>
|
||||
<%= content_for_sidebar %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title do %>
|
||||
|
@ -8,10 +8,10 @@
|
|||
|
||||
<div class="block" id="block-tables">
|
||||
<div class="secondary-navigation">
|
||||
<%= raw main_navigation(:prefs) %>
|
||||
<%= raw main_navigation(:prefs_tab) %>
|
||||
</div>
|
||||
<div class="content"><div class="secondary-navigation">
|
||||
<%= raw prefs_navigation(:identity) %>
|
||||
<%= raw prefs_navigation(:identity_tab) %>
|
||||
</div>
|
||||
<div class="inner"> <%= form_tag(prefs_update_identity_path,:name=>'prefs') %>
|
||||
<div class="columns wat-cf">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'folders/list' %>
|
||||
<%= content_for_sidebar %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title do %>
|
||||
|
@ -8,10 +8,10 @@
|
|||
|
||||
<div class="block" id="block-tables">
|
||||
<div class="secondary-navigation">
|
||||
<%= raw main_navigation(:prefs) %>
|
||||
<%= raw main_navigation(:prefs_tab) %>
|
||||
</div>
|
||||
<div class="content"><div class="secondary-navigation">
|
||||
<%= raw prefs_navigation(:look) %>
|
||||
<%= raw prefs_navigation(:look_tab) %>
|
||||
</div>
|
||||
<div class="inner"> <%= form_tag(prefs_update_look_path,:name=>'prefs') %>
|
||||
<div class="columns wat-cf">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'folders/list' %>
|
||||
<%= content_for_sidebar %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title do %>
|
||||
|
@ -8,10 +8,10 @@
|
|||
|
||||
<div class="block" id="block-tables">
|
||||
<div class="secondary-navigation">
|
||||
<%= raw main_navigation(:prefs) %>
|
||||
<%= raw main_navigation(:prefs_tab) %>
|
||||
</div>
|
||||
<div class="content"><div class="secondary-navigation">
|
||||
<%= raw prefs_navigation(:servers) %>
|
||||
<%= raw prefs_navigation(:servers_tab) %>
|
||||
</div>
|
||||
<div class="inner"> <%= form_tag(prefs_update_servers_path,:name=>'prefs') %>
|
||||
<div class="columns wat-cf">
|
||||
|
|