contacts done
This commit is contained in:
parent
68b925ea5e
commit
217c7a2288
30
Gemfile
30
Gemfile
|
@ -2,37 +2,7 @@ source 'http://rubygems.org'
|
||||||
|
|
||||||
gem 'rails', '3.0.7'
|
gem 'rails', '3.0.7'
|
||||||
|
|
||||||
# Bundle edge Rails instead:
|
|
||||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
|
||||||
|
|
||||||
#gem 'sqlite3-ruby',:require => 'sqlite3'
|
|
||||||
gem 'arel'
|
|
||||||
gem 'mysql2' , '0.2.7'
|
gem 'mysql2' , '0.2.7'
|
||||||
gem 'will_paginate', '~> 3.0.beta'
|
gem 'will_paginate', '~> 3.0.beta'
|
||||||
gem 'themes_for_rails'
|
gem 'themes_for_rails'
|
||||||
gem "ezcrypto", "~> 0.7.2"
|
gem "ezcrypto", "~> 0.7.2"
|
||||||
gem "mail"
|
|
||||||
#gem 'tmail'
|
|
||||||
|
|
||||||
# Use unicorn as the web server
|
|
||||||
# gem 'unicorn'
|
|
||||||
|
|
||||||
# Deploy with Capistrano
|
|
||||||
# gem 'capistrano'
|
|
||||||
|
|
||||||
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
|
|
||||||
# gem 'ruby-debug'
|
|
||||||
# gem 'ruby-debug19', :require => 'ruby-debug'
|
|
||||||
|
|
||||||
# Bundle the extra gems:
|
|
||||||
# gem 'bj'
|
|
||||||
# gem 'nokogiri'
|
|
||||||
# gem 'sqlite3-ruby', :require => 'sqlite3'
|
|
||||||
# gem 'aws-s3', :require => 'aws/s3'
|
|
||||||
|
|
||||||
# Bundle gems for the local environment. Make sure to
|
|
||||||
# put test-only gems in this group so their generators
|
|
||||||
# and rake tasks are available in development mode:
|
|
||||||
# group :development, :test do
|
|
||||||
# gem 'webrat'
|
|
||||||
# end
|
|
||||||
|
|
|
@ -72,9 +72,7 @@ PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
arel
|
|
||||||
ezcrypto (~> 0.7.2)
|
ezcrypto (~> 0.7.2)
|
||||||
mail
|
|
||||||
mysql2 (= 0.2.7)
|
mysql2 (= 0.2.7)
|
||||||
rails (= 3.0.7)
|
rails (= 3.0.7)
|
||||||
themes_for_rails
|
themes_for_rails
|
||||||
|
|
|
@ -8,7 +8,8 @@ class ApplicationController < ActionController::Base
|
||||||
#end
|
#end
|
||||||
|
|
||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
before_filter :load_defaults,:set_locale,:current_user
|
before_filter :load_defaults,:current_user,:set_locale
|
||||||
|
before_filter :plugins_configuration
|
||||||
|
|
||||||
################################# protected section ###########################################
|
################################# protected section ###########################################
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ class ApplicationController < ActionController::Base
|
||||||
if @current_user.nil?
|
if @current_user.nil?
|
||||||
I18n.locale = $defaults['locale'] || I18n.default_locale
|
I18n.locale = $defaults['locale'] || I18n.default_locale
|
||||||
else
|
else
|
||||||
I18n.locale = @current_user.prefs.locale || I18n.default_locale
|
I18n.locale = @current_user.prefs.locale.to_sym || I18n.default_locale
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -52,15 +53,21 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
def get_current_folders
|
def get_current_folders
|
||||||
@folders_shown = @current_user.folders.shown.order("name asc")
|
@folders_shown = @current_user.folders.shown.order("name asc")
|
||||||
@current_folder = @current_user.folders.current(@selected_folder)
|
@current_folder = @current_user.folders.find_by_full_name(@selected_folder)
|
||||||
end
|
end
|
||||||
|
|
||||||
##################################### private section ##########################################
|
##################################### private section ##########################################
|
||||||
|
|
||||||
#private
|
private
|
||||||
|
|
||||||
|
def plugins_configuration
|
||||||
|
WillPaginate::ViewHelpers.pagination_options[:previous_label] = t(:previous_page)
|
||||||
|
WillPaginate::ViewHelpers.pagination_options[:next_label] = t(:next_page)
|
||||||
|
end
|
||||||
|
|
||||||
#def route_not_found
|
#def route_not_found
|
||||||
# render :text => 'What the fuck are you looking for ?', :status => :not_found
|
# render :text => 'What the fuck are you looking for ?', :status => :not_found
|
||||||
#end
|
#end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,73 @@ class ContactsController < ApplicationController
|
||||||
|
|
||||||
before_filter :check_current_user,:selected_folder
|
before_filter :check_current_user,:selected_folder
|
||||||
|
|
||||||
before_filter :get_current_folders, :only => [:index]
|
before_filter :get_current_folders
|
||||||
|
|
||||||
|
before_filter :get_contacts, :only => [:index]
|
||||||
|
|
||||||
theme :theme_resolver
|
theme :theme_resolver
|
||||||
|
|
||||||
def index
|
def index
|
||||||
flash[:notice] = 'Not implemented yet'
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def ops
|
||||||
|
if !params["cids"]
|
||||||
|
flash[:warning] = t(:no_selected,:scope=>:contact)
|
||||||
|
else
|
||||||
|
if params["delete"]
|
||||||
|
params["cids"].each do |id|
|
||||||
|
@current_user.contacts.find_by_id(id).destroy
|
||||||
|
end
|
||||||
|
elsif params["compose"]
|
||||||
|
redirect_to :controller=>'messages',:action=>'compose',:cids=>params["cids"]
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
redirect_to(contacts_path)
|
||||||
|
end
|
||||||
|
|
||||||
|
#problem http://binary10ve.blogspot.com/2011/05/migrating-to-rails-3-got-stuck-with.html
|
||||||
|
#def destroy
|
||||||
|
# @current_user.contacts.find(params[:id]).destroy
|
||||||
|
# redirect_to(contacts_path)
|
||||||
|
#end
|
||||||
|
|
||||||
|
def new
|
||||||
|
@contact = Contact.new
|
||||||
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
@contact = @current_user.contacts.find(params[:id])
|
||||||
|
render 'edit'
|
||||||
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
@contact = @current_user.contacts.build(params[:contact])
|
||||||
|
if @contact.valid?
|
||||||
|
@contact.save
|
||||||
|
flash[:notice] = t(:was_created,:scope=>:contact)
|
||||||
|
redirect_to(contacts_path)
|
||||||
|
else
|
||||||
|
render 'new'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def update
|
||||||
|
@contact = @current_user.contacts.find(params[:id])
|
||||||
|
if @contact.update_attributes(params[:contact])
|
||||||
|
redirect_to(contacts_path)
|
||||||
|
else
|
||||||
|
render 'edit'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
####################################### private section ##################################
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def get_contacts
|
||||||
|
@contacts = Contact.getPageForUser(@current_user,params[:page],params[:sort_field],params[:sort_dir])
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,35 +18,35 @@ class FoldersController < ApplicationController
|
||||||
|
|
||||||
def create
|
def create
|
||||||
if params["folder"].empty?
|
if params["folder"].empty?
|
||||||
flash[:warning] = t(:folder_to_create_empty)
|
flash[:warning] = t(:to_create_empty,:scope=>:folder)
|
||||||
render "index"
|
render "index"
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if params["parent_folder"].empty?
|
if params["parent_folder"].empty?
|
||||||
@mailbox.create_folder(params[:folder])
|
@mailbox.create_folder(params[:folder])
|
||||||
else
|
else
|
||||||
parent_folder = Folder.find(params["parent_folder"])
|
parent_folder = @current_user.folders.find(params["parent_folder"])
|
||||||
if parent_folder.depth >= $defaults["mailbox_max_parent_folder_depth"].to_i
|
if parent_folder.depth >= $defaults["mailbox_max_parent_folder_depth"].to_i
|
||||||
raise Exception, t(:folder_max_depth)
|
raise Exception, t(:max_depth,:scope=>:folder)
|
||||||
end
|
end
|
||||||
@mailbox.create_folder(parent_folder.full_name + parent_folder.delim + params[:folder])
|
@mailbox.create_folder(parent_folder.full_name + parent_folder.delim + params[:folder])
|
||||||
end
|
end
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
flash[:error] = t(:can_not_create_folder) + ' (' + e.to_s + ')'
|
flash[:error] = t(:can_not_create,:scope=>:folder) + ' (' + e.to_s + ')'
|
||||||
render 'index'
|
render 'index'
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
redirect_to :action => 'refresh', :flash => t(:folder_was_created), :type => :notice
|
redirect_to :action => 'refresh', :flash => t(:was_created,:scope=>:folder), :type => :notice
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# FIXME if you delete folder you should change current folder because if you go to messages/index you got nil
|
# FIXME if you delete folder you should change current folder because if you go to messages/index you got nil
|
||||||
def delete
|
def delete
|
||||||
if params["folder"].empty?
|
if params["folder"].empty?
|
||||||
flash[:warning] = t(:folder_to_delete_empty)
|
flash[:warning] = t(:to_delete_empty,:scope=>:folder)
|
||||||
render "index"
|
render "index"
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
folder = Folder.find(params["folder"])
|
folder = @current_user.folders.find(params["folder"])
|
||||||
system_folders = Array.new
|
system_folders = Array.new
|
||||||
system_folders << $defaults["mailbox_inbox"]
|
system_folders << $defaults["mailbox_inbox"]
|
||||||
system_folders << $defaults["mailbox_trash"]
|
system_folders << $defaults["mailbox_trash"]
|
||||||
|
@ -55,13 +55,13 @@ class FoldersController < ApplicationController
|
||||||
if system_folders.include?(folder.full_name.downcase)
|
if system_folders.include?(folder.full_name.downcase)
|
||||||
raise Exception, t(:system_folder)
|
raise Exception, t(:system_folder)
|
||||||
end
|
end
|
||||||
@mailbox.delete_folder(Folder.find(params["folder"]).full_name)
|
@mailbox.delete_folder(folder.full_name)
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
flash[:error] = t(:can_not_delete_folder) + ' (' + e.to_s + ')'
|
flash[:error] = t(:can_not_delete,:scope=>:folder) + ' (' + e.to_s + ')'
|
||||||
render 'index'
|
render 'index'
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
redirect_to :action => 'refresh', :flash => t(:folder_was_deleted), :type => :notice
|
redirect_to :action => 'refresh', :flash => t(:was_deleted,:scope=>:folder), :type => :notice
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -82,9 +82,6 @@ class FoldersController < ApplicationController
|
||||||
def refresh
|
def refresh
|
||||||
Folder.refresh(@mailbox,@current_user)
|
Folder.refresh(@mailbox,@current_user)
|
||||||
flash.keep
|
flash.keep
|
||||||
#if params[:flash]
|
|
||||||
# flash[params[:type]] = params[:flash]
|
|
||||||
#end
|
|
||||||
redirect_to :action => 'index'
|
redirect_to :action => 'index'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ class InternalController < ApplicationController
|
||||||
|
|
||||||
def loginfailure
|
def loginfailure
|
||||||
reset_session
|
reset_session
|
||||||
flash[:error] = t(:login_failure)
|
flash[:error] = t(:login_failure,:scope=>:user)
|
||||||
@current_user = nil
|
@current_user = nil
|
||||||
redirect_to :controller=>'user', :action => 'login'
|
redirect_to :controller=>'user', :action => 'login'
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,75 +11,38 @@ class MessagesController < ApplicationController
|
||||||
|
|
||||||
before_filter :check_current_user ,:selected_folder
|
before_filter :check_current_user ,:selected_folder
|
||||||
|
|
||||||
before_filter :get_current_folders, :only => [:index,:compose,:show]
|
before_filter :get_current_folders
|
||||||
|
|
||||||
before_filter :open_imap_session, :only => :refresh
|
before_filter :open_imap_session, :select_imap_folder
|
||||||
after_filter :close_imap_session, :only => :refresh
|
after_filter :close_imap_session
|
||||||
|
|
||||||
theme :theme_resolver
|
theme :theme_resolver
|
||||||
|
|
||||||
@@fetch_attr = ['ENVELOPE','BODYSTRUCTURE', 'FLAGS', 'UID', 'RFC822.SIZE']
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
||||||
open_imap_session
|
|
||||||
####################
|
|
||||||
@messages = []
|
@messages = []
|
||||||
|
|
||||||
folder_status = @mailbox.status(@current_folder.full_name)
|
folder_status = @mailbox.status
|
||||||
@current_folder.update_attributes(:messages => folder_status['MESSAGES'], :unseen => folder_status['UNSEEN'])
|
@current_folder.update_attributes(:total => folder_status['MESSAGES'], :unseen => folder_status['UNSEEN'])
|
||||||
|
|
||||||
if folder_status['MESSAGES'].zero?
|
folder_status['MESSAGES'].zero? ? uids_remote = [] : uids_remote = @mailbox.fetch_uids
|
||||||
return
|
uids_local = @current_user.messages.where(:folder_id => @current_folder).collect(&:uid)
|
||||||
|
|
||||||
|
(uids_local-uids_remote).each do |uid|
|
||||||
|
@current_folder.messages.find_by_uid(uid).destroy
|
||||||
end
|
end
|
||||||
|
|
||||||
messages = @mailbox.fetch(@current_folder.full_name,1..-1, "UID")
|
(uids_remote-uids_local).each_slice($defaults["imap_fetch_slice"].to_i) do |slice|
|
||||||
logger.custom('mess',messages)
|
messages = @mailbox.uid_fetch(slice, ImapMessageModule::IMAPMessage.fetch_attr)
|
||||||
uids_to_be_fetched = []
|
|
||||||
|
|
||||||
messages.each do |m|
|
|
||||||
uids_to_be_fetched << m.attr['UID']
|
|
||||||
end
|
|
||||||
|
|
||||||
messages = []
|
|
||||||
@current_user.messages.destroy_all
|
|
||||||
uids_to_be_fetched.each_slice($defaults["imap_fetch_slice"].to_i) do |slice|
|
|
||||||
logger.custom('slice',slice.join(","))
|
|
||||||
messages = @mailbox.uid_fetch(@current_folder.full_name,slice, @@fetch_attr)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
messages.each do |m|
|
messages.each do |m|
|
||||||
|
mess = ImapMessageModule::IMAPMessage.fromImap(m)
|
||||||
envelope = m.attr['ENVELOPE']
|
Message.createForUser(@current_user,@current_folder,mess)
|
||||||
uid = m.attr['UID']
|
|
||||||
#content_type = m.attr['BODYSTRUCTURE'].multipart? ? 'multipart' : 'text'
|
|
||||||
content_type = m.attr['BODYSTRUCTURE'].media_type.downcase
|
|
||||||
size = m.attr['RFC822.SIZE']
|
|
||||||
unread = !(m.attr['FLAGS'].member? :Seen)
|
|
||||||
from = ImapMessageModule::IMAPAddress.from_address(envelope.from[0])
|
|
||||||
logger.custom('from',from.to_db)
|
|
||||||
logger.custom('enevelope_from',envelope)
|
|
||||||
logger.custom('body',m.attr['BODYSTRUCTURE'])
|
|
||||||
message = @current_user.messages.create(:folder_id => @current_folder.id,
|
|
||||||
:msg_id => envelope.message_id,
|
|
||||||
:uid => uid,
|
|
||||||
:from => from.to_db,
|
|
||||||
:to => envelope.to,
|
|
||||||
:subject => envelope.subject,
|
|
||||||
:content_type => content_type,
|
|
||||||
:date => envelope.date,
|
|
||||||
:unread => unread,
|
|
||||||
:size => size)
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@messages = Message.getPageForUser(@current_user,params['page'])
|
@messages = Message.getPageForUser(@current_user,@current_folder,params[:page],params[:sort_field],params[:sort_dir])
|
||||||
|
|
||||||
###############
|
|
||||||
close_imap_session
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def folder
|
def folder
|
||||||
|
@ -92,20 +55,102 @@ class MessagesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def refresh
|
def refresh
|
||||||
|
@folders_shown.each do |f|
|
||||||
|
@mailbox.set_folder(f.full_name)
|
||||||
|
folder_status = @mailbox.status
|
||||||
|
f.update_attributes(:total => folder_status['MESSAGES'], :unseen => folder_status['UNSEEN'])
|
||||||
|
end
|
||||||
|
redirect_to :action => 'index'
|
||||||
|
end
|
||||||
|
|
||||||
|
def emptybin
|
||||||
|
begin
|
||||||
|
trash_folder = @current_user.folders.find_by_full_name($defaults["mailbox_trash"])
|
||||||
|
@mailbox.set_folder(trash_folder.full_name)
|
||||||
|
trash_folder.messages.each do |m|
|
||||||
|
logger.custom('id',m.inspect)
|
||||||
|
@mailbox.delete_message(m.uid)
|
||||||
|
end
|
||||||
|
@mailbox.expunge
|
||||||
|
trash_folder.messages.destroy_all
|
||||||
|
trash_folder.update_attributes(:unseen => 0, :total => 0)
|
||||||
|
rescue Exception => e
|
||||||
|
flash[:error] = "#{t(:imap_error)} (#{e.to_s})"
|
||||||
|
end
|
||||||
redirect_to :action => 'index'
|
redirect_to :action => 'index'
|
||||||
end
|
end
|
||||||
|
|
||||||
def ops
|
def ops
|
||||||
|
begin
|
||||||
|
if !params["uids"]
|
||||||
|
flash[:warning] = t(:no_selected,:scope=>:message)
|
||||||
|
elsif params["delete"]
|
||||||
|
params["uids"].each do |uid|
|
||||||
|
@mailbox.delete_message(uid)
|
||||||
|
@current_user.messages.find_by_uid(uid).destroy
|
||||||
|
end
|
||||||
|
@current_folder.update_stats
|
||||||
|
elsif params["set_unread"]
|
||||||
|
params["uids"].each do |uid|
|
||||||
|
@mailbox.set_unread(uid)
|
||||||
|
@current_user.messages.find_by_uid(uid).update_attributes(:unseen => 1)
|
||||||
|
end
|
||||||
|
elsif params["set_read"]
|
||||||
|
params["uids"].each do |uid|
|
||||||
|
@mailbox.set_read(uid)
|
||||||
|
@current_user.messages.find_by_uid(uid).update_attributes(:unseen => 0)
|
||||||
|
end
|
||||||
|
elsif params["trash"]
|
||||||
|
dest_folder = @current_user.folders.find_by_full_name($defaults["mailbox_trash"])
|
||||||
|
params["uids"].each do |uid|
|
||||||
|
@mailbox.move_message(uid,dest_folder.full_name)
|
||||||
|
message = @current_folder.messages.find_by_uid(uid)
|
||||||
|
message.change_folder(dest_folder)
|
||||||
|
end
|
||||||
|
@mailbox.expunge
|
||||||
|
dest_folder.update_stats
|
||||||
|
@current_folder.update_stats
|
||||||
|
elsif params["copy"]
|
||||||
|
if params["dest_folder"].empty?
|
||||||
|
flash[:warning] = t(:no_selected,:scope=>:folder)
|
||||||
|
else
|
||||||
|
dest_folder = find(params["dest_folder"])
|
||||||
|
params["uids"].each do |uid|
|
||||||
|
@mailbox.copy_message(uid,dest_folder.full_name)
|
||||||
|
message = @current_folder.messages.find_by_uid(uid)
|
||||||
|
new_message = message.clone
|
||||||
|
new_message.folder_id = dest_folder.id
|
||||||
|
new_message.save
|
||||||
|
end
|
||||||
|
dest_folder.update_stats
|
||||||
|
@current_folder.update_stats
|
||||||
|
end
|
||||||
|
elsif params["move"]
|
||||||
|
if params["dest_folder"].empty?
|
||||||
|
flash[:warning] = t(:no_selected,:scope=>:folder)
|
||||||
|
else
|
||||||
|
dest_folder = @current_user.folders.find(params["dest_folder"])
|
||||||
|
params["uids"].each do |uid|
|
||||||
|
@mailbox.move_message(uid,dest_folder.full_name)
|
||||||
|
message = @current_folder.messages.find_by_uid(uid)
|
||||||
|
message.change_folder(dest_folder)
|
||||||
|
end
|
||||||
|
@mailbox.expunge
|
||||||
|
dest_folder.update_stats
|
||||||
|
@current_folder.update_stats
|
||||||
|
end
|
||||||
|
end
|
||||||
|
rescue Exception => e
|
||||||
|
flash[:error] = "#{t(:imap_error)} (#{e.to_s})"
|
||||||
|
end
|
||||||
redirect_to :action => 'index'
|
redirect_to :action => 'index'
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@message = Message.find(params[:id])
|
@message = @current_user.messages.find(params[:id])
|
||||||
flash[:notice] = 'Not impelented yet'
|
@message.update_attributes(:unseen => false)
|
||||||
open_imap_session
|
flash[:notice] = 'Not implemented yet'
|
||||||
@body = @mailbox.fetch_body(@current_folder.full_name,@message.uid)
|
@body = @mailbox.fetch_body(@message.uid)
|
||||||
logger.custom('body',@body.inspect)
|
|
||||||
close_imap_session
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,14 +2,25 @@ class PrefsController < ApplicationController
|
||||||
|
|
||||||
before_filter :check_current_user,:selected_folder
|
before_filter :check_current_user,:selected_folder
|
||||||
|
|
||||||
before_filter :get_current_folders, :only => [:index,:compose]
|
before_filter :get_current_folders
|
||||||
|
|
||||||
|
before_filter :get_prefs
|
||||||
|
|
||||||
theme :theme_resolver
|
theme :theme_resolver
|
||||||
|
|
||||||
def index
|
def index
|
||||||
flash[:notice] = 'Not implemented yet'
|
|
||||||
|
|
||||||
@prefs = @current_user.prefs
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def update
|
||||||
|
if params[:prefs]
|
||||||
|
@prefs.update_attributes(params[:prefs])
|
||||||
|
end
|
||||||
|
redirect_to :action => 'index'
|
||||||
|
end
|
||||||
|
|
||||||
|
############################################ private section #########################################
|
||||||
|
|
||||||
|
def get_prefs
|
||||||
|
@prefs = @current_user.prefs
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,7 +8,7 @@ class UserController < ApplicationController
|
||||||
|
|
||||||
def logout
|
def logout
|
||||||
reset_session
|
reset_session
|
||||||
flash[:notice] = t(:user_logged_out)
|
flash[:notice] = t(:logged_out,:scope=>:user)
|
||||||
redirect_to :action => "login"
|
redirect_to :action => "login"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -44,19 +44,19 @@ class UserController < ApplicationController
|
||||||
def create
|
def create
|
||||||
|
|
||||||
@user = User.new
|
@user = User.new
|
||||||
@user.email = params["user_email"]
|
@user.email = params[:user][:email]
|
||||||
@user.first_name = params["user_first_name"]
|
@user.first_name = params[:user][:first_name]
|
||||||
@user.last_name = params["user_last_name"]
|
@user.last_name = params[:user][:last_name]
|
||||||
|
|
||||||
@server = Server.new
|
@server = Server.new
|
||||||
@server.name = params["server_name"]
|
@server.name = params[:server][:name]
|
||||||
|
|
||||||
if @user.valid? and @server.valid?
|
if @user.valid? and @server.valid?
|
||||||
@user.save
|
@user.save
|
||||||
@server.user_id = @user.id
|
@server.user_id = @user.id
|
||||||
@server.save
|
@server.save
|
||||||
Prefs.create_default(@user.id)
|
Prefs.create_default(@user.id)
|
||||||
flash[:notice] = t(:setup_done)
|
flash[:notice] = t(:setup_done,:scope=>:user)
|
||||||
redirect_to :action => 'login'
|
redirect_to :action => 'login'
|
||||||
else
|
else
|
||||||
render "setup"
|
render "setup"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
|
|
||||||
def form_field(object,field,flabel,example,val)
|
def form_field(object,field,flabel,example,val)
|
||||||
|
model_name = eval(object.class.model_name)
|
||||||
html = ""
|
html = ""
|
||||||
html << "<div class=\"group\">"
|
html << "<div class=\"group\">"
|
||||||
if object.errors[field.to_sym]
|
if object.errors[field.to_sym]
|
||||||
|
@ -10,7 +10,7 @@ def form_field(object,field,flabel,example,val)
|
||||||
end
|
end
|
||||||
html << "<label class=\"label\">"
|
html << "<label class=\"label\">"
|
||||||
if flabel.nil?
|
if flabel.nil?
|
||||||
html << t(field.to_sym)
|
html << model_name.human_attribute_name(field)
|
||||||
else
|
else
|
||||||
html << t(flabel.to_sym)
|
html << t(flabel.to_sym)
|
||||||
end
|
end
|
||||||
|
@ -21,9 +21,11 @@ def form_field(object,field,flabel,example,val)
|
||||||
html << "</span>"
|
html << "</span>"
|
||||||
html << "</div>"
|
html << "</div>"
|
||||||
end
|
end
|
||||||
html << "<input name=\""
|
html << "<input id=\""
|
||||||
html << object.class.name.downcase+"_"+field
|
html << object.class.name.downcase+"_"+field
|
||||||
html << "\" type=\"text\" class=\"text_field\" value=\""
|
html << "\""
|
||||||
|
html << " name=\"#{object.class.name.downcase}[#{field}]\""
|
||||||
|
html << " size=50 type=\"text\" class=\"text_field\" value=\""
|
||||||
value = object.instance_eval(field) || val || ""
|
value = object.instance_eval(field) || val || ""
|
||||||
html << value
|
html << value
|
||||||
html << "\"/>"
|
html << "\"/>"
|
||||||
|
@ -43,7 +45,7 @@ def form_button(text,image)
|
||||||
html << "<img src=\""
|
html << "<img src=\""
|
||||||
html << current_theme_image_path(image)
|
html << current_theme_image_path(image)
|
||||||
html << "\" alt=\""
|
html << "\" alt=\""
|
||||||
html << text
|
html << t(text.to_sym)
|
||||||
html << "\" />"
|
html << "\" />"
|
||||||
html << t(text.to_sym)
|
html << t(text.to_sym)
|
||||||
html << "</button></div>"
|
html << "</button></div>"
|
||||||
|
@ -66,7 +68,7 @@ end
|
||||||
|
|
||||||
def simple_input_field(name,label,value)
|
def simple_input_field(name,label,value)
|
||||||
html = ""
|
html = ""
|
||||||
html << "<div class=\"group\">"
|
html << "<div class=\"param_group\">"
|
||||||
html << "<label class=\"label\">#{label}</label>"
|
html << "<label class=\"label\">#{label}</label>"
|
||||||
html << "<input name=\"#{name}\" class=\"text_field\" type=\"text\" value=\"#{value}\">"
|
html << "<input name=\"#{name}\" class=\"text_field\" type=\"text\" value=\"#{value}\">"
|
||||||
html << "</div>"
|
html << "</div>"
|
||||||
|
@ -80,6 +82,15 @@ def select_field(name,object,label,blank)
|
||||||
html << "</div>"
|
html << "</div>"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def select_field_table(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>"
|
||||||
|
html << select(object.class.to_s.downcase, field, options_for_select(table_choices,choice), {:include_blank => blank})
|
||||||
|
html << "</div>"
|
||||||
|
end
|
||||||
|
|
||||||
#def form_simle_field(name,label,value)
|
#def form_simle_field(name,label,value)
|
||||||
# html = ""
|
# html = ""
|
||||||
# html << "<div class=\"group\">"
|
# html << "<div class=\"group\">"
|
||||||
|
@ -89,23 +100,23 @@ end
|
||||||
#end
|
#end
|
||||||
|
|
||||||
def nav_to_folders
|
def nav_to_folders
|
||||||
link_to( t(:folders), :controller=>:folders, :action=>:index )
|
link_to( t(:folders,:scope=>:folder), :controller=>:folders, :action=>:index )
|
||||||
end
|
end
|
||||||
|
|
||||||
def nav_to_messages
|
def nav_to_messages
|
||||||
link_to( t(:messages), :controller=>:messages, :action=>:index )
|
link_to( t(:messages,:scope=>:message), :controller=>:messages, :action=>:index )
|
||||||
end
|
end
|
||||||
|
|
||||||
def nav_to_compose
|
def nav_to_compose
|
||||||
link_to( t(:compose), :controller=>:messages, :action=>:compose )
|
link_to( t(:compose,:scope=>:compose), :controller=>:messages, :action=>:compose )
|
||||||
end
|
end
|
||||||
|
|
||||||
def nav_to_contacts
|
def nav_to_contacts
|
||||||
link_to( t(:contacts), :controller=>:contacts, :action=>:index )
|
link_to( t(:contacts,:scope=>:contact), contacts_path )
|
||||||
end
|
end
|
||||||
|
|
||||||
def nav_to_prefs
|
def nav_to_prefs
|
||||||
link_to( t(:preferences), :controller=>:prefs, :action=>:index )
|
link_to( t(:prefs,:scope=>:prefs), prefs_path )
|
||||||
end
|
end
|
||||||
|
|
||||||
def main_navigation(active)
|
def main_navigation(active)
|
||||||
|
|
|
@ -1,2 +1,17 @@
|
||||||
module ContactsHelper
|
module ContactsHelper
|
||||||
|
|
||||||
|
def contacts_table_header
|
||||||
|
html = ""
|
||||||
|
$defaults["contacts_table_fields"].each do |f|
|
||||||
|
html << "<th>"
|
||||||
|
if params[:sort_field] == f
|
||||||
|
params[:sort_dir].nil? ? dir = 'desc' : dir = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
html << link_to(Contact.human_attribute_name(f), {:controller => 'contacts',:action => 'index',:sort_field => f,:sort_dir => dir}, {:class=>"header"})
|
||||||
|
html << "</th>"
|
||||||
|
end
|
||||||
|
html
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,24 +1,40 @@
|
||||||
module FolderHelper
|
module FolderHelper
|
||||||
|
|
||||||
def folder_link(folder)
|
def folder_link(folder)
|
||||||
|
|
||||||
folder.parent.empty? ? name = folder.name : name = folder.parent.gsub(/\./,'#') + "#" + folder.name
|
folder.parent.empty? ? name = folder.name : name = folder.parent.gsub(/\./,'#') + "#" + folder.name
|
||||||
s = link_to folder.name.capitalize, :controller => 'messages', :action => 'folder', :id => name
|
s = link_to folder.name.capitalize, messages_folder_path(:id => name)
|
||||||
if !folder.unseen.zero?
|
|
||||||
s += ' (' + folder.unseen.to_s + ')'
|
if folder.full_name.downcase == $defaults["mailbox_trash"].downcase
|
||||||
|
if not folder.total.zero?
|
||||||
|
s <<' ('
|
||||||
|
s << link_to(t(:emptybin,:scope=>:folder),messages_emptybin_path)
|
||||||
|
s << ')'
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if !folder.unseen.zero?
|
||||||
|
s += ' (' + folder.unseen.to_s + ')'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
s
|
s
|
||||||
end
|
end
|
||||||
|
|
||||||
def pretty_folder_name(folder)
|
def pretty_folder_name(folder)
|
||||||
folder.nil? ? t(:no_folder_selected) : folder.name.capitalize
|
folder.nil? ? t(:no_selected,:scope=>:folder) : folder.name.capitalize
|
||||||
end
|
end
|
||||||
|
|
||||||
def select_for_folders(name,id,object,label,blank)
|
def select_for_folders(name,id,object,label,blank)
|
||||||
html = ""
|
html = ""
|
||||||
html << "<div class=\"group\">"
|
html << "<div class=\"group\">"
|
||||||
html << "<label class=\"label\">#{label}</label>"
|
html << "<label class=\"label\">#{label}</label>"
|
||||||
html << select(name, id, object.all.collect {|p| [ p.parent.empty? ? p.name : p.parent+p.delim+p.name, p.id ] }, { :include_blank => (blank == true ? true : false)})
|
html << simple_select_for_folders(name,id,object,blank)
|
||||||
html << "</div>"
|
html << "</div>"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def simple_select_for_folders(name,id,object,blank)
|
||||||
|
html = ""
|
||||||
|
html << select(name, id, object.all.collect {|p| [ p.parent.empty? ? p.name : p.parent+p.delim+p.name, p.id ] }, { :include_blank => (blank == true ? true : false)})
|
||||||
|
html
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,9 +19,12 @@ module MessagesHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def subject_formatter(message)
|
def subject_formatter(message)
|
||||||
length = $defaults["msg_subject_length"].to_i
|
if message.subject.size.zero?
|
||||||
logger.custom('l',length)
|
s = t(:no_subject,:scope=>:message)
|
||||||
message.subject.length >= length ? s = message.subject[0,length]+"..." : s = message.subject
|
else
|
||||||
|
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.id
|
link_to s,:controller => 'messages', :action => 'show', :id => message.id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -29,5 +32,26 @@ module MessagesHelper
|
||||||
message.content_type == 'text' ? "" : "A"
|
message.content_type == 'text' ? "" : "A"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def headers_links
|
||||||
|
|
||||||
|
if @current_folder.hasFullName?($defaults["mailbox_sent"])
|
||||||
|
fields = $defaults["msgs_sent_view_fields"]
|
||||||
|
else
|
||||||
|
fields = $defaults["msgs_inbox_view_fields"]
|
||||||
|
end
|
||||||
|
|
||||||
|
html = ""
|
||||||
|
fields.each do |f|
|
||||||
|
html << "<th>"
|
||||||
|
if params[:sort_field] == f
|
||||||
|
params[:sort_dir].nil? ? dir = 'desc' : dir = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
html << link_to(Message.human_attribute_name(f), {:controller => 'messages',:action => 'index',:sort_field => f,:sort_dir => dir}, {:class=>"header"})
|
||||||
|
html << "</th>"
|
||||||
|
end
|
||||||
|
html
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
35
app/models/contact.rb
Executable file
35
app/models/contact.rb
Executable file
|
@ -0,0 +1,35 @@
|
||||||
|
class Contact < ActiveRecord::Base
|
||||||
|
|
||||||
|
validates_length_of :nick, :within => 5..15
|
||||||
|
validates_length_of :first_name,:last_name, :within => 3..20
|
||||||
|
validates_length_of :email, :within => 5..50
|
||||||
|
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
|
||||||
|
validates_length_of :info, :maximum => 50
|
||||||
|
validate_on_create :check_unique_nick
|
||||||
|
|
||||||
|
belongs_to :user
|
||||||
|
|
||||||
|
def self.getPageForUser(user,page,sort_field,sort_dir)
|
||||||
|
|
||||||
|
order = 'last_name asc'
|
||||||
|
if sort_field
|
||||||
|
if Contact.attribute_method?(sort_field) == true
|
||||||
|
order = sort_field
|
||||||
|
sort_dir == 'desc' ? order += ' desc' : sort_dir
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Contact.paginate :page => page , :per_page => $defaults["contacts_per_page"], :conditions=> ['user_id = ?', user.id],:order => order
|
||||||
|
end
|
||||||
|
|
||||||
|
def full_name
|
||||||
|
first_name + ' ' + last_name
|
||||||
|
end
|
||||||
|
|
||||||
|
def check_unique_nick
|
||||||
|
if !Contact.where('upper(nick) = ? and user_id = ?',nick.upcase,user_id).size.zero?
|
||||||
|
errors.add(:nick, :not_unique)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -3,6 +3,7 @@ class Folder < ActiveRecord::Base
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
validates_presence_of :name, :on => :create
|
validates_presence_of :name, :on => :create
|
||||||
before_save :check_fill_params, :on => :create
|
before_save :check_fill_params, :on => :create
|
||||||
|
has_many :messages, :dependent => :destroy
|
||||||
|
|
||||||
def full_name
|
def full_name
|
||||||
if parent.empty?
|
if parent.empty?
|
||||||
|
@ -22,12 +23,23 @@ class Folder < ActiveRecord::Base
|
||||||
(fields[1].downcase == name.downcase) && (fields[0].downcase == parent.downcase)
|
(fields[1].downcase == name.downcase) && (fields[0].downcase == parent.downcase)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def update_stats
|
||||||
|
unseen = messages.where(:unseen => true).count
|
||||||
|
total = messages.count
|
||||||
|
update_attributes(:unseen => unseen, :total => total)
|
||||||
|
end
|
||||||
|
|
||||||
|
def hasFullName?(folder_name)
|
||||||
|
full_name.downcase == folder_name.downcase
|
||||||
|
end
|
||||||
|
|
||||||
|
############################################## private section #####################################
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def check_fill_params
|
def check_fill_params
|
||||||
self.messages.nil? ? self.messages = 0 : self.messages
|
self.total.nil? ? self.total = 0 : self.total
|
||||||
self.unseen.nil? ? self.unseen = 0 : self.unseen
|
self.unseen.nil? ? self.unseen = 0 : self.unseen
|
||||||
self.msgs_updated_at.nil? ? self.msgs_updated_at = (DateTime.now-1) : self.msgs_updated_at
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.createBulk(user,imapFolders)
|
def self.createBulk(user,imapFolders)
|
||||||
|
@ -43,14 +55,22 @@ class Folder < ActiveRecord::Base
|
||||||
parent = ""
|
parent = ""
|
||||||
end
|
end
|
||||||
|
|
||||||
user.folders.create(:name=>name,:parent=>parent,:haschildren=>has_children,:delim=>data.delim,:messages => data.messages,:unseen => data.unseen)
|
user.folders.create(
|
||||||
|
:msgs_updated_at => DateTime.now-1,
|
||||||
|
:name => name,
|
||||||
|
:parent => parent,
|
||||||
|
:haschildren => has_children,
|
||||||
|
:delim => data.delim,
|
||||||
|
:total => data.messages,
|
||||||
|
:unseen => data.unseen)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.current(data)
|
def self.find_by_full_name(data)
|
||||||
folder = data.split("#")
|
folder = data.gsub(/\./,'#')
|
||||||
nam = folder.delete_at(folder.size - 1)
|
fields = folder.split("#")
|
||||||
folder.size.zero? == true ? par = "" : par = folder.join(".")
|
nam = fields.delete_at(fields.size - 1)
|
||||||
|
fields.size.zero? == true ? par = "" : par = fields.join(".")
|
||||||
where(['name = ? and parent = ?',nam,par]).first
|
where(['name = ? and parent = ?',nam,par]).first
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -64,4 +84,6 @@ class Folder < ActiveRecord::Base
|
||||||
Folder.createBulk(user,folders)
|
Folder.createBulk(user,folders)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,13 +1,37 @@
|
||||||
class Message < ActiveRecord::Base
|
class Message < ActiveRecord::Base
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
belongs_to :folder
|
||||||
|
|
||||||
#cattr_reader :per_page
|
def self.getPageForUser(user,folder,page,sort_field,sort_dir)
|
||||||
#@@per_page = $defaults["msgs_per_page"]
|
|
||||||
|
|
||||||
def self.getPageForUser(user,page,order = "date desc")
|
order = 'date desc'
|
||||||
#Message.paginate :page => page , :per_page => user.prefs.msgs_per_page.to_i, :conditions=> ['user_id = ?', user.id],:order => order
|
if sort_field
|
||||||
|
if Message.attribute_method?(sort_field) == true
|
||||||
|
order = sort_field
|
||||||
|
sort_dir == 'desc' ? order += ' desc' : sort_dir
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Message.paginate :page => page , :per_page => 50, :conditions=> ['user_id = ?', user.id],:order => order
|
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,mess)
|
||||||
|
create(
|
||||||
|
:user_id => user.id,
|
||||||
|
:folder_id => folder.id,
|
||||||
|
:msg_id => mess.message_id,
|
||||||
|
:uid => mess.uid,
|
||||||
|
:from_addr => mess.from_to_db,
|
||||||
|
:to_addr => mess.to,
|
||||||
|
:subject => mess.subject,
|
||||||
|
:content_type => mess.content_type,
|
||||||
|
:date => mess.date,
|
||||||
|
:unseen => mess.unseen,
|
||||||
|
:size => mess.size)
|
||||||
|
end
|
||||||
|
|
||||||
|
def change_folder(folder)
|
||||||
|
update_attributes(:folder_id => folder.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,3 +15,5 @@ class Prefs < ActiveRecord::Base
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO move refresh to prefs and make refresh page with messages
|
||||||
|
|
|
@ -8,6 +8,7 @@ class User < ActiveRecord::Base
|
||||||
has_one :prefs, :dependent => :destroy
|
has_one :prefs, :dependent => :destroy
|
||||||
has_many :folders, :dependent => :destroy
|
has_many :folders, :dependent => :destroy
|
||||||
has_many :messages, :dependent => :destroy
|
has_many :messages, :dependent => :destroy
|
||||||
|
has_many :contacts, :dependent => :destroy
|
||||||
|
|
||||||
def set_cached_password(session,password)
|
def set_cached_password(session,password)
|
||||||
if $defaults['session_encryption']
|
if $defaults['session_encryption']
|
||||||
|
|
|
@ -1,12 +1,23 @@
|
||||||
theme: olive
|
theme: olive
|
||||||
locale: en
|
locale: pl
|
||||||
|
|
||||||
|
themes: [olive]
|
||||||
|
locales: [en, pl]
|
||||||
|
msgs_per_page_table: [15, 20, 25, 30, 35, 40, 45, 50]
|
||||||
|
msg_send_type: [html, text]
|
||||||
|
|
||||||
|
contacts_table_fields: [nick, first_name, last_name, email, info]
|
||||||
|
contacts_per_page: 25
|
||||||
|
|
||||||
msgs_per_page: 20
|
msgs_per_page: 20
|
||||||
msgs_refresh_time: 300
|
msgs_refresh_time: 300
|
||||||
msgs_send_type: html
|
msgs_send_type: html
|
||||||
msgs_update_time: 300
|
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: 45
|
||||||
|
msg_search_fields: [subject, from, to]
|
||||||
|
|
||||||
imap_debug: true
|
imap_debug: true
|
||||||
imap_use_ssl: 'false'
|
imap_use_ssl: 'false'
|
||||||
|
@ -20,7 +31,7 @@ session_password: asDD3s2@sAdc983#
|
||||||
|
|
||||||
mailbox_max_parent_folder_depth: 3
|
mailbox_max_parent_folder_depth: 3
|
||||||
mailbox_inbox: INBOX
|
mailbox_inbox: INBOX
|
||||||
mailbox_trash: Trash
|
mailbox_trash: INBOX.Trash
|
||||||
mailbox_sent: Sent
|
mailbox_sent: INBOX.sent
|
||||||
mailbox_drafts: Drafts
|
mailbox_drafts: INBOX.drafts
|
||||||
|
|
||||||
|
|
|
@ -1,102 +1,63 @@
|
||||||
en:
|
en:
|
||||||
mailr: Mailr
|
activerecord:
|
||||||
email: Email
|
attributes:
|
||||||
password: Password
|
prefs:
|
||||||
log_in: Log In
|
theme: Theme
|
||||||
wrong_email_or_password: Wrong email or password specified.
|
locale: Locale
|
||||||
mailbox: Mailbox
|
msgs_per_page: Messages per page
|
||||||
folders: Folders
|
msg_send_type: Message send format
|
||||||
folder: Folder
|
contact:
|
||||||
empty: Empty
|
compose_to_selected: Compose to selected
|
||||||
logout: Logout
|
delete_selected: Delete selected
|
||||||
compose: Compose
|
modifying: Modifying contact
|
||||||
preferences: Preferences
|
creating_new: Creating new contact
|
||||||
filters: Filters
|
create_new: Create new contact
|
||||||
contacts: Contacts
|
contacts: Contacts
|
||||||
search: Search
|
contact: Contact
|
||||||
search_txt: Search in message field
|
no_selected: No contact selected
|
||||||
refresh: Refresh
|
total_entries: Total contacts entries
|
||||||
operations: Operations
|
no_entries: No contacts
|
||||||
operations_txt: Operations on marked messages
|
was_created: Contact was created
|
||||||
delete: delete
|
are_you_sure_to_delete_contact: Are You sure to delete contact?
|
||||||
copy: copy
|
|
||||||
move: move
|
prefs:
|
||||||
mark_read: mark read
|
prefs: Preferences
|
||||||
mark_unread: mark unread
|
|
||||||
destination_txt: Destination for move and copy operations
|
folder:
|
||||||
for: for
|
folders: Folders
|
||||||
to: To
|
no_shown: No folders shown
|
||||||
subject: Subject
|
parent: Parent folder
|
||||||
date: Date
|
to_create: Folder to create
|
||||||
size: Size
|
to_delete: Folder to delete
|
||||||
from: From
|
shown: Shown folders
|
||||||
show_all: Show all
|
emptybin: Empty
|
||||||
pages: Pages
|
current: Current folder
|
||||||
first: First
|
no_selected: No folder selected
|
||||||
prev: Prev
|
to_create_empty: No folder name
|
||||||
next: Next
|
max_depth: Maximum folder depth reached
|
||||||
last: Last
|
can_not_create: Can not create folder
|
||||||
back_to_list: Back to list
|
was_created: Folder was created
|
||||||
back_to_message: Back to message
|
to_delete_empty: No folder to delete
|
||||||
reply: Reply
|
can_not_delete: Can not delete folder
|
||||||
forward: Forward
|
was_deleted: Folder was deleted
|
||||||
delete: Delete
|
|
||||||
view_source: View source
|
message:
|
||||||
add_filter: Add filter
|
messages: Messages
|
||||||
cc: CC
|
|
||||||
bcc: BCC
|
compose:
|
||||||
send: Send
|
compose: Compose
|
||||||
choose_address: Choose addresses from contacts
|
|
||||||
compose_txt: Compose new mail
|
user:
|
||||||
attachment: Attachment
|
login_failure: Login failure. Bad email or password
|
||||||
add: Add
|
logged_out: User was logged out
|
||||||
first_name: First name
|
setup_done: Setup done. Please login in
|
||||||
last_name: Last name
|
|
||||||
send_type: Send type message
|
must_be_unique: must be unique
|
||||||
messages_per_page: Messages per page
|
some_add_info: some additional information
|
||||||
check_external_mail: Check external mail?
|
|
||||||
check_external_mail_txt: Note that by selecting this option webmail system will try to log you using your original email on a local server.
|
|
||||||
save: Save
|
|
||||||
cancel: Cancel
|
|
||||||
add_one_contact: Add one contact
|
|
||||||
add_multiple: Add multiple
|
|
||||||
name: name
|
|
||||||
add_folder: Add folder
|
|
||||||
total_messages: Total messages
|
|
||||||
unseen: Unseen
|
|
||||||
please_login: Log in
|
|
||||||
site_link: https://github.com/lmanolov/mailr
|
|
||||||
user_logged_out: User was logged out
|
|
||||||
unknown_user_title: Unknown user
|
|
||||||
unknown_user_flash: Your email identifier was not found in database
|
|
||||||
unknown_user_login: Go to login page and try to login once more.
|
|
||||||
unknown_user_setup: Go to setup page and do the setup of Your mail account.
|
|
||||||
setup_title: Setup
|
|
||||||
example: example
|
example: example
|
||||||
server_name: Server name
|
refresh: Refresh
|
||||||
setup_done: Setup done. Please log in
|
|
||||||
login_failure: Login failure. Bad email or password
|
|
||||||
general_error: General error
|
|
||||||
unspecified_error: Unspecified error occured
|
|
||||||
imap_error: Imap Error
|
|
||||||
folder_to_create: Folder to create
|
|
||||||
create: Create
|
create: Create
|
||||||
subscribe_unsubscribe: (Un)Subscribe
|
delete: Delete
|
||||||
folders_subscribed_selected: Folders subscribed
|
|
||||||
messages: Messages
|
|
||||||
folder_to_create_empty: Folder to create is empty
|
|
||||||
folder_was_created: Folder was created
|
|
||||||
can_not_create_folder: Can not create folder
|
|
||||||
folder_max_depth: Maximum folder depth reached
|
|
||||||
folder_to_delete_empty: Folder to delete empty
|
|
||||||
folder_was_deleted: Folder was deleted
|
|
||||||
can_not_delete_folder: Can not delete folder
|
|
||||||
system_folder: System folder
|
|
||||||
refresh_folders: Refresh folders
|
|
||||||
show_hide: Show/Hide
|
show_hide: Show/Hide
|
||||||
page_not_found: Page not found
|
mailr: Mailr
|
||||||
bytes: Bytes
|
save: Save
|
||||||
kbytes: Kb
|
|
||||||
mbytes: MB
|
|
||||||
previous_page: Previous page
|
|
||||||
next_page: Next page
|
|
||||||
|
|
160
config/locales/en.yml.old
Executable file
160
config/locales/en.yml.old
Executable file
|
@ -0,0 +1,160 @@
|
||||||
|
en:
|
||||||
|
activerecord:
|
||||||
|
attributes:
|
||||||
|
prefs:
|
||||||
|
theme: Theme
|
||||||
|
locale: Locale
|
||||||
|
msgs_per_page: Messages per page
|
||||||
|
msg_send_type: Message send format
|
||||||
|
contact:
|
||||||
|
compose_to_selected: Compose to selected
|
||||||
|
delete_selected: Delete selected
|
||||||
|
modifying: Modifying contact
|
||||||
|
creating_new: Creating new contact
|
||||||
|
create_new: Create new contact
|
||||||
|
contacts: Contacts
|
||||||
|
contact: Contact
|
||||||
|
no_selected: No contact selected
|
||||||
|
total_entries: Total contacts entries
|
||||||
|
no_entries: No contacts
|
||||||
|
was_created: Contact was created
|
||||||
|
are_you_sure_to_delete_contact: Are You sure to delete contact?
|
||||||
|
|
||||||
|
prefs:
|
||||||
|
prefs: Preferences
|
||||||
|
|
||||||
|
folder:
|
||||||
|
folders: Folders
|
||||||
|
no_shown: No folders shown
|
||||||
|
parent: Parent folder
|
||||||
|
to_create: Folder to create
|
||||||
|
to_delete: Folder to delete
|
||||||
|
shown: Shown folders
|
||||||
|
emptybin: Empty
|
||||||
|
current: Current folder
|
||||||
|
no_selected: No folder selected
|
||||||
|
|
||||||
|
message:
|
||||||
|
messages: Messages
|
||||||
|
|
||||||
|
compose:
|
||||||
|
compose: Compose
|
||||||
|
|
||||||
|
must_be_unique: must be unique
|
||||||
|
some_add_info: some additional information
|
||||||
|
example: example
|
||||||
|
refresh: Refresh
|
||||||
|
create: Create
|
||||||
|
delete: Delete
|
||||||
|
show_hide: Show/Hide
|
||||||
|
|
||||||
|
mailr: Mailr
|
||||||
|
email: Email
|
||||||
|
password: Password
|
||||||
|
log_in: Log In
|
||||||
|
wrong_email_or_password: Wrong email or password specified.
|
||||||
|
mailbox: Mailbox
|
||||||
|
empty: Empty
|
||||||
|
logout: Logout
|
||||||
|
filters: Filters
|
||||||
|
search: Search
|
||||||
|
search_txt: Search in message field
|
||||||
|
operations: Operations
|
||||||
|
operations_txt: Operations on marked messages
|
||||||
|
copy: copy
|
||||||
|
move: move
|
||||||
|
mark_read: mark read
|
||||||
|
mark_unread: mark unread
|
||||||
|
destination_txt: Destination for move and copy operations
|
||||||
|
for: for
|
||||||
|
to: To
|
||||||
|
subject: Subject
|
||||||
|
date: Date
|
||||||
|
size: Size
|
||||||
|
from: From
|
||||||
|
show_all: Show all
|
||||||
|
pages: Pages
|
||||||
|
first: First
|
||||||
|
prev: Prev
|
||||||
|
next: Next
|
||||||
|
last: Last
|
||||||
|
back_to_list: Back to list
|
||||||
|
back_to_message: Back to message
|
||||||
|
reply: Reply
|
||||||
|
forward: Forward
|
||||||
|
delete: Delete
|
||||||
|
view_source: View source
|
||||||
|
add_filter: Add filter
|
||||||
|
cc: CC
|
||||||
|
bcc: BCC
|
||||||
|
send: Send
|
||||||
|
choose_address: Choose addresses from contacts
|
||||||
|
compose_txt: Compose new mail
|
||||||
|
attachment: Attachment
|
||||||
|
add: Add
|
||||||
|
first_name: First name
|
||||||
|
last_name: Last name
|
||||||
|
send_type: Send type message
|
||||||
|
messages_per_page: Messages per page
|
||||||
|
check_external_mail: Check external mail?
|
||||||
|
check_external_mail_txt: Note that by selecting this option webmail system will try to log you using your original email on a local server.
|
||||||
|
save: Save
|
||||||
|
cancel: Cancel
|
||||||
|
add_one_contact: Add one contact
|
||||||
|
add_multiple: Add multiple
|
||||||
|
name: name
|
||||||
|
add_folder: Add folder
|
||||||
|
total_messages: Total messages
|
||||||
|
unseen: Unseen
|
||||||
|
please_login: Log in
|
||||||
|
site_link: https://github.com/lmanolov/mailr
|
||||||
|
user_logged_out: User was logged out
|
||||||
|
unknown_user_title: Unknown user
|
||||||
|
unknown_user_flash: Your email identifier was not found in database
|
||||||
|
unknown_user_login: Go to login page and try to login once more.
|
||||||
|
unknown_user_setup: Go to setup page and do the setup of Your mail account.
|
||||||
|
setup_title: Setup
|
||||||
|
server_name: Server name
|
||||||
|
setup_done: Setup done. Please log in
|
||||||
|
login_failure: Login failure. Bad email or password
|
||||||
|
general_error: General error
|
||||||
|
unspecified_error: Unspecified error occured
|
||||||
|
imap_error: IMAP Error
|
||||||
|
folder_to_create: Folder to create
|
||||||
|
subscribe_unsubscribe: (Un)Subscribe
|
||||||
|
folders_subscribed_selected: Folders subscribed
|
||||||
|
messages: Messages
|
||||||
|
folder_to_create_empty: Folder to create is empty
|
||||||
|
folder_was_created: Folder was created
|
||||||
|
can_not_create_folder: Can not create folder
|
||||||
|
folder_max_depth: Maximum folder depth reached
|
||||||
|
folder_to_delete_empty: Folder to delete empty
|
||||||
|
folder_was_deleted: Folder was deleted
|
||||||
|
can_not_delete_folder: Can not delete folder
|
||||||
|
system_folder: System folder
|
||||||
|
refresh_folders: Refresh folders
|
||||||
|
show_hide: Show/Hide
|
||||||
|
page_not_found: Page not found
|
||||||
|
bytes: Bytes
|
||||||
|
kbytes: Kb
|
||||||
|
mbytes: MB
|
||||||
|
previous_page: Previous page
|
||||||
|
next_page: Next page
|
||||||
|
copy: Copy
|
||||||
|
move: Move
|
||||||
|
checked_messages: checked messages
|
||||||
|
to: to
|
||||||
|
to_folder: folder
|
||||||
|
set_read: Set read
|
||||||
|
set_unread: Set unread
|
||||||
|
search: Search
|
||||||
|
in_message_field: in message field
|
||||||
|
string: string
|
||||||
|
total_messages: Total messages
|
||||||
|
no_messages_in: No messages in folder
|
||||||
|
no_subject: No subject
|
||||||
|
no_messages_selected: No messages selected
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,77 +1,122 @@
|
||||||
pl:
|
pl:
|
||||||
mailr: Mailr
|
activerecord:
|
||||||
email: E-mail
|
errors:
|
||||||
password: Hasło
|
messages:
|
||||||
log_in: Zaloguj
|
blank: "nie może być pust(a/e/y) "
|
||||||
wrong_email_or_password: Podano nieprawidłowy login lub hasło
|
too_short: "za krótki(e) (min. %{count} znak(i/ów)) "
|
||||||
mailbox: Poczta
|
too_long: "za długi(e) (max. %{count} znak(i/ów)) "
|
||||||
folders: Foldery
|
invalid: "ma niepoprawny format "
|
||||||
folder: Folder
|
not_unique: "musi być unikalny "
|
||||||
empty: Opróżnij
|
taken: "musi być unikalny"
|
||||||
logout: Wyloguj
|
models:
|
||||||
compose: Nowa wiadomość
|
contact: Kontakt
|
||||||
preferences: Ustawienia
|
attributes:
|
||||||
filters: Filtry
|
contact:
|
||||||
contacts: Kontakty
|
nick: Pseudonim
|
||||||
search: Szukaj
|
first_name: Imię
|
||||||
search_txt: ciąg znaków
|
last_name: Nazwisko
|
||||||
refresh: Odśwież
|
email: E-mail
|
||||||
operations: Akcje
|
info: Informacje dodatkowe
|
||||||
operations_txt: Akcje na zaznaczonych wiadomościach
|
prefs:
|
||||||
delete: Usuń
|
theme: Temat
|
||||||
copy: Skopiuj
|
locale: Ustawienia językowe
|
||||||
move: Przenieś
|
msgs_per_page: Ilość wiadomości wyświetlanych na stronie
|
||||||
mark_read: Zaznacz jako przeczytane
|
msg_send_type: Format wysyłanej wiadomości
|
||||||
mark_unread: Zaznacz jako nieprzeczytane
|
message:
|
||||||
destination_txt: Miejsce docelowe dla akcji
|
from_addr: Od
|
||||||
for: ciągu znaków
|
to_addr: Do
|
||||||
to: Do
|
subject: Temat
|
||||||
subject: Temat
|
size: Rozmiar
|
||||||
date: Data
|
date: Data
|
||||||
size: Rozmiar
|
user:
|
||||||
from: Od
|
email: E-mail
|
||||||
show_all: Pokaż wszystkie
|
password: Hasło
|
||||||
pages: Strony
|
first_name: Imię
|
||||||
first: Pierwsza
|
last_name: Nazwisko
|
||||||
prev: Poprzednia
|
server:
|
||||||
next: Następna
|
name: Nazwa serwera
|
||||||
last: Ostatnia
|
|
||||||
back_to_list: Powrót do listy
|
contact:
|
||||||
back_to_message: Powrót do wiadomości
|
compose_to_selected: Napisz do wybranych
|
||||||
reply: Odpowiedz
|
delete_selected: Usuń wybrane
|
||||||
forward: Przekaż
|
modifying: Modyfikacja kontaktu
|
||||||
delete: Usuń
|
creating_new: Tworzenie nowego kontaktu
|
||||||
view_source: Pokaż źródło
|
create_new: Utwórz nowy kontakt
|
||||||
add_filter: Dodaj filtr
|
contacts: Kontakty
|
||||||
cc: Cc
|
contact: Kontakt
|
||||||
bcc: Bcc
|
no_selected: Nie wybrano żadnego kontaktu
|
||||||
send: Wyślij
|
total_entries: Liczba kontaktów
|
||||||
choose_address: Wybierz adres z kontaktów
|
no_entries: Brak kontaktów
|
||||||
compose_txt: Utwórz nową wiadomość
|
was_created: Kontakt został utworzony
|
||||||
attachment: Załącznik
|
are_you_sure_to_delete_contact: Czy na pewno chcesz usunąć kontakt?
|
||||||
add: Dodaj
|
|
||||||
first_name: Imię
|
prefs:
|
||||||
last_name: Nazwisko
|
prefs: Ustawienia
|
||||||
send_type: Format wiadomości wychodzącej
|
|
||||||
messages_per_page: Ilość wiadomości na stronie
|
folder:
|
||||||
check_external_mail: Check external mail?
|
folders: Foldery
|
||||||
check_external_mail_txt: Note that by selecting this option webmail system will try to log you using your original email on a local server.
|
no_shown: Żadnych pokazanych folderów
|
||||||
save: Zapisz
|
parent: Folder nadrzędny
|
||||||
cancel: Anuluj
|
to_create: Folder do utworzenia
|
||||||
add_one_contact: Dodaj jeden kontakt
|
to_delete: Folder do usunięcia
|
||||||
add_multiple: Dodaj wiele
|
shown: Foldery pokazane
|
||||||
name: Nazwa
|
emptybin: Opróżnij
|
||||||
add_folder: Dodaj folder
|
current: Folder bieżący
|
||||||
total_messages: Total messages
|
no_selected: Nie wybrano żadnego folderu
|
||||||
unseen: Unseen
|
to_create_empty: Nie podano nazwy folderu
|
||||||
add_edit_folder: Zarządzaj
|
max_depth: Osiągnięto maksymalne zagnieżdzenie fodlderów
|
||||||
user_logged_out: Użytkownik został wylogowany
|
can_not_create: Nie można utworzyć folderu
|
||||||
please_login: Logowanie
|
was_created: Folder został utworzony
|
||||||
add_to_contacts: Dodaj do kontaktów
|
to_delete_empty: Nie wybrano folderu do usunięcia
|
||||||
want_to_empty_trash_message: Czy chcesz opróznic kosz?
|
can_not_delete: Nie można usunąć folderu
|
||||||
site_link: https://github.com/lmanolov/mailr
|
was_deleted: Folder został usunięty
|
||||||
marked_messages: zaznaczone wiadomości
|
to_folder: do folderu
|
||||||
to_folder: do folderu
|
|
||||||
message_field: Pole wiadomości
|
message:
|
||||||
no_messages_found: Nie znaleziono żadnych wiadomości
|
messages: Wiadomości
|
||||||
|
no_selected: Nie wybrano żadnej wiadomości
|
||||||
|
total: Liczba wszystkich wiadomości
|
||||||
|
checked: zaznaczone wiadomości
|
||||||
|
set_read: Ustaw jako przeczytane
|
||||||
|
set_unread: Ustaw jako nieprzeczytane
|
||||||
|
no_in: Nie ma żadnych wiadomości w bieżącym folderze
|
||||||
|
no_subject: Brak tematu
|
||||||
|
|
||||||
|
compose:
|
||||||
|
compose: Nowa wiadomość
|
||||||
|
|
||||||
|
user:
|
||||||
|
login_failure: Nieudane logowanie. Podano błędny e-mail lub hasło.
|
||||||
|
logged_out: Użytkownik wylogowany
|
||||||
|
setup_done: Konfiguracja zakończona. Proszę się zalogować.
|
||||||
|
please_login: Logowanie
|
||||||
|
unknown_title: Nieznany użytkownik
|
||||||
|
unknown_flash: Twój identyfikator użytkownika nie został odnaleziony w bazie
|
||||||
|
unknown_login: Idź do strony logowania i zaloguj sie jeszcze raz
|
||||||
|
unknown_setup: Idź do strony konfiguracyjnej i skonfiguruj swój dostęp
|
||||||
|
setup: Konfiguracja
|
||||||
|
login: Logowanie
|
||||||
|
|
||||||
|
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
|
||||||
|
imap_error: Błąd protokołu IMAP
|
||||||
|
unspecified_error: Nieoczekiwany błąd
|
||||||
|
page_not_found: Nie znaleziono żadanej strony
|
||||||
|
copy: Skopiuj
|
||||||
|
move: Przenieś
|
||||||
|
to: do
|
||||||
|
previous_page: Poprzednia
|
||||||
|
next_page: Następna
|
||||||
|
bytes: B
|
||||||
|
kbytes: kB
|
||||||
|
mbytes: MB
|
||||||
|
site_link: https://github.com/lmanolov/mailr
|
||||||
|
send: Wyślij
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
Mailr::Application.routes.draw do
|
Mailr::Application.routes.draw do
|
||||||
|
|
||||||
get "prefs/index"
|
match "prefs/index" => "prefs#index", :as => :prefs
|
||||||
|
post "prefs/update"
|
||||||
|
|
||||||
get "contacts/index"
|
resources :contacts
|
||||||
|
post "contacts/ops"
|
||||||
|
|
||||||
|
|
||||||
|
#resources :folders
|
||||||
get "folders/index"
|
get "folders/index"
|
||||||
post "folders/create"
|
post "folders/create"
|
||||||
post "folders/delete"
|
post "folders/delete"
|
||||||
|
@ -18,11 +22,12 @@ Mailr::Application.routes.draw do
|
||||||
root :to => "messages#index"
|
root :to => "messages#index"
|
||||||
get "messages/index"
|
get "messages/index"
|
||||||
get "messages/refresh"
|
get "messages/refresh"
|
||||||
match 'messages/folder/:id' => 'messages#folder'
|
match 'messages/folder/:id' => 'messages#folder', :as => :messages_folder
|
||||||
post "messages/ops"
|
post "messages/ops"
|
||||||
get "messages/compose"
|
get "messages/compose"
|
||||||
get "messages/refresh"
|
get "messages/refresh"
|
||||||
match "messages/show/:id" => 'messages#show'
|
match "messages/show/:id" => 'messages#show'
|
||||||
|
get "messages/emptybin"
|
||||||
|
|
||||||
get "user/logout"
|
get "user/logout"
|
||||||
post "user/authenticate"
|
post "user/authenticate"
|
||||||
|
|
9
db/migrate/20110803115924_rename_m_essages_in_folder.rb
Executable file
9
db/migrate/20110803115924_rename_m_essages_in_folder.rb
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
class RenameMEssagesInFolder < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
rename_column :folders,:messages,:total
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
rename_column :folders,:total,:messages
|
||||||
|
end
|
||||||
|
end
|
9
db/migrate/20110804130051_rename_unseen_in_message.rb
Executable file
9
db/migrate/20110804130051_rename_unseen_in_message.rb
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
class RenameUnseenInMessage < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
rename_column :messages, :unread, :unseen
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
rename_column :messages, :unseen, :unread
|
||||||
|
end
|
||||||
|
end
|
17
db/migrate/20110810073021_create_contacts.rb
Executable file
17
db/migrate/20110810073021_create_contacts.rb
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
class CreateContacts < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
create_table :contacts do |t|
|
||||||
|
t.string :nick
|
||||||
|
t.string :email
|
||||||
|
t.string :first_name
|
||||||
|
t.string :last_name
|
||||||
|
t.string :info
|
||||||
|
t.references :user
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
drop_table :contacts
|
||||||
|
end
|
||||||
|
end
|
11
db/migrate/20110816093648_rename_from_column_in_messages.rb
Executable file
11
db/migrate/20110816093648_rename_from_column_in_messages.rb
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
class RenameFromColumnInMessages < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
rename_column :messages, :from, :from_addr
|
||||||
|
rename_column :messages, :to, :to_addr
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
rename_column :messages, :from_addr, :from
|
||||||
|
rename_column :messages, :to_addr, :to
|
||||||
|
end
|
||||||
|
end
|
9
db/migrate/20110816120258_remove_msgs_update_from_messages.rb
Executable file
9
db/migrate/20110816120258_remove_msgs_update_from_messages.rb
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
class RemoveMsgsUpdateFromMessages < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
remove_column :folders, :msgs_updated_at
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
add_column :folders, :msgs_updated_at, :datetime
|
||||||
|
end
|
||||||
|
end
|
22
db/schema.rb
22
db/schema.rb
|
@ -10,19 +10,29 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20110731185416) do
|
ActiveRecord::Schema.define(:version => 20110816120258) do
|
||||||
|
|
||||||
|
create_table "contacts", :force => true do |t|
|
||||||
|
t.string "nick"
|
||||||
|
t.string "email"
|
||||||
|
t.string "first_name"
|
||||||
|
t.string "last_name"
|
||||||
|
t.string "info"
|
||||||
|
t.integer "user_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "folders", :force => true do |t|
|
create_table "folders", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.string "delim"
|
t.string "delim"
|
||||||
t.boolean "haschildren"
|
t.boolean "haschildren"
|
||||||
t.integer "messages"
|
t.integer "total"
|
||||||
t.integer "unseen"
|
t.integer "unseen"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.string "parent"
|
t.string "parent"
|
||||||
t.datetime "msgs_updated_at"
|
|
||||||
t.boolean "shown"
|
t.boolean "shown"
|
||||||
t.string "alter_name"
|
t.string "alter_name"
|
||||||
end
|
end
|
||||||
|
@ -31,13 +41,13 @@ ActiveRecord::Schema.define(:version => 20110731185416) do
|
||||||
t.integer "folder_id"
|
t.integer "folder_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.string "msg_id"
|
t.string "msg_id"
|
||||||
t.string "from"
|
t.string "from_addr"
|
||||||
t.string "to"
|
t.string "to_addr"
|
||||||
t.string "subject"
|
t.string "subject"
|
||||||
t.string "content_type"
|
t.string "content_type"
|
||||||
t.integer "uid"
|
t.integer "uid"
|
||||||
t.integer "size"
|
t.integer "size"
|
||||||
t.boolean "unread"
|
t.boolean "unseen"
|
||||||
t.datetime "date"
|
t.datetime "date"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
|
|
@ -9,11 +9,11 @@ end
|
||||||
class IMAPMailbox
|
class IMAPMailbox
|
||||||
|
|
||||||
attr_reader :connected
|
attr_reader :connected
|
||||||
attr_accessor :selected_folder
|
attr_accessor :sfolder
|
||||||
attr_accessor :logger
|
attr_accessor :logger
|
||||||
|
|
||||||
def initialize(logger)
|
def initialize(logger)
|
||||||
@selected_folder = ''
|
@sfolder = ''
|
||||||
@folders = {}
|
@folders = {}
|
||||||
@connected = false
|
@connected = false
|
||||||
@logger = logger
|
@logger = logger
|
||||||
|
@ -80,6 +80,19 @@ class IMAPMailbox
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def fetch_uids
|
||||||
|
begin
|
||||||
|
uids = []
|
||||||
|
imap_uids = @imap.fetch(1..-1, "UID")
|
||||||
|
imap_uids.each do |u|
|
||||||
|
uids << u.attr['UID']
|
||||||
|
end
|
||||||
|
return uids
|
||||||
|
rescue Exception => e
|
||||||
|
raise e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def delete_folder(name)
|
def delete_folder(name)
|
||||||
begin
|
begin
|
||||||
@imap.delete(Net::IMAP.decode_utf7(name))
|
@imap.delete(Net::IMAP.decode_utf7(name))
|
||||||
|
@ -88,18 +101,16 @@ class IMAPMailbox
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch(folder_name,range,attribs)
|
def fetch(range,attribs)
|
||||||
begin
|
begin
|
||||||
set_folder(folder_name)
|
|
||||||
@imap.fetch(range,attribs)
|
@imap.fetch(range,attribs)
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
raise e
|
raise e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def uid_fetch(folder_name,range,attribs)
|
def uid_fetch(range,attribs)
|
||||||
begin
|
begin
|
||||||
set_folder(folder_name)
|
|
||||||
@imap.uid_fetch(range,attribs)
|
@imap.uid_fetch(range,attribs)
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
raise e
|
raise e
|
||||||
|
@ -107,18 +118,79 @@ class IMAPMailbox
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_folder(folder_name)
|
def set_folder(folder_name)
|
||||||
if folder_name.downcase != @selected_folder.downcase
|
begin
|
||||||
@imap.select(folder_name)
|
if folder_name != @sfolder
|
||||||
@selected_folder = folder_name
|
@imap.select(folder_name)
|
||||||
|
@sfolder = folder_name
|
||||||
|
end
|
||||||
|
rescue Exception => e
|
||||||
|
raise e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def status(folder_name)
|
def status
|
||||||
@imap.status(folder_name, ["MESSAGES", "RECENT", "UNSEEN"])
|
begin
|
||||||
|
@imap.status(@sfolder, ["MESSAGES", "RECENT", "UNSEEN"])
|
||||||
|
rescue Exception => e
|
||||||
|
raise e
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_body(folder_name,uid)
|
def fetch_body(uid)
|
||||||
uid_fetch(folder_name,uid,"BODY[]").first.attr["BODY[]"]
|
begin
|
||||||
|
uid_fetch(uid,"BODY[]").first.attr["BODY[]"]
|
||||||
|
rescue Exception => e
|
||||||
|
raise e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def delete_message(uid)
|
||||||
|
begin
|
||||||
|
@imap.uid_store(uid.to_i, "+FLAGS", :Deleted)
|
||||||
|
rescue Exception => e
|
||||||
|
raise e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def expunge
|
||||||
|
begin
|
||||||
|
@imap.expunge
|
||||||
|
rescue Exception => e
|
||||||
|
raise e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def set_read(uid)
|
||||||
|
begin
|
||||||
|
@imap.uid_store(uid.to_i, "+FLAGS", :Seen)
|
||||||
|
rescue Exception => e
|
||||||
|
raise e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def set_unread(uid)
|
||||||
|
begin
|
||||||
|
@imap.uid_store(uid.to_i, "-FLAGS", :Seen)
|
||||||
|
rescue Exception => e
|
||||||
|
raise e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def copy_message(uid,dest_folder)
|
||||||
|
begin
|
||||||
|
@imap.uid_copy(uid.to_i, dest_folder)
|
||||||
|
rescue Exception => e
|
||||||
|
raise e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def move_message(uid,dest_folder)
|
||||||
|
begin
|
||||||
|
copy_message(uid,dest_folder)
|
||||||
|
delete_message(uid)
|
||||||
|
rescue Exception => e
|
||||||
|
raise e
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -43,5 +43,42 @@ class IMAPAddress
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class IMAPMessage
|
||||||
|
|
||||||
|
@@fetch_attr = ['ENVELOPE','BODYSTRUCTURE', 'FLAGS', 'UID', 'RFC822.SIZE']
|
||||||
|
|
||||||
|
attr_accessor :envelope,:uid,:content_type,:size,:unseen,:from,:message_id,:to,:from,:subject,:date
|
||||||
|
|
||||||
|
def initialize
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.fromImap(message)
|
||||||
|
m = IMAPMessage.new
|
||||||
|
envelope = message.attr['ENVELOPE']
|
||||||
|
m.envelope = envelope
|
||||||
|
m.message_id = envelope.message_id
|
||||||
|
m.to = envelope.to
|
||||||
|
m.date = envelope.date
|
||||||
|
m.subject = envelope.subject
|
||||||
|
m.uid = message.attr['UID']
|
||||||
|
#content_type = m.attr['BODYSTRUCTURE'].multipart? ? 'multipart' : 'text'
|
||||||
|
m.content_type = message.attr['BODYSTRUCTURE'].media_type.downcase
|
||||||
|
m.size = message.attr['RFC822.SIZE']
|
||||||
|
m.unseen = !(message.attr['FLAGS'].member? :Seen)
|
||||||
|
m.from = IMAPAddress.from_address(envelope.from[0])
|
||||||
|
m
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.fetch_attr
|
||||||
|
@@fetch_attr
|
||||||
|
end
|
||||||
|
|
||||||
|
def from_to_db
|
||||||
|
from.to_db
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -18,4 +18,8 @@ def close_imap_session
|
||||||
@mailbox = nil
|
@mailbox = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def select_imap_folder
|
||||||
|
@mailbox.set_folder(@current_folder.full_name) if not @current_folder.nil?
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
15
test/fixtures/contacts.yml
vendored
Executable file
15
test/fixtures/contacts.yml
vendored
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||||
|
|
||||||
|
one:
|
||||||
|
nick: MyString
|
||||||
|
mail: MyString
|
||||||
|
fname: MyString
|
||||||
|
lname: MyString
|
||||||
|
info: MyString
|
||||||
|
|
||||||
|
two:
|
||||||
|
nick: MyString
|
||||||
|
mail: MyString
|
||||||
|
fname: MyString
|
||||||
|
lname: MyString
|
||||||
|
info: MyString
|
8
test/unit/contact_test.rb
Executable file
8
test/unit/contact_test.rb
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class ContactTest < ActiveSupport::TestCase
|
||||||
|
# Replace this with your real tests.
|
||||||
|
test "the truth" do
|
||||||
|
assert true
|
||||||
|
end
|
||||||
|
end
|
16
themes/olive/javascripts/mailr.js
Executable file
16
themes/olive/javascripts/mailr.js
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
function toggleCheckBoxes(formName){
|
||||||
|
|
||||||
|
// toggle Check Boxes using Prototype Library
|
||||||
|
var form=$(formName);
|
||||||
|
var i=form.getElements('checkbox');
|
||||||
|
i.each(function(item)
|
||||||
|
{
|
||||||
|
item.checked = !item.checked;
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// set our toggle box
|
||||||
|
$('togglechkbox').checked = !$('togglechkbox').checked;
|
||||||
|
|
||||||
|
}
|
|
@ -110,7 +110,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
#main .block .content .inner {
|
#main .block .content .inner {
|
||||||
padding: 0 15px 15px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main .main p.first {
|
#main .main p.first {
|
||||||
|
@ -243,7 +243,7 @@ input.checkbox {
|
||||||
}
|
}
|
||||||
|
|
||||||
.form div.right {
|
.form div.right {
|
||||||
width: 75%;
|
width: 70%;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
a:link, a:visited, a:hover, a:active, h1, h2, h3 { color: #A3AB74; }
|
a:link, a:visited, a:hover, a:active, h1, h2, h3 { color: #A3AB74; }
|
||||||
|
|
||||||
|
#sidebar ul li.selected a { color: #5E634E; }
|
||||||
|
|
||||||
a { -moz-outline: none; }
|
a { -moz-outline: none; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
@ -365,6 +368,79 @@ input,select {
|
||||||
color: grey;
|
color: grey;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.unread td {
|
tr.unseen td {
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.ops {
|
||||||
|
border: 1px solid #DACF77;
|
||||||
|
padding: 5px;
|
||||||
|
margin: 3px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.actions-bar div.header_info {
|
||||||
|
float: left;
|
||||||
|
color: #5E634E;
|
||||||
|
font-size: 22px;
|
||||||
|
margin: 0 10px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.actions-bar div.header_info .other_info {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th a.header {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.navigation {
|
||||||
|
color: #A3AB74;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.folders {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.selected {
|
||||||
|
color: #5E634E;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.param_group {
|
||||||
|
margin: 5px 0;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 3px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.param_group label.label {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.params {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.params div.group {
|
||||||
|
margin-bottom:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.params div.group div.fieldWithErrors label.label {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.params input.text_field, div.params textarea.text_area {
|
||||||
|
width: 100%;
|
||||||
|
border:1px solid #CFCFCF;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.params div.group .description {
|
||||||
|
font-style: italic;
|
||||||
|
color: #8C8C8C;
|
||||||
|
font-size: .9em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.params div.group .fieldWithErrors .error {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
9
themes/olive/views/contacts/_left.html.erb
Executable file
9
themes/olive/views/contacts/_left.html.erb
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
<div class="params">
|
||||||
|
<%= raw form_field(@contact,"nick",nil,"joe"+', '+t(:must_be_unique),@contact.nick) %>
|
||||||
|
<%= raw form_field(@contact,"first_name",nil,"Joe",@contact.first_name) %>
|
||||||
|
<%= raw form_field(@contact,"last_name",nil,"Doe",@contact.last_name) %>
|
||||||
|
<%= 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') %>
|
31
themes/olive/views/contacts/_list.html.erb
Executable file
31
themes/olive/views/contacts/_list.html.erb
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
<%= will_paginate @contacts %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table class="table">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th class="first"><input id="togglechkbox" class="checkbox toggle" type="checkbox" name="allbox" onclick=toggleCheckBoxes(this.form); /></th>
|
||||||
|
<%= raw contacts_table_header %>
|
||||||
|
<th class="last"></th>
|
||||||
|
</tr>
|
||||||
|
<% trclass = :even %>
|
||||||
|
<% @contacts.each do |c| %>
|
||||||
|
<tr class="<%= trclass.to_s %>">
|
||||||
|
<%= render :partial => 'contacts/row', :object => c %>
|
||||||
|
</tr>
|
||||||
|
<% trclass == :even ? trclass = :odd : trclass = :even %>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="actions-bar wat-cf">
|
||||||
|
<%= will_paginate @contacts %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
6
themes/olive/views/contacts/_ops.html.erb
Executable file
6
themes/olive/views/contacts/_ops.html.erb
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
<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')%>
|
||||||
|
</p>
|
||||||
|
</div>
|
1
themes/olive/views/contacts/_right.html.erb
Executable file
1
themes/olive/views/contacts/_right.html.erb
Executable file
|
@ -0,0 +1 @@
|
||||||
|
|
7
themes/olive/views/contacts/_row.html.erb
Executable file
7
themes/olive/views/contacts/_row.html.erb
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
<td><%= check_box_tag "cids[]", row.id %></td>
|
||||||
|
<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 colspan="2" nowrap="nowrap"><%= row.info %></td>
|
||||||
|
|
30
themes/olive/views/contacts/edit.html.erb
Executable file
30
themes/olive/views/contacts/edit.html.erb
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
<% content_for :sidebar do %>
|
||||||
|
<%= render :partial => 'folders/list' %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% content_for :title do %>
|
||||||
|
- <%= t(:contacts,:scope=>:contact) %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="block" id="block-tables">
|
||||||
|
<div class="secondary-navigation">
|
||||||
|
<%= raw main_navigation(:contacts) %>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<div class="inner">
|
||||||
|
<div class="actions-bar wat-cf">
|
||||||
|
<div class="header_info"><%= t(:modifying,:scope=>:contact) %></div>
|
||||||
|
</div>
|
||||||
|
<%= form_for(@contact) do |f| %>
|
||||||
|
<div class="columns wat-cf">
|
||||||
|
<div class="column left">
|
||||||
|
<%= render :partial => 'left' %>
|
||||||
|
</div>
|
||||||
|
<div class="column right">
|
||||||
|
<%= render :partial => 'right' %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -3,7 +3,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% content_for :title do %>
|
<% content_for :title do %>
|
||||||
- <%= t(:contacts) %>
|
- <%= t(:contacts,:scope=>:contact) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="block" id="block-tables">
|
<div class="block" id="block-tables">
|
||||||
|
@ -11,8 +11,19 @@
|
||||||
<%= raw main_navigation(:contacts) %>
|
<%= raw main_navigation(:contacts) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<%= form_tag({:controller=>'messages', :action=>'ops'})%>
|
<%= 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>
|
||||||
|
<% else %>
|
||||||
|
<%= render :partial => 'ops' %>
|
||||||
|
<%= render :partial => 'list' %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
30
themes/olive/views/contacts/new.html.erb
Executable file
30
themes/olive/views/contacts/new.html.erb
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
<% content_for :sidebar do %>
|
||||||
|
<%= render :partial => 'folders/list' %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% content_for :title do %>
|
||||||
|
- <%= t(:contacts,:scope=>:contact) %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="block" id="block-tables">
|
||||||
|
<div class="secondary-navigation">
|
||||||
|
<%= raw main_navigation(:contacts) %>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<div class="inner">
|
||||||
|
<div class="actions-bar wat-cf">
|
||||||
|
<div class="header_info"><%= t(:creating_new,:scope=>:contact) %> </div>
|
||||||
|
</div>
|
||||||
|
<%= form_for(@contact) do |f| %>
|
||||||
|
<div class="columns wat-cf">
|
||||||
|
<div class="column left">
|
||||||
|
<%= render :partial => 'left' %>
|
||||||
|
</div>
|
||||||
|
<div class="column right">
|
||||||
|
<%= render :partial => 'right' %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1,13 +1,13 @@
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h3><%=t (:folders) %> <%= link_to t(:refresh), {:controller => 'messages', :action => 'refresh'}, :class=>'minor' %></h3>
|
<h3><%=t(:folders,:scope=>:folder) %> <%= link_to t(:refresh), messages_refresh_path, :class=>'minor' %></h3>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<% if @folders_shown.size.zero? %>
|
<% if @folders_shown.size.zero? %>
|
||||||
<p><%= t(:no_folders_shown) %></p>
|
<p><%= t(:no_shown,:scope=>:folder) %></p>
|
||||||
<% else %>
|
<% else %>
|
||||||
<ul class="navigation">
|
<ul class="navigation folders">
|
||||||
<% @folders_shown.each do |folder| -%>
|
<% @folders_shown.each do |folder| -%>
|
||||||
<% if folder == @current_folder %>
|
<% if folder == @current_folder %>
|
||||||
<li><b><%= raw folder_link(folder) %></b></li>
|
<li class="selected"><%= raw folder_link(folder) %></li>
|
||||||
<% else %>
|
<% else %>
|
||||||
<li><%= raw folder_link(folder) %></li>
|
<li><%= raw folder_link(folder) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -15,6 +15,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
<br/>
|
<br/>
|
||||||
<%= raw form_button_value(t(:logout),'tick.png',url_for(:controller => :user, :action => :logout)) %>
|
<%= raw form_button_value('logout','tick.png',user_logout_path) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% content_for :title do %>
|
<% content_for :title do %>
|
||||||
- <%= t(:folders) %>
|
- <%= t(:folders,:scope=>:folder) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="block" id="block-tables">
|
<div class="block" id="block-tables">
|
||||||
|
@ -14,23 +14,23 @@
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<div class="columns wat-cf">
|
<div class="columns wat-cf">
|
||||||
<div class="column left">
|
<div class="column left">
|
||||||
<%= form_tag({:controller=>'folders',:action=>'create'},:class=>'form') %>
|
<%= form_tag(folders_create_path,:class=>'form') %>
|
||||||
<%= raw select_for_folders("","parent_folder",@folders,t(:parent_folder),true) %>
|
<%= raw select_for_folders("","parent_folder",@folders,t(:parent,:scope=>:folder),true) %>
|
||||||
<%= raw simple_input_field("folder",t(:folder_to_create),"") %>
|
<%= raw simple_input_field("folder",t(:to_create,:scope=>:folder),"") %>
|
||||||
<%= raw form_button(t(:create),'tick.png') %>
|
<%= raw form_button('create','tick.png') %>
|
||||||
</form>
|
</form>
|
||||||
<%= form_tag({:controller=>'folders',:action=>'delete'},:class=>'form') %>
|
<%= form_tag(folders_delete_path,:class=>'form') %>
|
||||||
<%= raw select_for_folders("","folder",@folders,t(:folder_to_delete),true) %>
|
<%= raw select_for_folders("","folder",@folders,t(:to_delete,:scope=>:folder),true) %>
|
||||||
<%= raw form_button(t(:delete),'cross.png') %>
|
<%= raw form_button('delete','cross.png') %>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="column right">
|
<div class="column right">
|
||||||
<%= form_tag({:controller=>'folders',:action=>'refresh'},:class=>'form') %>
|
<%= form_tag(folders_refresh_path,:class=>'form') %>
|
||||||
<%= raw form_button(t(:refresh_folders),'tick.png') %>
|
<%= raw form_button('refresh','tick.png') %>
|
||||||
</form>
|
</form>
|
||||||
<%= form_tag({:controller=>'folders',:action=>'show_hide'},:class=>'form') %>
|
<%= form_tag(folders_show_hide_path,:class=>'form') %>
|
||||||
<%= raw multi_select("", 'folders_to_show[]', @folders, @folders_shown,t(:folders_shown),:id,"",{:text => [:parent,:delim,:name]}) %>
|
<%= raw multi_select("", 'folders_to_show[]', @folders, @folders_shown,t(:shown,:scope=>:folder),:id,"",{:text => [:parent,:delim,:name]}) %>
|
||||||
<%= raw form_button(t(:show_hide),'tick.png') %>
|
<%= raw form_button('show_hide','tick.png') %>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,6 +13,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
<%=stylesheet_link_tag current_theme_stylesheet_path('style') %>
|
<%=stylesheet_link_tag current_theme_stylesheet_path('style') %>
|
||||||
|
|
||||||
<%=javascript_include_tag :defaults %>
|
<%=javascript_include_tag :defaults %>
|
||||||
|
<%=javascript_include_tag current_theme_javascript_path('mailr') %>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -1,35 +1,30 @@
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
|
||||||
<% WillPaginate::ViewHelpers.pagination_options[:previous_label] = t(:previous_page) %>
|
|
||||||
<% WillPaginate::ViewHelpers.pagination_options[:next_label] = t(:next_page) %>
|
|
||||||
|
|
||||||
<div class="actions-bar wat-cf">
|
<div class="actions-bar wat-cf">
|
||||||
|
<div class="header_info"><%= t(:current,:scope=>:folder) %>: <%= pretty_folder_name(@current_folder) %>
|
||||||
|
<span class="other_info">(<%= t(:total,:scope=>:message) %>: <%= @messages.total_entries %>)</span>
|
||||||
|
</div>
|
||||||
<%= will_paginate @messages %>
|
<%= will_paginate @messages %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form>
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="first"><input class="checkbox toggle" type="checkbox"></th>
|
<th class="first"><input id="togglechkbox" class="checkbox toggle" type="checkbox" name="allbox" onclick=toggleCheckBoxes(this.form); /></th>
|
||||||
<th><%= raw(' ') %></th>
|
<th><%= raw(' ') %></th>
|
||||||
<th><%= t(:from) %></th>
|
<%= raw headers_links %>
|
||||||
<th><%= t(:subject) %></th>
|
|
||||||
<th><%= t(:date) %></th>
|
|
||||||
<th><%= t(:size) %></th>
|
|
||||||
<th class="last"></th>
|
<th class="last"></th>
|
||||||
</tr>
|
</tr>
|
||||||
<% trclass = :even %>
|
<% trclass = :even %>
|
||||||
<% @messages.each do |m| %>
|
<% @messages.each do |m| %>
|
||||||
<% m.unread == true ? unread = "unread" : unread = "" %>
|
<% m.unseen == true ? unseen = "unseen" : unseen = "" %>
|
||||||
<tr class="<%= trclass.to_s %> <%= unread %>">
|
<tr class="<%= trclass.to_s %> <%= unseen %>">
|
||||||
<%= render :partial => 'messages/row', :object => m %>
|
<%= render :partial => 'messages/row', :object => m %>
|
||||||
</tr>
|
</tr>
|
||||||
<% trclass == :even ? trclass = :odd : trclass = :even %>
|
<% trclass == :even ? trclass = :odd : trclass = :even %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
|
||||||
|
|
||||||
<div class="actions-bar wat-cf">
|
<div class="actions-bar wat-cf">
|
||||||
<%= will_paginate @messages %>
|
<%= will_paginate @messages %>
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
<div id="ops">
|
<div id="ops" class="ops">
|
||||||
<p>
|
<p>
|
||||||
<%= submit_tag(t(:copy), :name=> 'op')%>
|
<%= submit_tag(t(:copy), :name=> 'copy')%>
|
||||||
<%= submit_tag(t(:move), :name=>'op')%>
|
<%= submit_tag(t(:move), :name=>'move')%>
|
||||||
<%= t :marked_messages %>
|
<%= t(:checked,:scope=>:message) %>
|
||||||
<%= t :to_folder %>
|
<%= t(:to_folder,:scope=>:folder) %>
|
||||||
<%= raw select_for_folders("","parent_folder",@folders_shown,t(:parent_folder),true) %>
|
<%= raw simple_select_for_folders("","dest_folder",@folders_shown,true) %>
|
||||||
</p>
|
<br/>
|
||||||
<p>
|
<%= submit_tag(t(:delete), :name=>'trash')%>
|
||||||
<%= t :marked_messages %>
|
<%= submit_tag(t(:set_read,:scope=>:message), :name=>'set_read')%>
|
||||||
<%= submit_tag(t(:delete), :name=>'op')%>
|
<%= submit_tag(t(:set_unread,:scope=>:message), :name=>'set_unread')%>
|
||||||
<%= submit_tag(t(:mark_read), :name=>'op')%>
|
<%= t(:checked,:scope=>:message) %>
|
||||||
<%= submit_tag(t(:mark_unread), :name=>'op')%>
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<td><%= check_box_tag "uids[]", row.uid %></td>
|
<td><%= check_box_tag "uids[]", row.uid %></td>
|
||||||
<td><%= attachment_formatter(row) %></td>
|
<td><%= attachment_formatter(row) %></td>
|
||||||
<td nowrap="nowrap"><%= address_formatter(row.from) %></td>
|
<td nowrap="nowrap"><%= address_formatter(row.from_addr) %></td>
|
||||||
<td nowrap="nowrap"><%= subject_formatter(row) %></td>
|
<td nowrap="nowrap"><%= subject_formatter(row) %></td>
|
||||||
<td nowrap="nowrap"><%= date_formatter(row.date) %></td>
|
<td nowrap="nowrap"><%= date_formatter(row.date) %></td>
|
||||||
</td><td nowrap="nowrap"><%= size_formatter(row.size) %></td><td><%= raw(' ') %>
|
</td><td nowrap="nowrap"><%= size_formatter(row.size) %></td><td><%= raw(' ') %>
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
|
<div id="search" class="ops">
|
||||||
<p>
|
<p>
|
||||||
<%= t :message_field %>
|
<%= t(:search) %>
|
||||||
<select name="search_field">
|
<%= t(:in_message_field) %>
|
||||||
<%= options_for_select(CDF::CONFIG[:mail_search_fields], @search_field)%>
|
<select name="search_field"><%= options_for_select($defaults["msg_search_fields"])%></select>
|
||||||
</select> <label for="search_value"> <%= t :search_txt %>
|
<%= t(:string) %>
|
||||||
</label> <input type="text" name="search_value" value="<%=@search_value%>" size='16' id='search_value'/> <%= submit_tag(t(:search), :name=>'op')%> <%= submit_tag(t(:show_all), :name=>'op')%>
|
<input type="text" name="search_value" value="" size='16' id='search_value'/>
|
||||||
|
<%= submit_tag(t(:search), :name=>'search')%>
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% content_for :title do %>
|
<% content_for :title do %>
|
||||||
- <%= t(:compose) %>
|
- <%= t(:compose,:scope=>:compose) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="block" id="block-tables">
|
<div class="block" id="block-tables">
|
||||||
<div class="secondary-navigation">
|
<div class="secondary-navigation">
|
||||||
<%= raw main_navigation(:compose) %>
|
<%= raw main_navigation(:compose) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content"><%= params.inspect %>
|
||||||
<%= form_tag({:controller=>'messages', :action=>'ops'})%>
|
<%= form_tag(messages_ops_path)%>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% content_for :title do %>
|
<% content_for :title do %>
|
||||||
- <%= t(:messages) %>
|
- <%= t(:messages,:scope=>:message) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="block" id="block-tables">
|
<div class="block" id="block-tables">
|
||||||
|
@ -11,22 +11,18 @@
|
||||||
<%= raw main_navigation(:messages) %>
|
<%= raw main_navigation(:messages) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<%= form_tag({:controller=>'messages', :action=>'ops'})%>
|
<%= form_tag({:controller=>'messages', :action=>'ops'},{:name=>'messages'})%>
|
||||||
|
|
||||||
<% #render :partial => 'search' %>
|
|
||||||
<%= render :partial => 'ops' %>
|
|
||||||
|
|
||||||
<%= raw form_button(t(:ops),'tick.png') %>
|
|
||||||
|
|
||||||
<% if @current_folder.nil? %>
|
<% if @current_folder.nil? %>
|
||||||
<h2><%= t(:no_folder_selected) %></h2>
|
<h2><%= t(:no_selected,:scope=>:folder) %></h2>
|
||||||
<% else %>
|
|
||||||
<h2><%= t(:current) %>: <%= pretty_folder_name(@current_folder) %></h2>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if @messages.size.zero? %>
|
<% if @messages.size.zero? %>
|
||||||
<%= t(:no_messages) %>
|
<div class="actions-bar wat-cf">
|
||||||
|
<div class="header_info"><%= t(:no_in,:scope=>:message) %></div>
|
||||||
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
<%= render :partial => 'ops' %>
|
||||||
<%= render :partial => 'list' %>
|
<%= render :partial => 'list' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
8
themes/olive/views/prefs/_left.html.erb
Executable file
8
themes/olive/views/prefs/_left.html.erb
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
<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') %>
|
1
themes/olive/views/prefs/_right.html.erb
Executable file
1
themes/olive/views/prefs/_right.html.erb
Executable file
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% content_for :title do %>
|
<% content_for :title do %>
|
||||||
- <%= t(:preferences) %>
|
- <%= t(:prefs,:scope=>:prefs) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="block" id="block-tables">
|
<div class="block" id="block-tables">
|
||||||
|
@ -11,10 +11,15 @@
|
||||||
<%= raw main_navigation(:prefs) %>
|
<%= raw main_navigation(:prefs) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<%= form_tag({:controller=>'messages', :action=>'ops'})%>
|
<div class="inner"> <%= form_tag(prefs_update_path,:name=>'prefs') %>
|
||||||
|
<div class="columns wat-cf">
|
||||||
|
<div class="column left">
|
||||||
<%= @prefs.inspect %>
|
<%= render :partial => 'prefs/left' %>
|
||||||
|
</div>
|
||||||
|
<div class="column right">
|
||||||
|
<%= render :partial => 'prefs/right' %>
|
||||||
|
</div>
|
||||||
|
</div></form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<% content_for :title do %>
|
<% content_for :title do %>
|
||||||
<%= t(:please_login) %>
|
<%= t(:login,:scope=>:user) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div id="box">
|
<div id="box">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<div id="logo"><a href="/"><img src="<%= current_theme_image_path('logo_small.png')%>" alt="Mailr"/></a>
|
<div id="logo"><a href="/"><img src="<%= current_theme_image_path('logo_small.png')%>" alt="Mailr"/></a>
|
||||||
</div>
|
</div>
|
||||||
<h2><%= t(:please_login) %></h2>
|
<h2><%= t(:login,:scope=>:user) %></h2>
|
||||||
<div class="content login">
|
<div class="content login">
|
||||||
<div class="flash">
|
<div class="flash">
|
||||||
<% if flash[:error] %>
|
<% if flash[:error] %>
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
<form action="<%=url_for(:controller => 'user', :action => 'authenticate')%>" method="post" class="form login">
|
<form action="<%=url_for(:controller => 'user', :action => 'authenticate')%>" method="post" class="form login">
|
||||||
<div class="group wat-cf">
|
<div class="group wat-cf">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<label class="label right"><%= t(:email) %></label>
|
<label class="label right"><%= User.human_attribute_name('email') %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<%= text_field "user", "email" %>
|
<%= text_field "user", "email" %>
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="group wat-cf">
|
<div class="group wat-cf">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<label class="label right"><%= t(:password) %></label>
|
<label class="label right"><%= User.human_attribute_name('password') %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<%= password_field "user", "password" %></td>
|
<%= password_field "user", "password" %></td>
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
<% content_for :title do %>
|
<% content_for :title do %>
|
||||||
<%= t(:setup_title) %>
|
<%= t(:setup,:scope=>:user) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div id="box">
|
<div id="box">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<div id="logo"><a href="/"><img src="<%= current_theme_image_path('logo_small.png')%>" alt="Mailr"/></a>
|
<div id="logo"><a href="/"><img src="<%= current_theme_image_path('logo_small.png')%>" alt="<%= t(:mailr) %>"/></a>
|
||||||
</div>
|
</div>
|
||||||
<h2><%= t(:setup_title) %></h2>
|
<h2><%= t(:setup,:scope=>:user) %></h2>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<form action="<%=url_for(:controller => 'user', :action => 'create')%>" method="post" class="form">
|
<form action="<%=url_for(:controller => 'user', :action => 'create')%>" method="post" class="form">
|
||||||
<%= raw form_field(@user,"email",nil,"joe.doe@domain.domain",params['email']) %>
|
<%= raw form_field(@user,"email",nil,"joe.doe@domain.domain",params[:user].nil? ? params[:email] : params[:user][:email]) %>
|
||||||
<%= raw form_field(@user,"first_name",nil,"Joe","") %>
|
<%= raw form_field(@user,"first_name",nil,"Joe","") %>
|
||||||
<%= raw form_field(@user,"last_name",nil,"Doe","") %>
|
<%= raw form_field(@user,"last_name",nil,"Doe","") %>
|
||||||
<%= raw form_field(@server,"name","server_name","domain.domain","") %>
|
<%= raw form_field(@server,"name",nil,"server.domain","") %>
|
||||||
<%= raw form_button(t(:send),"tick.png") %>
|
<%= raw form_button('send',"tick.png") %>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<% content_for :title do %>
|
<% content_for :title do %>
|
||||||
<%= t(:unknown_user_title) %>
|
<%= t(:unknown_title,:scope=>:user) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div id="box">
|
<div id="box">
|
||||||
<div class="block" id="block-login">
|
<div class="block" id="block-login">
|
||||||
<div id="logo"><a href="/"><img src="<%= current_theme_image_path('logo_small.png')%>" alt="Mailr"/></a>
|
<div id="logo"><a href="/"><img src="<%= current_theme_image_path('logo_small.png')%>" alt="Mailr"/></a>
|
||||||
</div>
|
</div>
|
||||||
<h2><%= t(:unknown_user_title) %></h2>
|
<h2><%= t(:unknown_title,:scope=>:user) %></h2>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="flash"><div class="message warning"><p><%= t(:unknown_user_flash) %></p></div></div>
|
<div class="flash"><div class="message warning"><p><%= t(:unknown_flash,:scope=>:user) %></p></div></div>
|
||||||
<p><%= t(:unknown_user_login) %> -> <%= link_to "Login",:controller => "user",:action =>"login" %></p>
|
<p><%= t(:unknown_login,:scope=>:user) %> -> <%= link_to t(:login,:scope=>:user),user_login_path %></p>
|
||||||
<p><%= t(:unknown_user_setup) %> -> <%= link_to "Setup",:controller => "user",:action => "setup",:email => params['email'] %></p>
|
<p><%= t(:unknown_setup,:scope=>:user) %> -> <%= link_to t(:setup,:scope=>:user),:controller => "user",:action => "setup",:email => params['email'] %></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue