devel cont
This commit is contained in:
parent
0872730d8d
commit
b8eddc8e48
|
@ -37,9 +37,13 @@ p.help-block
|
||||||
|
|
||||||
.custom_pagination
|
.custom_pagination
|
||||||
text-align: right
|
text-align: right
|
||||||
em.current
|
a,span,em
|
||||||
font-weight: bold
|
line-height: 18px
|
||||||
font-size: 16px
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05)
|
||||||
|
margin-bottom: 0
|
||||||
|
margin-left: 0
|
||||||
|
border: 1px solid #DDDDDD
|
||||||
|
padding: 3px
|
||||||
|
|
||||||
table.records
|
table.records
|
||||||
font-size: 12px
|
font-size: 12px
|
||||||
|
|
|
@ -34,7 +34,7 @@ module MessagesHelper
|
||||||
s = h(addr)
|
s = h(addr)
|
||||||
return s
|
return s
|
||||||
when :reply
|
when :reply
|
||||||
return h(addr)
|
return addr
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ class Message < ActiveRecord::Base
|
||||||
|
|
||||||
#set_primary_key :uid
|
#set_primary_key :uid
|
||||||
self.primary_key = :uid
|
self.primary_key = :uid
|
||||||
attr_accessible :unseen, :to_addr, :size, :content_type, :folder_id, :subject, :date, :uid, :from_addr, :user_id, :msg_id, :body,:cc_addr,:bcc_addr
|
attr_accessible :unseen, :to_addr, :size, :content_type, :folder_id, :subject, :date, :uid, :from_addr, :user_id, :msg_id, :body, :cc_addr, :bcc_addr
|
||||||
attr_accessor :body
|
attr_accessor :body
|
||||||
|
|
||||||
def self.addr_to_db(addr)
|
def self.addr_to_db(addr)
|
||||||
|
|
|
@ -11,7 +11,9 @@ class Prefs < ActiveRecord::Base
|
||||||
:theme => $defaults['theme'],
|
:theme => $defaults['theme'],
|
||||||
:locale => $defaults['locale'],
|
:locale => $defaults['locale'],
|
||||||
:msgs_per_page => $defaults['msgs_per_page'],
|
:msgs_per_page => $defaults['msgs_per_page'],
|
||||||
:msg_send_type => $defaults['msg_send_type']
|
:msg_send_type => $defaults['msg_send_type'],
|
||||||
|
:msg_image_view_as => 'attachment',
|
||||||
|
:msg_image_thumbnail_size => '192x144'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
27
app/views/common/_area_form_desc_field.html.haml
Executable file
27
app/views/common/_area_form_desc_field.html.haml
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
- model = eval(object.class.model_name)
|
||||||
|
- model_string = object.class.model_name.downcase
|
||||||
|
- label.nil? ? model_label = model.human_attribute_name(attr) : model_label = t(label.to_sym)
|
||||||
|
- val = value || object.instance_eval(attr) || ""
|
||||||
|
- if object.errors[attr.to_sym].empty?
|
||||||
|
- to_class ||= ""
|
||||||
|
- rows ||= 5
|
||||||
|
.control-group
|
||||||
|
%label{:class=>"control-label",:for=>"#{attr}"}
|
||||||
|
= model_label
|
||||||
|
.controls
|
||||||
|
%textarea{:rows=>"#{rows}",:class=>"#{to_class}",:id=>"#{model_string}_#{attr}",:name=>"#{model_string}[#{attr}]"}
|
||||||
|
= val
|
||||||
|
%p{:class=>"help-block"}
|
||||||
|
= t(:example,:scope=>:common)
|
||||||
|
= example
|
||||||
|
- else
|
||||||
|
.control-group.error
|
||||||
|
%label{:class=>"control-label",:for=>"#{attr}"}
|
||||||
|
= model_label
|
||||||
|
.controls
|
||||||
|
%input{:id=>"#{model_string}_#{attr}",:name=>"#{model_string}[#{attr}]",:value=>"#{val}"}
|
||||||
|
%span{:class=>"help-inline"}
|
||||||
|
= object.errors[attr.to_sym].to_s
|
||||||
|
%p{:class=>"help-block"}
|
||||||
|
= t(:example,:scope=>:common)
|
||||||
|
= example
|
5
app/views/common/_file_select.html.haml
Executable file
5
app/views/common/_file_select.html.haml
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
.control-group
|
||||||
|
%label{:class=>"control-label",:for=>"#{attr}"}
|
||||||
|
= model_label
|
||||||
|
.controls
|
||||||
|
%input{:id=>"#{model_string}_#{attr}",:name=>"#{model_string}[#{attr}]",:type=>"file"}
|
|
@ -3,11 +3,12 @@
|
||||||
- label.nil? ? model_label = model.human_attribute_name(attr) : model_label = t(label.to_sym)
|
- label.nil? ? model_label = model.human_attribute_name(attr) : model_label = t(label.to_sym)
|
||||||
- val = value || object.instance_eval(attr) || ""
|
- val = value || object.instance_eval(attr) || ""
|
||||||
- if object.errors[attr.to_sym].empty?
|
- if object.errors[attr.to_sym].empty?
|
||||||
|
- to_class ||= ""
|
||||||
.control-group
|
.control-group
|
||||||
%label{:class=>"control-label",:for=>"#{attr}"}
|
%label{:class=>"control-label",:for=>"#{attr}"}
|
||||||
= model_label
|
= model_label
|
||||||
.controls
|
.controls
|
||||||
%input{:id=>"#{model_string}_#{attr}",:name=>"#{model_string}[#{attr}]",:value=>"#{val}"}
|
%input{:class=>"#{to_class}",:id=>"#{model_string}_#{attr}",:name=>"#{model_string}[#{attr}]",:value=>"#{val}"}
|
||||||
%p{:class=>"help-block"}
|
%p{:class=>"help-block"}
|
||||||
= t(:example,:scope=>:common)
|
= t(:example,:scope=>:common)
|
||||||
= example
|
= example
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
= render :partial => "common/select_for_folders",:locals => { :label=> t(:parent,:scope=>:folder), :name => "folder", :id => "parent", :collection => @folders, :choice => "", :blank => true}
|
= render :partial => "common/select_for_folders",:locals => { :label=> t(:parent,:scope=>:folder), :name => "folder", :id => "parent", :collection => @folders, :choice => "", :blank => true}
|
||||||
= render :partial => "common/input_form_field",:locals => { :model => 'folder',:attr => 'target'}
|
= render :partial => "common/input_form_field",:locals => { :model => 'folder',:attr => 'target'}
|
||||||
.control-group
|
.control-group
|
||||||
.form-actions
|
.controls
|
||||||
= render :partial => "common/button",:locals => { :name=>:create, :caption => t(:create,:scope=>:common), :icon =>'icon-plus icon-white'}
|
= render :partial => "common/button",:locals => { :name=>:create, :caption => t(:create,:scope=>:common), :icon =>'icon-plus icon-white'}
|
||||||
|
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
%fieldset
|
%fieldset
|
||||||
= render :partial => "common/select_for_folders",:locals => { :label=> t(:to_delete,:scope=>:folder), :name => "folder", :id => "delete", :collection => @folders, :choice => "", :blank => true}
|
= render :partial => "common/select_for_folders",:locals => { :label=> t(:to_delete,:scope=>:folder), :name => "folder", :id => "delete", :collection => @folders, :choice => "", :blank => true}
|
||||||
.control-group
|
.control-group
|
||||||
.form-actions
|
.controls
|
||||||
= render :partial => "common/button",:locals => { :name=>:delete, :caption => t(:delete,:scope=>:common), :icon =>'icon-minus icon-white'}
|
= render :partial => "common/button",:locals => { :name=>:delete, :caption => t(:delete,:scope=>:common), :icon =>'icon-minus icon-white'}
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
.controls
|
.controls
|
||||||
= render :partial=>"common/multiselect",:locals => {:objects => @folders, :selected_objects => @folders_shown,:style=>"",:id=>"multiselect_form",:name=>"folders_to_show[]",:value=>:id,:joiner=>"",:text=>[:parent,:delim,:name]}
|
= render :partial=>"common/multiselect",:locals => {:objects => @folders, :selected_objects => @folders_shown,:style=>"",:id=>"multiselect_form",:name=>"folders_to_show[]",:value=>:id,:joiner=>"",:text=>[:parent,:delim,:name]}
|
||||||
.control-group
|
.control-group
|
||||||
.form-actions
|
.controls
|
||||||
= render :partial => "common/button",:locals => { :name=>:show_hide, :caption => t(:show_hide,:scope=>:folder), :icon =>'icon-eye-open icon-white'}
|
= render :partial => "common/button",:locals => { :name=>:show_hide, :caption => t(:show_hide,:scope=>:folder), :icon =>'icon-eye-open icon-white'}
|
||||||
= render :partial => "common/button",:locals => { :name=>:refresh, :caption => t(:refresh,:scope=>:folder), :icon =>'icon-refresh icon-white'}
|
= render :partial => "common/button",:locals => { :name=>:refresh, :caption => t(:refresh,:scope=>:folder), :icon =>'icon-refresh icon-white'}
|
||||||
|
|
|
@ -5,5 +5,5 @@
|
||||||
= render :partial => "common/select_for_folders",:locals => { :label=> t(:folder,:scope => :folder) + " " + t(:sent_name,:scope=>:folder), :name => "folder", :id => "mailbox_sent", :collection => @folders, :choice => @folder_sent, :blank => true}
|
= render :partial => "common/select_for_folders",:locals => { :label=> t(:folder,:scope => :folder) + " " + t(:sent_name,:scope=>:folder), :name => "folder", :id => "mailbox_sent", :collection => @folders, :choice => @folder_sent, :blank => true}
|
||||||
= render :partial => "common/select_for_folders",:locals => { :label=> t(:folder,:scope => :folder) + " " + t(:drafts_name,:scope=>:folder), :name => "folder", :id => "mailbox_drafts", :collection => @folders, :choice => @folder_drafts, :blank => true}
|
= render :partial => "common/select_for_folders",:locals => { :label=> t(:folder,:scope => :folder) + " " + t(:drafts_name,:scope=>:folder), :name => "folder", :id => "mailbox_drafts", :collection => @folders, :choice => @folder_drafts, :blank => true}
|
||||||
.control-group
|
.control-group
|
||||||
.form-actions
|
.controls
|
||||||
= render :partial => "common/button",:locals => { :name=>:set, :caption => t(:set,:scope=>:common), :icon =>'icon-cog icon-white'}
|
= render :partial => "common/button",:locals => { :name=>:set, :caption => t(:set,:scope=>:common), :icon =>'icon-cog icon-white'}
|
||||||
|
|
10
app/views/messages/_file_attach.html.haml
Executable file
10
app/views/messages/_file_attach.html.haml
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
%tr
|
||||||
|
%td
|
||||||
|
= check_box_tag "files[]", file_attach[:name]
|
||||||
|
%td
|
||||||
|
= file_attach[:name]
|
||||||
|
%td
|
||||||
|
= size_formatter(file_attach[:size])
|
||||||
|
%td
|
||||||
|
|
||||||
|
|
|
@ -6,39 +6,45 @@
|
||||||
|
|
||||||
= render :partial => 'common/main_navigation', :locals => { :compose => :active }
|
= render :partial => 'common/main_navigation', :locals => { :compose => :active }
|
||||||
|
|
||||||
%form{:multipart => 'true',: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;"}
|
.well{:style=>"padding: 5px 3pt;"}
|
||||||
%h3
|
%h3
|
||||||
= t(:new_message,:scope=>:compose)
|
= t(:new_message,:scope=>:compose)
|
||||||
%fieldset
|
%fieldset
|
||||||
= render :partial => "common/input_form_desc_field",:locals => {:object => @user,:attr => 'login',:label => nil,:example => 'joe.doe',:value => params[:user] ? params[:user][:login] : "" }
|
= 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 => '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 }
|
||||||
|
- if !@olduid.nil?
|
||||||
|
= hidden_field_tag 'olduid', @olduid
|
||||||
|
.control-group
|
||||||
|
.controls
|
||||||
|
%h1
|
||||||
|
%small
|
||||||
|
= t(:attachments,:scope=>:message)
|
||||||
|
- if not @attachments.size.zero?
|
||||||
|
%table{:class=>"table table-bordered"}
|
||||||
|
%tbody
|
||||||
|
- @attachments.each do |a|
|
||||||
|
= render :partial => "messages/file_attach", :locals => {:file_attach => a }
|
||||||
|
= render :partial => "common/button", :locals => {:name=>'delete_marked',
|
||||||
|
:caption=>t('delete_marked',:scope=>'compose'),
|
||||||
|
:icon=>'icon-minus icon-white'}
|
||||||
|
= render :partial => "common/file_select", :locals => { :model_label => t(:select_file,:scope=>:compose),
|
||||||
|
:model_string => "file",
|
||||||
|
:attr => "data"}
|
||||||
|
.control-group
|
||||||
|
.controls
|
||||||
|
= render :partial => "common/button", :locals => {:name=>'upload',
|
||||||
|
:caption=>t('upload',:scope=>'compose'),
|
||||||
|
:icon=>'icon-upload icon-white'}
|
||||||
|
.control-group
|
||||||
|
.controls
|
||||||
|
= render :partial => "common/button", :locals => {:name=>'sendout',
|
||||||
|
:caption=>t('sendout',:scope=>'compose'),
|
||||||
|
:icon=>'icon-envelope icon-white'}
|
||||||
|
= render :partial => "common/button", :locals => {:name=>'save',
|
||||||
|
:caption=>t('save',:scope=>'compose'),
|
||||||
|
:icon=>'icon-folder-open icon-white'}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-#
|
|
||||||
<div class="params">
|
|
||||||
<%= raw form_field( @message,
|
|
||||||
"to_addr",
|
|
||||||
nil,
|
|
||||||
"joe@domain.com"+', '+ t(:not_contain_at,:scope=>:compose),
|
|
||||||
address_formatter(@message.to_addr,@operation)
|
|
||||||
) %>
|
|
||||||
<%= raw form_field( @message,
|
|
||||||
"subject",
|
|
||||||
nil,
|
|
||||||
t(:subject_of_the_message,:scope=>:compose),
|
|
||||||
subject_formatter(@message.subject,@operation)
|
|
||||||
) %>
|
|
||||||
<%= raw area_field( @message,
|
|
||||||
"body",
|
|
||||||
nil,
|
|
||||||
t(:write_your_message_here,:scope=>:compose),
|
|
||||||
body_formatter(@message.body,@operation),
|
|
||||||
80,
|
|
||||||
20
|
|
||||||
) %>
|
|
||||||
</div>
|
|
||||||
<% if !@olduid.nil? %>
|
|
||||||
<%= hidden_field_tag 'olduid', @olduid %>
|
|
||||||
<% end %>
|
|
||||||
<%= raw group_action(@buttons) %>
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
= render :partial => 'common/main_navigation', :locals => { :show => :active }
|
= render :partial => 'common/main_navigation', :locals => { :show => :active }
|
||||||
|
|
||||||
%form{:class=>"form-horizontal top-pix18",:action=>"#{messages_ops_multi_path}",:method=>"post"}
|
%form{:class=>"form-horizontal top-pix18",:action=>"#{messages_ops_single_path}",:method=>"post"}
|
||||||
= render :partial => 'header'
|
= render :partial => 'header'
|
||||||
= render :partial => 'single_ops'
|
= render :partial => 'single_ops'
|
||||||
- if not @attachments.size.zero?
|
- if not @attachments.size.zero?
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
pl:
|
pl:
|
||||||
will_paginate:
|
will_paginate:
|
||||||
previous_label: "← Poprzednia"
|
previous_label: "« Poprzednia"
|
||||||
next_label: "Następna →"
|
next_label: "Następna »"
|
||||||
page_gap: "…"
|
page_gap: "…"
|
||||||
date:
|
date:
|
||||||
day_names: [Niedziela, Poniedziałek, Wtorek, Środa, Czwartek, Piątek, Sobota]
|
day_names: [Niedziela, Poniedziałek, Wtorek, Środa, Czwartek, Piątek, Sobota]
|
||||||
|
@ -170,7 +170,7 @@ pl:
|
||||||
select_file: Wybierz plik
|
select_file: Wybierz plik
|
||||||
delete_marked: Usuń zaznaczone
|
delete_marked: Usuń zaznaczone
|
||||||
upload: Wyślij plik
|
upload: Wyślij plik
|
||||||
sendout: Wyślij
|
sendout: Wyślij wiadomość
|
||||||
save: Zapisz w katalogu roboczym
|
save: Zapisz w katalogu roboczym
|
||||||
|
|
||||||
show:
|
show:
|
||||||
|
|
8
db/migrate/20120325115720_add_cc_addr_to_messages.rb
Normal file
8
db/migrate/20120325115720_add_cc_addr_to_messages.rb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
class AddCcAddrToMessages < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
add_column :messages,:cc_addr,:string
|
||||||
|
end
|
||||||
|
def down
|
||||||
|
remove_column :messages,:cc_addr
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# 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 => 20120303202800) do
|
ActiveRecord::Schema.define(:version => 20120325115720) do
|
||||||
|
|
||||||
create_table "contacts", :force => true do |t|
|
create_table "contacts", :force => true do |t|
|
||||||
t.string "nick"
|
t.string "nick"
|
||||||
|
@ -72,6 +72,7 @@ ActiveRecord::Schema.define(:version => 20120303202800) 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|
|
||||||
|
|
Loading…
Reference in a new issue