devel
This commit is contained in:
parent
b8eddc8e48
commit
77c8d3e7d7
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
1
Gemfile
1
Gemfile
|
@ -44,3 +44,4 @@ gem "calendar_view"
|
||||||
gem 'bluecloth'
|
gem 'bluecloth'
|
||||||
gem 'sass'
|
gem 'sass'
|
||||||
gem 'haml'
|
gem 'haml'
|
||||||
|
#gem 'twitter_bootstrap_form_for'
|
||||||
|
|
2
Gemfile.lock
Executable file → Normal file
2
Gemfile.lock
Executable file → Normal file
|
@ -31,7 +31,7 @@ GEM
|
||||||
arel (3.0.2)
|
arel (3.0.2)
|
||||||
bluecloth (2.2.0)
|
bluecloth (2.2.0)
|
||||||
builder (3.0.0)
|
builder (3.0.0)
|
||||||
calendar_view (0.0.6)
|
calendar_view (0.0.7)
|
||||||
rails (>= 3.0.0)
|
rails (>= 3.0.0)
|
||||||
coffee-rails (3.2.2)
|
coffee-rails (3.2.2)
|
||||||
coffee-script (>= 2.2.0)
|
coffee-script (>= 2.2.0)
|
||||||
|
|
|
@ -6,34 +6,10 @@ class ContactsController < ApplicationController
|
||||||
|
|
||||||
before_filter :get_contacts, :only => [:index]
|
before_filter :get_contacts, :only => [:index]
|
||||||
|
|
||||||
before_filter :prepare_ops_buttons, :prepare_export_import_buttons,:only => [:index]
|
|
||||||
|
|
||||||
#theme :theme_resolver
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def ops
|
|
||||||
if params["create_new"]
|
|
||||||
redirect_to(new_contact_path)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if !params["cids"]
|
|
||||||
flash[:warning] = t(:no_selected,:scope=>:contact)
|
|
||||||
else
|
|
||||||
if params["delete_selected"]
|
|
||||||
params["cids"].each do |id|
|
|
||||||
@current_user.contacts.find_by_id(id).destroy
|
|
||||||
end
|
|
||||||
elsif params["compose_to_selected"]
|
|
||||||
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
|
#problem http://binary10ve.blogspot.com/2011/05/migrating-to-rails-3-got-stuck-with.html
|
||||||
#def destroy
|
#def destroy
|
||||||
# @current_user.contacts.find(params[:id]).destroy
|
# @current_user.contacts.find(params[:id]).destroy
|
||||||
|
@ -50,6 +26,21 @@ class ContactsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
if params["compose_to_selected"]
|
||||||
|
if params["items_ids"]
|
||||||
|
redirect_to compose_path(:cids => params["items_ids"])
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if params["delete_selected"]
|
||||||
|
if params["items_ids"]
|
||||||
|
params["items_ids"].each do |id|
|
||||||
|
@current_user.contacts.find_by_id(id).destroy
|
||||||
|
end
|
||||||
|
end
|
||||||
|
redirect_to(contacts_path)
|
||||||
|
return
|
||||||
|
end
|
||||||
@contact = @current_user.contacts.build(params[:contact])
|
@contact = @current_user.contacts.build(params[:contact])
|
||||||
if @contact.valid?
|
if @contact.valid?
|
||||||
@contact.save
|
@contact.save
|
||||||
|
@ -69,9 +60,16 @@ class ContactsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def external
|
def import_export
|
||||||
if params["export"]
|
if params["export"]
|
||||||
redirect_to :action => 'export'
|
contacts = @current_user.contacts
|
||||||
|
s = ""
|
||||||
|
contacts.each do |c|
|
||||||
|
s += c.export + "\r\n"
|
||||||
|
end
|
||||||
|
headers['Content-type'] = "text/csv"
|
||||||
|
headers['Content-Disposition'] = %(attachment; filename="contacts.csv")
|
||||||
|
render :text => s
|
||||||
return
|
return
|
||||||
elsif params["import"]
|
elsif params["import"]
|
||||||
begin
|
begin
|
||||||
|
@ -96,34 +94,10 @@ class ContactsController < ApplicationController
|
||||||
redirect_to :action => 'index'
|
redirect_to :action => 'index'
|
||||||
end
|
end
|
||||||
|
|
||||||
def export
|
|
||||||
contacts = @current_user.contacts
|
|
||||||
s = ""
|
|
||||||
contacts.each do |c|
|
|
||||||
s += c.export + "\r\n"
|
|
||||||
end
|
|
||||||
headers['Content-type'] = "text/csv"
|
|
||||||
headers['Content-Disposition'] = %(attachment; filename="contacts.csv")
|
|
||||||
render :text => s
|
|
||||||
end
|
|
||||||
|
|
||||||
####################################### protected section ################################
|
####################################### protected section ################################
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def prepare_ops_buttons
|
|
||||||
@buttons = []
|
|
||||||
@buttons << {:text => 'compose_to_selected',:scope=> 'contact', :image => 'email.png'}
|
|
||||||
@buttons << {:text => 'create_new',:scope=> 'contact', :image => 'plus.png'}
|
|
||||||
@buttons << {:text => 'delete_selected',:scope=>'contact',:image => 'minus.png'}
|
|
||||||
end
|
|
||||||
|
|
||||||
def prepare_export_import_buttons
|
|
||||||
@ei_buttons = []
|
|
||||||
@ei_buttons << {:text => 'import',:scope=>'contact',:image => 'right.png'}
|
|
||||||
@ei_buttons << {:text => 'export',:scope=>'contact',:image => 'left.png'}
|
|
||||||
end
|
|
||||||
|
|
||||||
####################################### private section ##################################
|
####################################### private section ##################################
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -6,39 +6,10 @@ class LinksController < ApplicationController
|
||||||
|
|
||||||
before_filter :get_links, :only => [:index]
|
before_filter :get_links, :only => [:index]
|
||||||
|
|
||||||
before_filter :prepare_ops_buttons, :only => [:index]
|
|
||||||
|
|
||||||
#, :prepare_export_import_buttons,:only => [:index]
|
|
||||||
|
|
||||||
#theme :theme_resolver
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def ops
|
|
||||||
if params["create_new"]
|
|
||||||
redirect_to(new_link_path)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if !params["ids"]
|
|
||||||
flash[:warning] = t(:no_selected,:scope=>:link)
|
|
||||||
else
|
|
||||||
if params["delete_selected"]
|
|
||||||
params["ids"].each do |id|
|
|
||||||
@current_user.links.find_by_id(id).destroy
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
redirect_to(links_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
|
def new
|
||||||
@link = Link.new
|
@link = Link.new
|
||||||
end
|
end
|
||||||
|
@ -49,6 +20,15 @@ class LinksController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
if params["delete_selected"]
|
||||||
|
if params["items_ids"]
|
||||||
|
params["items_ids"].each do |id|
|
||||||
|
@current_user.links.find_by_id(id).destroy
|
||||||
|
end
|
||||||
|
end
|
||||||
|
redirect_to(links_path)
|
||||||
|
return
|
||||||
|
end
|
||||||
@link = @current_user.links.build(params[:link])
|
@link = @current_user.links.build(params[:link])
|
||||||
if @link.valid?
|
if @link.valid?
|
||||||
@link.save
|
@link.save
|
||||||
|
@ -68,9 +48,16 @@ class LinksController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def external
|
def import_export
|
||||||
if params["export"]
|
if params["export"]
|
||||||
redirect_to :action => 'export'
|
links = @current_user.links
|
||||||
|
s = ""
|
||||||
|
links.each do |l|
|
||||||
|
s += l.export + "\r\n"
|
||||||
|
end
|
||||||
|
headers['Content-type'] = "text/csv"
|
||||||
|
headers['Content-Disposition'] = %(attachment; filename="links.csv")
|
||||||
|
render :text => s
|
||||||
return
|
return
|
||||||
elsif params["import"]
|
elsif params["import"]
|
||||||
begin
|
begin
|
||||||
|
@ -82,46 +69,23 @@ class LinksController < ApplicationController
|
||||||
tmp_file.rewind
|
tmp_file.rewind
|
||||||
tmp_file.readlines.each do |line|
|
tmp_file.readlines.each do |line|
|
||||||
next if line =~ /^#/
|
next if line =~ /^#/
|
||||||
Contact.import(@current_user,line)
|
Link.import(@current_user,line)
|
||||||
end
|
end
|
||||||
rescue ActiveRecord::RecordInvalid => e
|
rescue ActiveRecord::RecordInvalid => e
|
||||||
flash[:error] = {:title => e.to_s,:info => e.record.inspect + e.record.errors.inspect}
|
flash[:error] = {:title => e.to_s,:info => e.record.inspect + e.record.errors.inspect}
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
flash[:error] = e.to_s
|
flash[:error] = e.to_s
|
||||||
else
|
else
|
||||||
flash[:success] = t(:were_imported,:scope=>:contact)
|
flash[:success] = t(:were_imported,:scope=>:link)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
redirect_to :action => 'index'
|
redirect_to :action => 'index'
|
||||||
end
|
end
|
||||||
|
|
||||||
def export
|
|
||||||
contacts = @current_user.contacts
|
|
||||||
s = ""
|
|
||||||
contacts.each do |c|
|
|
||||||
s += c.export + "\r\n"
|
|
||||||
end
|
|
||||||
headers['Content-type'] = "text/csv"
|
|
||||||
headers['Content-Disposition'] = %(attachment; filename="contacts.csv")
|
|
||||||
render :text => s
|
|
||||||
end
|
|
||||||
|
|
||||||
####################################### protected section ################################
|
####################################### protected section ################################
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def prepare_ops_buttons
|
|
||||||
@buttons = []
|
|
||||||
@buttons << {:text => 'create_new',:scope=> 'link', :image => 'plus.png'}
|
|
||||||
@buttons << {:text => 'delete_selected',:scope=>'link',:image => 'minus.png'}
|
|
||||||
end
|
|
||||||
|
|
||||||
def prepare_export_import_buttons
|
|
||||||
@ei_buttons = []
|
|
||||||
@ei_buttons << {:text => 'import',:scope=>'link',:image => 'right.png'}
|
|
||||||
@ei_buttons << {:text => 'export',:scope=>'link',:image => 'left.png'}
|
|
||||||
end
|
|
||||||
|
|
||||||
####################################### private section ##################################
|
####################################### private section ##################################
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -103,8 +103,8 @@ class MessagesController < ApplicationController
|
||||||
#@to = mail.To.addrs.presence
|
#@to = mail.To.addrs.presence
|
||||||
@from = @message.from_addr
|
@from = @message.from_addr
|
||||||
@to = @message.to_addr
|
@to = @message.to_addr
|
||||||
@cc = mail.Cc.presence
|
@cc = mail.cc
|
||||||
@bcc = mail.Bcc.presence
|
@bcc = mail.bcc
|
||||||
#@subject = mail.Subject
|
#@subject = mail.Subject
|
||||||
@date = mail.date.presence
|
@date = mail.date.presence
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class MessagesOpsController < ApplicationController
|
||||||
############################################### single #####################################
|
############################################### single #####################################
|
||||||
|
|
||||||
def single
|
def single
|
||||||
if params[:reply]
|
if params[:reply] or params[:reply_all]
|
||||||
reply
|
reply
|
||||||
return
|
return
|
||||||
elsif params[:trash]
|
elsif params[:trash]
|
||||||
|
@ -281,11 +281,19 @@ class MessagesOpsController < ApplicationController
|
||||||
def reply
|
def reply
|
||||||
old_message = @current_user.messages.where('folder_id = ? and uid = ?',@current_folder,params[:uids].first).first
|
old_message = @current_user.messages.where('folder_id = ? and uid = ?',@current_folder,params[:uids].first).first
|
||||||
@message = Message.new
|
@message = Message.new
|
||||||
@message.to_addr = old_message.from_addr
|
#@message.to_addr = old_message.from_addr
|
||||||
@message.subject = old_message.subject
|
#@message.to_addr = old_message.from.first
|
||||||
|
#@message.subject = old_message.subject
|
||||||
|
|
||||||
imap_message = @mailbox.fetch_body(old_message.uid)
|
imap_message = @mailbox.fetch_body(old_message.uid)
|
||||||
mail = Mail.new(imap_message)
|
mail = Mail.new(imap_message)
|
||||||
|
@message.to_addr = mail.from.first
|
||||||
|
@message.subject = mail.subject
|
||||||
|
|
||||||
|
if params[:reply_all]
|
||||||
|
@message.cc_addr = mail.cc.join('; ')
|
||||||
|
end
|
||||||
|
|
||||||
if mail.multipart?
|
if mail.multipart?
|
||||||
@message.body = mail.text_part.nil? ? "" : mail.text_part.decoded_and_charseted.gsub(/<\/?[^>]*>/, "")
|
@message.body = mail.text_part.nil? ? "" : mail.text_part.decoded_and_charseted.gsub(/<\/?[^>]*>/, "")
|
||||||
else
|
else
|
||||||
|
@ -295,6 +303,7 @@ class MessagesOpsController < ApplicationController
|
||||||
@operation = :reply
|
@operation = :reply
|
||||||
render 'messages/compose'
|
render 'messages/compose'
|
||||||
end
|
end
|
||||||
|
|
||||||
###################################### protected section #######################################
|
###################################### protected section #######################################
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
@ -315,6 +324,7 @@ class MessagesOpsController < ApplicationController
|
||||||
@mail.from = @current_user.full_id
|
@mail.from = @current_user.full_id
|
||||||
#TODO check if email address is valid if not get address from contacts
|
#TODO check if email address is valid if not get address from contacts
|
||||||
@mail.to = params[:message][:to_addr]
|
@mail.to = params[:message][:to_addr]
|
||||||
|
@mail.cc = params[:message][:cc_addr]
|
||||||
@mail.body = params[:message][:body]
|
@mail.body = params[:message][:body]
|
||||||
@attachments = Dir.glob(File.join($defaults["msg_upload_dir"],@current_user.username + "*"))
|
@attachments = Dir.glob(File.join($defaults["msg_upload_dir"],@current_user.username + "*"))
|
||||||
@attachments.each do |a|
|
@attachments.each do |a|
|
||||||
|
|
|
@ -327,8 +327,8 @@ module ApplicationHelper
|
||||||
#s
|
#s
|
||||||
#end
|
#end
|
||||||
|
|
||||||
#def boolean_answer(answer)
|
def boolean_answer(answer)
|
||||||
#answer == true ? t(:true_answer,:scope=>:common) : t(:false_answer,:scope=>:common)
|
answer == true ? t(:true_answer,:scope=>:common) : t(:false_answer,:scope=>:common)
|
||||||
#end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,11 +16,12 @@ module MessagesHelper
|
||||||
|
|
||||||
def address_formatter(addr,op)
|
def address_formatter(addr,op)
|
||||||
s = ""
|
s = ""
|
||||||
return s if addr.nil?
|
return t(:no_address,:scope=>:message) if addr.empty?
|
||||||
length = $defaults["msg_address_length"].to_i
|
length = $defaults["msg_address_length"].to_i
|
||||||
|
|
||||||
case op
|
case op
|
||||||
when :index
|
when :index
|
||||||
|
logger.custom('addr',addr)
|
||||||
fs = addr.gsub(/\"/,"").split(/</)
|
fs = addr.gsub(/\"/,"").split(/</)
|
||||||
fs[0].size.zero? ? s = fs[1] : s = fs[0]
|
fs[0].size.zero? ? s = fs[1] : s = fs[0]
|
||||||
s.length >= length ? s = s[0,length]+"..." : s
|
s.length >= length ? s = s[0,length]+"..." : s
|
||||||
|
@ -42,12 +43,19 @@ module MessagesHelper
|
||||||
case op
|
case op
|
||||||
when :reply
|
when :reply
|
||||||
s = "\n\n\n"
|
s = "\n\n\n"
|
||||||
body.gsub(/^\s+/,"").split(/\n/).each do |line|
|
body.split(/\n/).each do |line|
|
||||||
s += ">" + line + "\n"
|
s += '>' + line.strip + "\n"
|
||||||
end
|
end
|
||||||
s
|
s
|
||||||
when :edit
|
when :edit
|
||||||
return body
|
return body
|
||||||
|
when :plain
|
||||||
|
safe_body = h(body)
|
||||||
|
s = ""
|
||||||
|
safe_body.split(/\n/).each do |line|
|
||||||
|
s += line.gsub(/^\s+/,"") + "<br/>"
|
||||||
|
end
|
||||||
|
s.html_safe
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
class Contact < ActiveRecord::Base
|
class Contact < ActiveRecord::Base
|
||||||
|
|
||||||
validates_length_of :nick, :within => 5..15
|
validates_length_of :name, :within => 3..20
|
||||||
validates_length_of :first_name,:last_name, :within => 3..20
|
|
||||||
validates_length_of :email, :within => 5..50
|
validates_length_of :email, :within => 5..50
|
||||||
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
|
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
|
||||||
validates_length_of :info, :maximum => 100
|
validates_length_of :info, :maximum => 100
|
||||||
validate :check_unique_nick, :on => :create
|
validate :check_unique_name, :on => :create
|
||||||
default_scope :order => 'nick ASC'
|
default_scope :order => 'name ASC'
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
||||||
|
@ -22,21 +21,15 @@ class Contact < ActiveRecord::Base
|
||||||
Contact.paginate :page => page , :per_page => $defaults["contacts_per_page"], :conditions=> ['user_id = ?', user.id],:order => order
|
Contact.paginate :page => page , :per_page => $defaults["contacts_per_page"], :conditions=> ['user_id = ?', user.id],:order => order
|
||||||
end
|
end
|
||||||
|
|
||||||
def full_name
|
def check_unique_name
|
||||||
first_name + ' ' + last_name
|
if !Contact.where('upper(name) = ? and user_id = ?',name.upcase,user_id).size.zero?
|
||||||
end
|
errors.add(:name, :not_unique)
|
||||||
|
|
||||||
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
|
end
|
||||||
|
|
||||||
def export
|
def export
|
||||||
fields = []
|
fields = []
|
||||||
fields << nick.presence || ""
|
fields << name || ""
|
||||||
fields << first_name || ""
|
|
||||||
fields << last_name || ""
|
|
||||||
fields << email || ""
|
fields << email || ""
|
||||||
fields << info || ""
|
fields << info || ""
|
||||||
fields.join(';')
|
fields.join(';')
|
||||||
|
@ -44,11 +37,9 @@ class Contact < ActiveRecord::Base
|
||||||
|
|
||||||
def self.import(user,line)
|
def self.import(user,line)
|
||||||
fields = line.split(/;/)
|
fields = line.split(/;/)
|
||||||
contact = user.contacts.build( :nick => fields[0].strip,
|
contact = user.contacts.build( :name => fields[0].strip,
|
||||||
:first_name => fields[1].strip,
|
:email => fields[1].strip,
|
||||||
:last_name => fields[2].strip,
|
:info => fields[2].strip)
|
||||||
:email => fields[3].strip,
|
|
||||||
:info => fields[4].strip)
|
|
||||||
contact.save!
|
contact.save!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
class Link < ActiveRecord::Base
|
class Link < ActiveRecord::Base
|
||||||
validates_length_of :name, :within => 5..30
|
|
||||||
validates_length_of :url, :within => 5..150
|
validates_length_of :url, :within => 5..150
|
||||||
validates_length_of :info, :maximum => 50
|
validates_length_of :info, :maximum => 50
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
@ -16,4 +15,19 @@ class Link < ActiveRecord::Base
|
||||||
|
|
||||||
Link.paginate :page => page , :per_page => $defaults["links_per_page"], :conditions=> ['user_id = ?', user.id],:order => order
|
Link.paginate :page => page , :per_page => $defaults["links_per_page"], :conditions=> ['user_id = ?', user.id],:order => order
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def export
|
||||||
|
fields = []
|
||||||
|
fields << url || ""
|
||||||
|
fields << info || ""
|
||||||
|
fields.join(';')
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.import(user,line)
|
||||||
|
fields = line.split(/;/)
|
||||||
|
contact = user.links.build( :url => fields[0].strip,
|
||||||
|
:info => fields[1].strip)
|
||||||
|
contact.save!
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
8
app/views/common/_anchor.html.haml
Executable file
8
app/views/common/_anchor.html.haml
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
- size ||= "btn-small"
|
||||||
|
- type ||= "btn-primary"
|
||||||
|
- icon ||= ""
|
||||||
|
|
||||||
|
%a{:class=>"btn #{size} #{type}",:href=>"#{href}"}
|
||||||
|
- if !icon.empty?
|
||||||
|
%i{:class=>"#{icon}"}
|
||||||
|
= caption
|
12
app/views/common/_import_export.html.haml
Executable file
12
app/views/common/_import_export.html.haml
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
%form{:enctype=>"multipart/form-data", :class=>"form-horizontal top-pix18",:action=>"#{im_ex_path}",:method=>"post"}
|
||||||
|
= render :partial => "common/file_select", :locals => { :model_label => "#{im_ex_label}",
|
||||||
|
:model_string => "upload",
|
||||||
|
:attr => "datafile"}
|
||||||
|
%p
|
||||||
|
= render :partial => "common/button", :locals => {:name=>'import',
|
||||||
|
:caption=>t('import',:scope=>'contact'),
|
||||||
|
:icon=>'icon-upload icon-white'}
|
||||||
|
- if !im_ex_size.zero?
|
||||||
|
= render :partial => "common/button", :locals => {:name=>'export',
|
||||||
|
:caption=>t('export',:scope=>'contact'),
|
||||||
|
:icon=>'icon-download icon-white'}
|
1
app/views/common/_main_header.html.haml
Executable file
1
app/views/common/_main_header.html.haml
Executable file
|
@ -0,0 +1 @@
|
||||||
|
= calendar_window(:title=>t(:calendar,:scope=>:common))
|
|
@ -7,16 +7,15 @@
|
||||||
|
|
||||||
%ul{:class=>"nav nav-pills"}
|
%ul{:class=>"nav nav-pills"}
|
||||||
%li{:class=>"#{messages}"}
|
%li{:class=>"#{messages}"}
|
||||||
%a{:href=>messages_path}
|
= link_to( t(:messages,:scope=>:message), messages_path )
|
||||||
= t(:messages,:scope=>:message)
|
|
||||||
%li{:class=>"#{compose}"}
|
%li{:class=>"#{compose}"}
|
||||||
= link_to( t(:compose,:scope=>:compose), compose_path )
|
= link_to( t(:compose,:scope=>:compose), compose_path )
|
||||||
%li{:class=>"#{folders}"}
|
%li{:class=>"#{folders}"}
|
||||||
= link_to( t(:folders,:scope=>:folder), folders_path )
|
= link_to( t(:folders,:scope=>:folder), folders_path )
|
||||||
%li{:class=>"#{contacts}"}
|
%li{:class=>"#{contacts}"}
|
||||||
= link_to( t(:contacts,:scope=>:contact), contacts_path )
|
= link_to( t(:contacts,:scope=>:contact), contacts_path )
|
||||||
%li{:class=>"#{prefs}"}
|
|
||||||
= link_to( t(:prefs,:scope=>:prefs), prefs_look_path )
|
|
||||||
%li{:class=>"#{links}"}
|
%li{:class=>"#{links}"}
|
||||||
= link_to( t(:links,:scope=>:link), links_path )
|
= link_to( t(:links,:scope=>:link), links_path )
|
||||||
|
%li{:class=>"#{prefs}"}
|
||||||
|
= link_to( t(:prefs,:scope=>:prefs), prefs_look_path )
|
||||||
|
|
||||||
|
|
11
app/views/common/_prefs_navigation.html.haml
Executable file
11
app/views/common/_prefs_navigation.html.haml
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
- look ||= ""
|
||||||
|
- identity ||= ""
|
||||||
|
- servers ||= ""
|
||||||
|
|
||||||
|
%ul{:class=>"nav nav-pills"}
|
||||||
|
%li{:class=>"#{look}"}
|
||||||
|
= link_to( t(:look,:scope=>:prefs), prefs_look_path )
|
||||||
|
%li{:class=>"#{identity}"}
|
||||||
|
= link_to( t(:identity,:scope=>:prefs), prefs_identity_path )
|
||||||
|
%li{:class=>"#{servers}"}
|
||||||
|
= link_to( t(:servers,:scope=>:prefs), prefs_servers_path )
|
22
app/views/common/_select.html.haml
Executable file
22
app/views/common/_select.html.haml
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
- model = eval(object.class.model_name)
|
||||||
|
- model_string = object.class.model_name.downcase
|
||||||
|
- model_label = model.human_attribute_name(attr)
|
||||||
|
- translation_scope ||= false
|
||||||
|
|
||||||
|
.control-group
|
||||||
|
%label{:class=>"control-label",:for=>"#{attr}"}
|
||||||
|
= model_label
|
||||||
|
.controls
|
||||||
|
- if translation_scope
|
||||||
|
- t = []
|
||||||
|
- choices.each do |c|
|
||||||
|
- t << [t(c.to_sym,:scope=>translation_scope),c.to_s]
|
||||||
|
= select(model_string, attr, options_for_select(t,choice), {:include_blank => blank})
|
||||||
|
- else
|
||||||
|
= select(model_string, attr, options_for_select(choices,choice), {:include_blank => blank})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-# select(model.downcase, attr, options_for_select(choices,choice), {:include_blank => blank})
|
||||||
|
|
18
app/views/contacts/_attrs.html.haml
Executable file
18
app/views/contacts/_attrs.html.haml
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @contact,
|
||||||
|
:attr => 'name',
|
||||||
|
:label => nil,
|
||||||
|
:example => 'Joe Doe',
|
||||||
|
:value => @contact.name,
|
||||||
|
:to_class=>"span6" }
|
||||||
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @contact,
|
||||||
|
:attr => 'email',
|
||||||
|
:label => nil,
|
||||||
|
:example => 'joe.doe@domain.com',
|
||||||
|
:value => @contact.email,
|
||||||
|
:to_class=>"span6" }
|
||||||
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @contact,
|
||||||
|
:attr => 'info',
|
||||||
|
:label => nil,
|
||||||
|
:example => t(:some_add_info,:scope=>:common),
|
||||||
|
:value => @contact.info,
|
||||||
|
:to_class=>"span6" }
|
11
app/views/contacts/_contact.html.haml
Executable file
11
app/views/contacts/_contact.html.haml
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
%tr
|
||||||
|
%td
|
||||||
|
= check_box_tag "items_ids[]", contact.id
|
||||||
|
\/
|
||||||
|
= link_to "<i class=\"icon-edit\"></i>".html_safe,edit_contact_path(contact)
|
||||||
|
%td{:nowrap=>"nowrap"}
|
||||||
|
= link_to contact.name,compose_contact_path(contact.id)
|
||||||
|
%td{:nowrap=>"nowrap"}
|
||||||
|
= link_to contact.email, compose_contact_path(contact.id)
|
||||||
|
%td{:nowrap=>"nowrap"}
|
||||||
|
= contact.info
|
13
app/views/contacts/_list.html.haml
Executable file
13
app/views/contacts/_list.html.haml
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
= will_paginate @contacts
|
||||||
|
|
||||||
|
%table{:class=>"table table-bordered records"}
|
||||||
|
%thead
|
||||||
|
%tr
|
||||||
|
%th
|
||||||
|
%input{:id=>"toggleall",:type=>"checkbox",:name=>"allbox"}
|
||||||
|
= raw contacts_table_header
|
||||||
|
%tbody
|
||||||
|
- @contacts.each do |c|
|
||||||
|
= render :partial => 'contact', :locals => {:contact => c}
|
||||||
|
|
||||||
|
= will_paginate @contacts
|
20
app/views/contacts/edit.html.haml
Executable file
20
app/views/contacts/edit.html.haml
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
= content_for :sidebar do
|
||||||
|
= render :partial => "sidebar/sidebar"
|
||||||
|
|
||||||
|
= content_for :title do
|
||||||
|
\-
|
||||||
|
= t(:contacts,:scope=>:contact)
|
||||||
|
|
||||||
|
= render :partial => 'common/main_navigation', :locals => { :contacts => :active }
|
||||||
|
|
||||||
|
.well{:style=>"padding: 5px 3pt;"}
|
||||||
|
%h3
|
||||||
|
= t(:modifying,:scope=>:contact)
|
||||||
|
|
||||||
|
%form{:class=>"form-horizontal",:action=>url_for(@contact),:method=>"post"}
|
||||||
|
%input{:name=>"_method",:type=>"hidden",:value=>"put"}
|
||||||
|
%fieldset
|
||||||
|
= render :partial => "attrs"
|
||||||
|
.control-group
|
||||||
|
.controls
|
||||||
|
= render :partial => "common/button",:locals => { :name=>:save, :caption => t(:save,:scope=>:common), :icon =>'icon-cog icon-white'}
|
|
@ -6,3 +6,33 @@
|
||||||
= t(:contacts,:scope=>:contact)
|
= t(:contacts,:scope=>:contact)
|
||||||
|
|
||||||
= render :partial => 'common/main_navigation', :locals => { :contacts => :active }
|
= render :partial => 'common/main_navigation', :locals => { :contacts => :active }
|
||||||
|
|
||||||
|
%form{:class=>"form-horizontal top-pix18",:action=>url_for(@contact),:method=>"post"}
|
||||||
|
- if @contacts.size.zero?
|
||||||
|
.alert
|
||||||
|
= t(:no_entries,:scope=>:contact)
|
||||||
|
%p{:class=>"bottom-pix18"}
|
||||||
|
= render :partial => "common/anchor", :locals => {:caption=>t('create_new',:scope=>'contact'),
|
||||||
|
:icon=>'icon-plus icon-white',
|
||||||
|
:href=>new_contact_path}
|
||||||
|
- else
|
||||||
|
.well{:style=>"padding: 5px 3pt;"}
|
||||||
|
%h5
|
||||||
|
= t(:total_entries,:scope=>:contact)
|
||||||
|
\:
|
||||||
|
= @contacts.total_entries
|
||||||
|
%p{:class=>"bottom-pix18"}
|
||||||
|
= render :partial => "common/anchor", :locals => {:caption=>t('create_new',:scope=>'contact'),
|
||||||
|
:icon=>'icon-plus icon-white',
|
||||||
|
:href=>new_contact_path}
|
||||||
|
= render :partial => "common/button", :locals => {:name=>'delete_selected',
|
||||||
|
:caption=>t('delete_selected',:scope=>'contact'),
|
||||||
|
:icon=>'icon-minus icon-white'}
|
||||||
|
= render :partial => "common/button", :locals => {:name=>'compose_to_selected',
|
||||||
|
:caption=>t('compose_to_selected',:scope=>'contact'),
|
||||||
|
:icon=>'icon-envelope icon-white'}
|
||||||
|
= render :partial => 'list'
|
||||||
|
|
||||||
|
= render :partial => 'common/import_export',:locals=>{:im_ex_path => contacts_import_export_path,
|
||||||
|
:im_ex_label => t(:select_file,:scope=>:compose),
|
||||||
|
:im_ex_size => @contacts.total_entries }
|
||||||
|
|
19
app/views/contacts/new.html.haml
Executable file
19
app/views/contacts/new.html.haml
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
= content_for :sidebar do
|
||||||
|
= render :partial => "sidebar/sidebar"
|
||||||
|
|
||||||
|
= content_for :title do
|
||||||
|
\-
|
||||||
|
= t(:contacts,:scope=>:contact)
|
||||||
|
|
||||||
|
= render :partial => 'common/main_navigation', :locals => { :contacts => :active }
|
||||||
|
|
||||||
|
.well{:style=>"padding: 5px 3pt;"}
|
||||||
|
%h3
|
||||||
|
= t(:creating_new,:scope=>:contact)
|
||||||
|
|
||||||
|
%form{:class=>"form-horizontal",:action=>url_for(@contact),:method=>"post"}
|
||||||
|
%fieldset
|
||||||
|
= render :partial => "attrs"
|
||||||
|
.control-group
|
||||||
|
.controls
|
||||||
|
= render :partial => "common/button",:locals => { :name=>:save, :caption => t(:save,:scope=>:common), :icon =>'icon-cog icon-white'}
|
|
@ -2,6 +2,7 @@
|
||||||
= render :partial => "sidebar/sidebar"
|
= render :partial => "sidebar/sidebar"
|
||||||
|
|
||||||
= content_for :title do
|
= content_for :title do
|
||||||
|
\-
|
||||||
= t(:about,:scope=>:internal)
|
= t(:about,:scope=>:internal)
|
||||||
|
|
||||||
= render :partial => 'common/main_navigation', :locals => { :about => :active }
|
= render :partial => 'common/main_navigation', :locals => { :about => :active }
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
- elsif flash[:success]
|
- elsif flash[:success]
|
||||||
.alert.alert-success
|
.alert.alert-success
|
||||||
= flash[:success]
|
= flash[:success]
|
||||||
|
= render :partial => "common/main_header"
|
||||||
= yield
|
= yield
|
||||||
%hr/
|
%hr/
|
||||||
.row
|
.row
|
||||||
|
|
12
app/views/links/_attrs.html.haml
Executable file
12
app/views/links/_attrs.html.haml
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @link,
|
||||||
|
:attr => 'url',
|
||||||
|
:label => nil,
|
||||||
|
:example => 'www.example.com',
|
||||||
|
:value => @link.url,
|
||||||
|
:to_class=>"span6" }
|
||||||
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @link,
|
||||||
|
:attr => 'info',
|
||||||
|
:label => nil,
|
||||||
|
:example => t(:some_add_info,:scope=>:common),
|
||||||
|
:value => @link.info,
|
||||||
|
:to_class=>"span6" }
|
9
app/views/links/_link.html.haml
Executable file
9
app/views/links/_link.html.haml
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
%tr
|
||||||
|
%td
|
||||||
|
= check_box_tag "items_ids[]", link.id
|
||||||
|
\/
|
||||||
|
= link_to "<i class=\"icon-edit\"></i>".html_safe,edit_link_path(link)
|
||||||
|
%td{:nowrap=>"nowrap"}
|
||||||
|
= link_to link.url,"http://"+link.url
|
||||||
|
%td{:nowrap=>"nowrap"}
|
||||||
|
= link.info
|
13
app/views/links/_list.html.haml
Executable file
13
app/views/links/_list.html.haml
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
= will_paginate @links , :class => "custom_pagination bottom-pix18"
|
||||||
|
|
||||||
|
%table{:class=>"table table-bordered records"}
|
||||||
|
%thead
|
||||||
|
%tr
|
||||||
|
%th
|
||||||
|
%input{:id=>"toggleall",:type=>"checkbox",:name=>"allbox"}
|
||||||
|
= raw links_table_header
|
||||||
|
%tbody
|
||||||
|
- @links.each do |l|
|
||||||
|
= render :partial => 'link', :locals => {:link => l}
|
||||||
|
|
||||||
|
= will_paginate @links , :class => "custom_pagination bottom-pix18"
|
20
app/views/links/edit.html.haml
Executable file
20
app/views/links/edit.html.haml
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
= content_for :sidebar do
|
||||||
|
= render :partial => "sidebar/sidebar"
|
||||||
|
|
||||||
|
= content_for :title do
|
||||||
|
\-
|
||||||
|
= t(:links,:scope=>:link)
|
||||||
|
|
||||||
|
= render :partial => 'common/main_navigation', :locals => { :links => :active }
|
||||||
|
|
||||||
|
.well{:style=>"padding: 5px 3pt;"}
|
||||||
|
%h3
|
||||||
|
= t(:modifying,:scope=>:link)
|
||||||
|
|
||||||
|
%form{:class=>"form-horizontal",:action=>url_for(@link),:method=>"post"}
|
||||||
|
%input{:name=>"_method",:type=>"hidden",:value=>"put"}
|
||||||
|
%fieldset
|
||||||
|
= render :partial => "attrs"
|
||||||
|
.control-group
|
||||||
|
.controls
|
||||||
|
= render :partial => "common/button",:locals => { :name=>:save, :caption => t(:save,:scope=>:common), :icon =>'icon-cog icon-white'}
|
|
@ -6,3 +6,28 @@
|
||||||
= t(:links,:scope=>:link)
|
= t(:links,:scope=>:link)
|
||||||
|
|
||||||
= render :partial => 'common/main_navigation', :locals => { :links => :active }
|
= render :partial => 'common/main_navigation', :locals => { :links => :active }
|
||||||
|
|
||||||
|
%form{:class=>"form-horizontal top-pix18",:action=>url_for(@link),:method=>"post"}
|
||||||
|
- if @links.size.zero?
|
||||||
|
.alert
|
||||||
|
= t(:no_entries,:scope=>:link)
|
||||||
|
%p{:class=>"bottom-pix18"}
|
||||||
|
= render :partial => "common/anchor", :locals => {:caption=>t('create_new',:scope=>'link'),
|
||||||
|
:icon=>'icon-plus icon-white',
|
||||||
|
:href=>new_link_path}
|
||||||
|
- else
|
||||||
|
.well{:style=>"padding: 5px 3pt;"}
|
||||||
|
%h5
|
||||||
|
= t(:total_entries,:scope=>:link)
|
||||||
|
\:
|
||||||
|
= @links.total_entries
|
||||||
|
%p{:class=>"bottom-pix18"}
|
||||||
|
= render :partial => "common/anchor", :locals => {:caption=>t('create_new',:scope=>'link'),
|
||||||
|
:icon=>'icon-plus icon-white',
|
||||||
|
:href=>new_link_path}
|
||||||
|
= render :partial => "common/button", :locals => {:name=>'delete_selected',
|
||||||
|
:caption=>t('delete_selected',:scope=>'link'),
|
||||||
|
:icon=>'icon-minus icon-white'}
|
||||||
|
= render :partial => 'list'
|
||||||
|
|
||||||
|
|
||||||
|
|
19
app/views/links/new.html.haml
Executable file
19
app/views/links/new.html.haml
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
= content_for :sidebar do
|
||||||
|
= render :partial => "sidebar/sidebar"
|
||||||
|
|
||||||
|
= content_for :title do
|
||||||
|
\-
|
||||||
|
= t(:links,:scope=>:link)
|
||||||
|
|
||||||
|
= render :partial => 'common/main_navigation', :locals => { :links => :active }
|
||||||
|
|
||||||
|
.well{:style=>"padding: 5px 3pt;"}
|
||||||
|
%h3
|
||||||
|
= t(:create_new,:scope=>:link)
|
||||||
|
|
||||||
|
%form{:class=>"form-horizontal",:action=>url_for(@link),:method=>"post"}
|
||||||
|
%fieldset
|
||||||
|
= render :partial => "attrs"
|
||||||
|
.control-group
|
||||||
|
.controls
|
||||||
|
= render :partial => "common/button",:locals => { :name=>:save, :caption => t(:save,:scope=>:common), :icon =>'icon-cog icon-white'}
|
|
@ -15,13 +15,13 @@
|
||||||
%td{:class=>"field_name"}
|
%td{:class=>"field_name"}
|
||||||
= humanize_attr(@message,'cc_addr') + ':'
|
= humanize_attr(@message,'cc_addr') + ':'
|
||||||
%td
|
%td
|
||||||
"CC jest"
|
= @cc.join('; ')
|
||||||
- if not @bcc.nil?
|
- if not @bcc.nil?
|
||||||
%tr
|
%tr
|
||||||
%td{:class=>"field_name"}
|
%td{:class=>"field_name"}
|
||||||
= humanize_attr(@message,'bcc_addr') + ':'
|
= humanize_attr(@message,'bcc_addr') + ':'
|
||||||
%td
|
%td
|
||||||
"BCC jest"
|
= @bcc.join('; ')
|
||||||
%tr
|
%tr
|
||||||
%td{:class=>"field_name"}
|
%td{:class=>"field_name"}
|
||||||
= humanize_attr(@message,'subject') + ':'
|
= humanize_attr(@message,'subject') + ':'
|
||||||
|
|
22
app/views/messages/_image.html.haml
Executable file
22
app/views/messages/_image.html.haml
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
%li{:class=>"span3"}
|
||||||
|
.thumbnail
|
||||||
|
%a{:href=>"#"}
|
||||||
|
%img{:alt=>image.filename,:src=>attachment_download_path(image.parent_id,image.idx),:size => @current_user.prefs.msg_image_thumbnail_size,:title=>image.filename}
|
||||||
|
.caption
|
||||||
|
%h5
|
||||||
|
= link_to "<i class=\"icon-download-alt\"></i>".html_safe, attachment_download_path(image.parent_id,image.idx)
|
||||||
|
= image.filename
|
||||||
|
%small
|
||||||
|
= size_formatter(image.getSize)
|
||||||
|
|
||||||
|
|
||||||
|
-#
|
||||||
|
<div class="image">
|
||||||
|
<%= image_tag(attachment_download_path(image.parent_id,image.idx), :size => @current_user.prefs.msg_image_thumbnail_size, :alt=>image.filename, :title=>image.filename) %>
|
||||||
|
<div class="desc">
|
||||||
|
<span class="name"><%= link_to (image.filename,attachment_download_path(image.parent_id,image.idx)) %></span>
|
||||||
|
<span class="size"><%= size_formatter(image.getSize) %></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
= link_to "<i class=\"icon-download-alt\"></i>".html_safe, "#"
|
||||||
|
|
3
app/views/messages/_images.html.haml
Executable file
3
app/views/messages/_images.html.haml
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
%ul{:class=>"thumbnails"}
|
||||||
|
- for idx in 0..@images.size-1
|
||||||
|
= render :partial => 'image', :locals => { :image => @images[idx] }
|
|
@ -1,12 +1,3 @@
|
||||||
.well{:style=>"padding: 5px 3pt;"}
|
|
||||||
%h3
|
|
||||||
= t(:current,:scope=>:folder)
|
|
||||||
\:
|
|
||||||
= pretty_folder_name(@current_folder)
|
|
||||||
%h5
|
|
||||||
= t(:total,:scope=>:message)
|
|
||||||
\:
|
|
||||||
= @messages.total_entries
|
|
||||||
|
|
||||||
= will_paginate @messages, :class => "custom_pagination bottom-pix18"
|
= will_paginate @messages, :class => "custom_pagination bottom-pix18"
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
|
|
||||||
= t(:to_folder,:scope=>:folder) + " "
|
= t(:to_folder,:scope=>:folder) + " "
|
||||||
= raw simple_select_for_folders("folder","target",@folders_shown,'',true)
|
= raw simple_select_for_folders("folder","target",@folders_shown,'',true)
|
||||||
%p
|
|
||||||
|
%p{:class=>"bottom-pix18"}
|
||||||
= render :partial => "common/button", :locals => {:name=>'trash',
|
= render :partial => "common/button", :locals => {:name=>'trash',
|
||||||
:caption=>t('trash',:scope=>'message'),
|
:caption=>t('trash',:scope=>'message'),
|
||||||
:icon=>'icon-trash icon-white'}
|
:icon=>'icon-trash icon-white'}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
= t(:to_folder,:scope=>:folder) + " "
|
= t(:to_folder,:scope=>:folder) + " "
|
||||||
= raw simple_select_for_folders("folder","target",@folders_shown,'',true)
|
= raw simple_select_for_folders("folder","target",@folders_shown,'',true)
|
||||||
|
|
||||||
%p
|
%p{:class=>"bottom-pix18"}
|
||||||
= render :partial => "common/button", :locals => {:name=>'show_header',
|
= render :partial => "common/button", :locals => {:name=>'show_header',
|
||||||
:caption=>t('show_header',:scope=>'show'),
|
:caption=>t('show_header',:scope=>'show'),
|
||||||
:icon=>'icon-zoom-in icon-white'}
|
:icon=>'icon-zoom-in icon-white'}
|
||||||
|
@ -19,6 +19,9 @@
|
||||||
= render :partial => "common/button", :locals => {:name=>'reply',
|
= render :partial => "common/button", :locals => {:name=>'reply',
|
||||||
:caption=>t('reply',:scope=>'show'),
|
:caption=>t('reply',:scope=>'show'),
|
||||||
:icon=>'icon-arrow-left icon-white'}
|
:icon=>'icon-arrow-left icon-white'}
|
||||||
|
= render :partial => "common/button", :locals => {:name=>'reply_all',
|
||||||
|
:caption=>t('reply_all',:scope=>'show'),
|
||||||
|
:icon=>'icon-backward icon-white'}
|
||||||
= render :partial => "common/button", :locals => {:name=>'forward',
|
= render :partial => "common/button", :locals => {:name=>'forward',
|
||||||
:caption=>t('forward',:scope=>'show'),
|
:caption=>t('forward',:scope=>'show'),
|
||||||
:icon=>'icon-arrow-right icon-white'}
|
:icon=>'icon-arrow-right icon-white'}
|
||||||
|
|
|
@ -2,17 +2,15 @@
|
||||||
= render :partial => "sidebar/sidebar"
|
= render :partial => "sidebar/sidebar"
|
||||||
|
|
||||||
= content_for :title do
|
= content_for :title do
|
||||||
|
\-
|
||||||
= t(:compose,:scope=>:compose)
|
= t(:compose,:scope=>:compose)
|
||||||
|
|
||||||
= render :partial => 'common/main_navigation', :locals => { :compose => :active }
|
= render :partial => 'common/main_navigation', :locals => { :compose => :active }
|
||||||
|
|
||||||
%form{:enctype=>"multipart/form-data",:class=>"form-horizontal",:action=>composed_path,:method=>"post"}
|
%form{:enctype=>"multipart/form-data",:class=>"form-horizontal",:action=>composed_path,:method=>"post"}
|
||||||
.well{:style=>"padding: 5px 3pt;"}
|
|
||||||
%h3
|
|
||||||
= t(:new_message,:scope=>:compose)
|
|
||||||
%fieldset
|
%fieldset
|
||||||
= render :partial => "common/input_form_desc_field",:locals => {:object => @message,:attr => 'to_addr',:label => nil,:example => 'joe@domain.com',:value => address_formatter(@message.to_addr,@operation),:to_class=>"span6" }
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @message,:attr => 'to_addr',:label => nil,:example => 'joe@domain.com',:value => address_formatter(@message.to_addr,@operation),:to_class=>"span6" }
|
||||||
= render :partial => "common/input_form_desc_field",:locals => {:object => @message,:attr => 'cc_addr',:label => nil,:example => 'joe@domain.com',:value => "",:to_class=>"span6" }
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @message,:attr => 'cc_addr',:label => nil,:example => 'joe@domain.com',:value => address_formatter(@message.cc_addr,@operation),:to_class=>"span6" }
|
||||||
= render :partial => "common/input_form_desc_field",:locals => {:object => @message,:attr => 'subject',:label => nil,:example => t(:subject_of_the_message,:scope=>:compose),:value => subject_formatter(@message.subject,@operation),:to_class=>"span6" }
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @message,:attr => 'subject',:label => nil,:example => t(:subject_of_the_message,:scope=>:compose),:value => subject_formatter(@message.subject,@operation),:to_class=>"span6" }
|
||||||
= render :partial => "common/area_form_desc_field",:locals => {:object => @message,:attr => 'body',:label => nil,:example => t(:write_your_message_here,:scope=>:compose),:value => body_formatter(@message.body,@operation),:to_class=>"span6",:rows=>20 }
|
= render :partial => "common/area_form_desc_field",:locals => {:object => @message,:attr => 'body',:label => nil,:example => t(:write_your_message_here,:scope=>:compose),:value => body_formatter(@message.body,@operation),:to_class=>"span6",:rows=>20 }
|
||||||
- if !@olduid.nil?
|
- if !@olduid.nil?
|
||||||
|
|
|
@ -7,11 +7,21 @@
|
||||||
|
|
||||||
= render :partial => 'common/main_navigation', :locals => { :messages => :active }
|
= render :partial => 'common/main_navigation', :locals => { :messages => :active }
|
||||||
|
|
||||||
|
.well{:style=>"padding: 5px 3pt;"}
|
||||||
|
%h3
|
||||||
|
= t(:current,:scope=>:folder)
|
||||||
|
\:
|
||||||
|
= pretty_folder_name(@current_folder)
|
||||||
|
%h5
|
||||||
|
= t(:total,:scope=>:message)
|
||||||
|
\:
|
||||||
|
= @messages.total_entries
|
||||||
|
|
||||||
|
|
||||||
%form{:class=>"form-horizontal top-pix18",:action=>"#{messages_ops_multi_path}",:method=>"post"}
|
%form{:class=>"form-horizontal top-pix18",:action=>"#{messages_ops_multi_path}",:method=>"post"}
|
||||||
- if @current_folder.nil?
|
- if @current_folder.nil?
|
||||||
.alert
|
.alert
|
||||||
= t(:no_selected,:scope=>:folder)
|
= t(:no_selected,:scope=>:folder)
|
||||||
|
|
||||||
- if @messages.size.zero?
|
- if @messages.size.zero?
|
||||||
.alert
|
.alert
|
||||||
= t(:no_in,:scope=>:message)
|
= t(:no_in,:scope=>:message)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
- if not @attachments.size.zero?
|
- if not @attachments.size.zero?
|
||||||
= render :partial => 'attachments'
|
= render :partial => 'attachments'
|
||||||
- if not @images.size.zero?
|
- if not @images.size.zero?
|
||||||
render :partial => 'images'
|
= render :partial => 'images'
|
||||||
- if not @html_part.nil?
|
- if not @html_part.nil?
|
||||||
= render :partial => 'html_part'
|
= render :partial => 'html_part'
|
||||||
- else
|
- else
|
||||||
|
@ -21,8 +21,8 @@
|
||||||
.alert
|
.alert
|
||||||
= t(:no_content,:scope => :message)
|
= t(:no_content,:scope => :message)
|
||||||
- else
|
- else
|
||||||
%pre
|
.well
|
||||||
= @text_part
|
= body_formatter(@text_part,:plain)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
17
app/views/prefs/_server.html.haml
Executable file
17
app/views/prefs/_server.html.haml
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
%tr
|
||||||
|
%td
|
||||||
|
= check_box_tag "cids[]", server.id
|
||||||
|
%td{:nowrap=>"nowrap"}
|
||||||
|
= server.name
|
||||||
|
%td{:nowrap=>"nowrap"}
|
||||||
|
= server.port
|
||||||
|
%td{:nowrap=>"nowrap"}
|
||||||
|
= boolean_answer(server.use_ssl)
|
||||||
|
%td{:nowrap=>"nowrap"}
|
||||||
|
= boolean_answer(server.use_tls)
|
||||||
|
%td{:nowrap=>"nowrap"}
|
||||||
|
= boolean_answer(server.for_imap)
|
||||||
|
%td{:nowrap=>"nowrap"}
|
||||||
|
= boolean_answer(server.for_smtp)
|
||||||
|
%td{:nowrap=>"nowrap"}
|
||||||
|
= server.auth
|
30
app/views/prefs/identity.html.haml
Executable file
30
app/views/prefs/identity.html.haml
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
= content_for :sidebar do
|
||||||
|
= render :partial => "sidebar/sidebar"
|
||||||
|
|
||||||
|
= content_for :title do
|
||||||
|
\-
|
||||||
|
= t(:identity,:scope=>:prefs)
|
||||||
|
|
||||||
|
= render :partial => 'common/main_navigation', :locals => { :prefs => :active }
|
||||||
|
= render :partial => 'common/prefs_navigation', :locals => { :identity => :active }
|
||||||
|
|
||||||
|
%form{:class=>"form-horizontal",:action=>prefs_update_identity_path,:method=>"post"}
|
||||||
|
%fieldset
|
||||||
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @current_user,
|
||||||
|
:attr => 'first_name',
|
||||||
|
:label => nil,
|
||||||
|
:example => 'Joe',
|
||||||
|
:value => @current_user.first_name }
|
||||||
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @current_user,
|
||||||
|
:attr => 'last_name',
|
||||||
|
:label => nil,
|
||||||
|
:example => 'Doe',
|
||||||
|
:value => @current_user.last_name }
|
||||||
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @current_user,
|
||||||
|
:attr => 'domain',
|
||||||
|
:label => nil,
|
||||||
|
:example => 'domain.com',
|
||||||
|
:value => @current_user.domain }
|
||||||
|
.control-group
|
||||||
|
.controls
|
||||||
|
= render :partial => "common/button",:locals => { :name=>:save, :caption => t(:save,:scope=>:common), :icon =>'icon-cog icon-white'}
|
|
@ -6,3 +6,58 @@
|
||||||
= t(:look,:scope=>:prefs)
|
= t(:look,:scope=>:prefs)
|
||||||
|
|
||||||
= render :partial => 'common/main_navigation', :locals => { :prefs => :active }
|
= render :partial => 'common/main_navigation', :locals => { :prefs => :active }
|
||||||
|
= render :partial => 'common/prefs_navigation', :locals => { :look => :active }
|
||||||
|
|
||||||
|
%form{:class=>"form-horizontal",:action=>prefs_update_look_path,:method=>"post"}
|
||||||
|
%fieldset
|
||||||
|
= render :partial => "common/select",:locals => {:object => @prefs,
|
||||||
|
:attr => 'msgs_per_page',
|
||||||
|
:choices => $defaults["msgs_per_page_table"],
|
||||||
|
:choice => @prefs.msgs_per_page,
|
||||||
|
:blank => false }
|
||||||
|
= render :partial => "common/select",:locals => {:object => @prefs,
|
||||||
|
:attr => 'theme',
|
||||||
|
:choices => $defaults["themes"],
|
||||||
|
:choice => $defaults["themes"],
|
||||||
|
:blank => false }
|
||||||
|
= render :partial => "common/select",:locals => {:object => @prefs,
|
||||||
|
:attr => 'locale',
|
||||||
|
:choices => $defaults["locales"],
|
||||||
|
:choice => @prefs.locale,
|
||||||
|
:blank => false }
|
||||||
|
= render :partial => "common/select",:locals => {:object => @prefs,
|
||||||
|
:attr => 'msg_send_type',
|
||||||
|
:choices => $defaults["msg_send_type"],
|
||||||
|
:choice => @prefs.msg_send_type,
|
||||||
|
:blank => false }
|
||||||
|
= render :partial => "common/select",:locals => {:object => @prefs,
|
||||||
|
:attr => 'msg_image_thumbnail_size',
|
||||||
|
:choices => $defaults["msg_image_thumbnail_size"],
|
||||||
|
:choice => @prefs.msg_image_thumbnail_size,
|
||||||
|
:blank => false,
|
||||||
|
}
|
||||||
|
= render :partial => "common/select",:locals => {:object => @prefs,
|
||||||
|
:attr => 'msg_image_view_as',
|
||||||
|
:choices => $defaults["msg_image_view_as"],
|
||||||
|
:choice => @prefs.msg_image_view_as,
|
||||||
|
:blank => false,
|
||||||
|
:translation_scope => :prefs}
|
||||||
|
.control-group
|
||||||
|
.controls
|
||||||
|
= render :partial => "common/button",:locals => { :name=>:save, :caption => t(:save,:scope=>:common), :icon =>'icon-cog icon-white'}
|
||||||
|
|
||||||
|
-#
|
||||||
|
<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"],$defaults["themes"],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 single_action('save','common','save.png') %>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="params">
|
||||||
|
<%= raw select_field_table_t(@prefs, "msg_image_view_as", $defaults["msg_image_view_as"],@prefs.msg_image_view_as,false) %>
|
||||||
|
<%= raw select_field_table(@prefs, "msg_image_thumbnail_size", $defaults["msg_image_thumbnail_size"],@prefs.msg_image_thumbnail_size,false) %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
18
app/views/prefs/servers.html.haml
Executable file
18
app/views/prefs/servers.html.haml
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
= content_for :sidebar do
|
||||||
|
= render :partial => "sidebar/sidebar"
|
||||||
|
|
||||||
|
= content_for :title do
|
||||||
|
\-
|
||||||
|
= t(:servers,:scope=>:prefs)
|
||||||
|
|
||||||
|
= render :partial => 'common/main_navigation', :locals => { :prefs => :active }
|
||||||
|
= render :partial => 'common/prefs_navigation', :locals => { :servers => :active }
|
||||||
|
|
||||||
|
%table{:class=>"table table-bordered records"}
|
||||||
|
%thead
|
||||||
|
%tr
|
||||||
|
%th
|
||||||
|
= raw servers_table_header
|
||||||
|
%tbody
|
||||||
|
- @servers.each do |s|
|
||||||
|
= render :partial => 'prefs/server', :locals => { :server => s }
|
|
@ -0,0 +1,3 @@
|
||||||
|
= calendar_square(:month_delta=>-1)
|
||||||
|
= calendar_square()
|
||||||
|
= calendar_square(:month_delta=>1)
|
|
@ -2,7 +2,7 @@
|
||||||
\-
|
\-
|
||||||
= t(:login,:scope=>:user)
|
= t(:login,:scope=>:user)
|
||||||
|
|
||||||
%form{:class=>"form-horizontal top-pix18",:action=>"#{url_for(:controller => 'user', :action => 'authenticate')}",:method=>"post"}
|
%form{:class=>"form-horizontal top-pix18",:action=>user_authenticate_path,:method=>"post"}
|
||||||
%fieldset
|
%fieldset
|
||||||
= render :partial => "common/input_form_field",:locals => { :model => 'user',:attr => 'login'}
|
= render :partial => "common/input_form_field",:locals => { :model => 'user',:attr => 'login'}
|
||||||
= render :partial => "common/input_password_form_field",:locals => { :model => 'user',:attr => 'password'}
|
= render :partial => "common/input_password_form_field",:locals => { :model => 'user',:attr => 'password'}
|
||||||
|
@ -12,3 +12,4 @@
|
||||||
%hr/
|
%hr/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ Mailr::Application.configure do
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
|
|
||||||
# Disable Rails's static asset server (Apache or nginx will already do this)
|
# Disable Rails's static asset server (Apache or nginx will already do this)
|
||||||
config.serve_static_assets = false
|
config.serve_static_assets = true
|
||||||
|
|
||||||
# Compress JavaScripts and CSS
|
# Compress JavaScripts and CSS
|
||||||
config.assets.compress = true
|
config.assets.compress = true
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
en:
|
en:
|
||||||
will_paginate:
|
will_paginate:
|
||||||
previous_label: "← Previous"
|
previous_label: "« Previous"
|
||||||
next_label: "Next →"
|
next_label: "Next »"
|
||||||
page_gap: "…"
|
page_gap: "…"
|
||||||
activerecord:
|
activerecord:
|
||||||
attributes:
|
attributes:
|
||||||
|
@ -44,6 +44,10 @@ en:
|
||||||
to_delete_empty: No folder to delete
|
to_delete_empty: No folder to delete
|
||||||
can_not_delete: Can not delete folder
|
can_not_delete: Can not delete folder
|
||||||
was_deleted: Folder was deleted
|
was_deleted: Folder was deleted
|
||||||
|
inbox_name: Inbox
|
||||||
|
sent_name: Sent
|
||||||
|
trash_name: Trash
|
||||||
|
drafts_name: Drafts
|
||||||
|
|
||||||
message:
|
message:
|
||||||
messages: Messages
|
messages: Messages
|
||||||
|
@ -65,3 +69,31 @@ en:
|
||||||
show_hide: Show/Hide
|
show_hide: Show/Hide
|
||||||
mailr: Mailr
|
mailr: Mailr
|
||||||
save: Save
|
save: Save
|
||||||
|
|
||||||
|
common:
|
||||||
|
false_answer: No
|
||||||
|
true_answer: Yes
|
||||||
|
file_format_error: File format error
|
||||||
|
no_tmp_dir: No temporary directory
|
||||||
|
must_be_unique: must be unique
|
||||||
|
some_add_info: some additional info
|
||||||
|
example: "example:"
|
||||||
|
create: Create
|
||||||
|
delete: Delete
|
||||||
|
mailr: MailR
|
||||||
|
save: Save
|
||||||
|
copy: Copy
|
||||||
|
move: Move
|
||||||
|
to: to
|
||||||
|
previous_page: Previous
|
||||||
|
next_page: Next
|
||||||
|
bytes: B
|
||||||
|
kbytes: kB
|
||||||
|
mbytes: MB
|
||||||
|
no_data: No data
|
||||||
|
download: Download
|
||||||
|
view: Show
|
||||||
|
version: Version
|
||||||
|
set: Set
|
||||||
|
no_file_chosen: No file was chosen
|
||||||
|
calendar: Calendar
|
||||||
|
|
|
@ -25,9 +25,9 @@ pl:
|
||||||
link: Sznurek
|
link: Sznurek
|
||||||
attributes:
|
attributes:
|
||||||
link:
|
link:
|
||||||
name: Nazwa
|
|
||||||
url: Adres
|
url: Adres
|
||||||
info: Informacje
|
info: Informacje
|
||||||
|
goto: Idź do
|
||||||
contact:
|
contact:
|
||||||
nick: Pseudonim
|
nick: Pseudonim
|
||||||
first_name: Imię
|
first_name: Imię
|
||||||
|
@ -93,6 +93,10 @@ pl:
|
||||||
no_entries: Brak sznurków
|
no_entries: Brak sznurków
|
||||||
total_entries: Liczba sznurków
|
total_entries: Liczba sznurków
|
||||||
delete_selected: Usuń wybrane
|
delete_selected: Usuń wybrane
|
||||||
|
modifying: Modyfikacja sznurka
|
||||||
|
was_created: Sznurek został utworzony
|
||||||
|
were_imported: Sznurki zostały zaimportowane
|
||||||
|
goto: Idź do
|
||||||
|
|
||||||
prefs:
|
prefs:
|
||||||
prefs: Ustawienia
|
prefs: Ustawienia
|
||||||
|
@ -157,6 +161,7 @@ pl:
|
||||||
copy: Skopiuj
|
copy: Skopiuj
|
||||||
trash: Usuń zaznaczone
|
trash: Usuń zaznaczone
|
||||||
no_date: Brak daty
|
no_date: Brak daty
|
||||||
|
no_address: Brak adresu
|
||||||
|
|
||||||
compose:
|
compose:
|
||||||
compose: Nowa wiadomość
|
compose: Nowa wiadomość
|
||||||
|
@ -175,6 +180,7 @@ pl:
|
||||||
|
|
||||||
show:
|
show:
|
||||||
reply: Odpowiedz
|
reply: Odpowiedz
|
||||||
|
reply_all: Odpowiedz wszystkim
|
||||||
show_header: Pokaż nagłówek
|
show_header: Pokaż nagłówek
|
||||||
delete: Usuń
|
delete: Usuń
|
||||||
reply_string: "Odp: "
|
reply_string: "Odp: "
|
||||||
|
|
|
@ -9,23 +9,20 @@ Mailr::Application.routes.draw do
|
||||||
match "prefs/identity" => "prefs#identity", :as => :prefs_identity
|
match "prefs/identity" => "prefs#identity", :as => :prefs_identity
|
||||||
match "prefs/servers" => "prefs#servers", :as => :prefs_servers
|
match "prefs/servers" => "prefs#servers", :as => :prefs_servers
|
||||||
|
|
||||||
namespace :contacts do
|
|
||||||
post "ops"
|
|
||||||
get "export"
|
|
||||||
end
|
|
||||||
match "/external" => "contacts#external", :as => :contacts_external
|
|
||||||
|
|
||||||
resources :contacts
|
resources :contacts
|
||||||
|
|
||||||
namespace :links do
|
namespace :contacts do
|
||||||
|
post "import_export"
|
||||||
post "ops"
|
post "ops"
|
||||||
get "export"
|
|
||||||
end
|
end
|
||||||
#match "/external" => "contacts#external", :as => :contacts_external
|
|
||||||
|
|
||||||
|
|
||||||
resources :links
|
resources :links
|
||||||
|
|
||||||
|
namespace :links do
|
||||||
|
post "import_export"
|
||||||
|
#post "ops"
|
||||||
|
end
|
||||||
|
|
||||||
namespace :folders do
|
namespace :folders do
|
||||||
post "create"
|
post "create"
|
||||||
post "delete"
|
post "delete"
|
||||||
|
@ -63,6 +60,8 @@ Mailr::Application.routes.draw do
|
||||||
match "/messages/html_body/:id" => 'messages#html_body' , :as => :html_body
|
match "/messages/html_body/:id" => 'messages#html_body' , :as => :html_body
|
||||||
match "/messages/attachment/:id/:idx" => 'messages#attachment', :as => :attachment_download
|
match "/messages/attachment/:id/:idx" => 'messages#attachment', :as => :attachment_download
|
||||||
|
|
||||||
|
match "/user/autheniticate" => 'user#authenticate', :as => :user_authenticate
|
||||||
|
match "/user/setup/:login" => 'user#setup'
|
||||||
namespace :user do
|
namespace :user do
|
||||||
get "logout"
|
get "logout"
|
||||||
post "authenticate"
|
post "authenticate"
|
||||||
|
@ -71,7 +70,8 @@ Mailr::Application.routes.draw do
|
||||||
get "setup"
|
get "setup"
|
||||||
get "unknown"
|
get "unknown"
|
||||||
end
|
end
|
||||||
match "/user/setup/:login" => 'user#setup'
|
|
||||||
|
|
||||||
|
|
||||||
#themes_for_rails
|
#themes_for_rails
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
class CreateAllTables < ActiveRecord::Migration
|
class CreateAllTables < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
create_table "contacts", :force => true do |t|
|
create_table "contacts", :force => true do |t|
|
||||||
t.string "nick"
|
t.string "name"
|
||||||
t.string "email"
|
t.string "email"
|
||||||
t.string "first_name"
|
|
||||||
t.string "last_name"
|
|
||||||
t.string "info"
|
t.string "info"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
|
@ -44,6 +42,8 @@ class CreateAllTables < ActiveRecord::Migration
|
||||||
t.string "msg_id"
|
t.string "msg_id"
|
||||||
t.string "from_addr"
|
t.string "from_addr"
|
||||||
t.string "to_addr"
|
t.string "to_addr"
|
||||||
|
t.string "cc_addr"
|
||||||
|
t.string "bcc_addr"
|
||||||
t.string "subject"
|
t.string "subject"
|
||||||
t.string "content_type"
|
t.string "content_type"
|
||||||
t.integer "uid"
|
t.integer "uid"
|
||||||
|
@ -91,7 +91,6 @@ class CreateAllTables < ActiveRecord::Migration
|
||||||
create_table :links, :force => true do |t|
|
create_table :links, :force => true do |t|
|
||||||
t.integer :user_id
|
t.integer :user_id
|
||||||
t.integer :lgroup_id
|
t.integer :lgroup_id
|
||||||
t.string :name
|
|
||||||
t.string :url
|
t.string :url
|
||||||
t.string :info
|
t.string :info
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
class AddCcAddrToMessages < ActiveRecord::Migration
|
|
||||||
def up
|
|
||||||
add_column :messages,:cc_addr,:string
|
|
||||||
end
|
|
||||||
def down
|
|
||||||
remove_column :messages,:cc_addr
|
|
||||||
end
|
|
||||||
end
|
|
10
db/schema.rb
10
db/schema.rb
|
@ -10,13 +10,11 @@
|
||||||
#
|
#
|
||||||
# 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 => 20120325115720) do
|
ActiveRecord::Schema.define(:version => 20120303202800) do
|
||||||
|
|
||||||
create_table "contacts", :force => true do |t|
|
create_table "contacts", :force => true do |t|
|
||||||
t.string "nick"
|
t.string "name"
|
||||||
t.string "email"
|
t.string "email"
|
||||||
t.string "first_name"
|
|
||||||
t.string "last_name"
|
|
||||||
t.string "info"
|
t.string "info"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
|
@ -53,7 +51,6 @@ ActiveRecord::Schema.define(:version => 20120325115720) do
|
||||||
create_table "links", :force => true do |t|
|
create_table "links", :force => true do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "lgroup_id"
|
t.integer "lgroup_id"
|
||||||
t.string "name"
|
|
||||||
t.string "url"
|
t.string "url"
|
||||||
t.string "info"
|
t.string "info"
|
||||||
end
|
end
|
||||||
|
@ -64,6 +61,8 @@ ActiveRecord::Schema.define(:version => 20120325115720) do
|
||||||
t.string "msg_id"
|
t.string "msg_id"
|
||||||
t.string "from_addr"
|
t.string "from_addr"
|
||||||
t.string "to_addr"
|
t.string "to_addr"
|
||||||
|
t.string "cc_addr"
|
||||||
|
t.string "bcc_addr"
|
||||||
t.string "subject"
|
t.string "subject"
|
||||||
t.string "content_type"
|
t.string "content_type"
|
||||||
t.integer "uid"
|
t.integer "uid"
|
||||||
|
@ -72,7 +71,6 @@ ActiveRecord::Schema.define(:version => 20120325115720) do
|
||||||
t.datetime "date"
|
t.datetime "date"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.string "cc_addr"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "prefs", :force => true do |t|
|
create_table "prefs", :force => true do |t|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace :db do
|
namespace :mailr do
|
||||||
|
|
||||||
desc "Removes all users data from db"
|
desc "Removes all users data from db"
|
||||||
task :remove_all_data => :environment do
|
task :remove_all_data => :environment do
|
||||||
|
|
Loading…
Reference in a new issue