view cleanup
This commit is contained in:
parent
0daf487816
commit
0872730d8d
|
@ -1,3 +1,5 @@
|
||||||
|
**NOTE** The last stable version is 0.8.6. Now I try to moved code to Rails 3.2.2 and add Boostrap from Tweeter as default theme. Not all sources that you can find in _MASTER_ branch were already moved, so some views can be broken.
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
_MailR_ is a IMAP mail client based on _Ruby on Rails_ platform.
|
_MailR_ is a IMAP mail client based on _Ruby on Rails_ platform.
|
||||||
|
|
||||||
|
|
|
@ -31,3 +31,21 @@ table.header
|
||||||
text-align: right
|
text-align: right
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
padding-right: 10px
|
padding-right: 10px
|
||||||
|
|
||||||
|
p.help-block
|
||||||
|
font-size: 10px
|
||||||
|
|
||||||
|
.custom_pagination
|
||||||
|
text-align: right
|
||||||
|
em.current
|
||||||
|
font-weight: bold
|
||||||
|
font-size: 16px
|
||||||
|
|
||||||
|
table.records
|
||||||
|
font-size: 12px
|
||||||
|
td
|
||||||
|
padding: 4px
|
||||||
|
|
||||||
|
iframe
|
||||||
|
width: 700px
|
||||||
|
height: 800px
|
||||||
|
|
|
@ -90,12 +90,6 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
##################################### private section ##########################################
|
##################################### private section ##########################################
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def plugins_configuration
|
|
||||||
WillPaginate::ViewHelpers.pagination_options[:previous_label] = t(:previous_page,:scope=>:common)
|
|
||||||
WillPaginate::ViewHelpers.pagination_options[:next_label] = t(:next_page,:scope=>:common)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ class UserController < ApplicationController
|
||||||
#@server.user_id = @user.id
|
#@server.user_id = @user.id
|
||||||
#@server.save
|
#@server.save
|
||||||
Prefs.create_default(@user)
|
Prefs.create_default(@user)
|
||||||
Server.create_defaults(@user)
|
Server.create_server(@user,@server.name)
|
||||||
flash[:success] = t(:setup_done,:scope=>:user)
|
flash[:success] = t(:setup_done,:scope=>:user)
|
||||||
redirect_to :action => 'login'
|
redirect_to :action => 'login'
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,19 +1,25 @@
|
||||||
module FolderHelper
|
module FolderHelper
|
||||||
|
|
||||||
def folder_link(folder)
|
def folder_link(options={})
|
||||||
|
|
||||||
|
folder = options[:folder]
|
||||||
|
active = ""
|
||||||
|
if options[:active]
|
||||||
|
active = "icon-white"
|
||||||
|
end
|
||||||
|
|
||||||
folder.parent.empty? ? name = folder.name : name = folder.parent.gsub(/\./,'#') + "#" + folder.name
|
folder.parent.empty? ? name = folder.name : name = folder.parent.gsub(/\./,'#') + "#" + folder.name
|
||||||
|
|
||||||
if folder.isInbox?
|
if folder.isInbox?
|
||||||
name_shown = t(:inbox_name,:scope => :folder)
|
name_shown = "<i class=\"icon-inbox #{active}\"></i>" + t(:inbox_name,:scope => :folder)
|
||||||
elsif folder.isSent?
|
elsif folder.isSent?
|
||||||
name_shown = t(:sent_name,:scope => :folder)
|
name_shown = "<i class=\"icon-plane #{active}\"></i>" + t(:sent_name,:scope => :folder)
|
||||||
elsif folder.isDrafts?
|
elsif folder.isDrafts?
|
||||||
name_shown = t(:drafts_name,:scope => :folder)
|
name_shown = "<i class=\"icon-book #{active}\"></i>" + t(:drafts_name,:scope => :folder)
|
||||||
elsif folder.isTrash?
|
elsif folder.isTrash?
|
||||||
name_shown = t(:trash_name,:scope => :folder)
|
name_shown = "<i class=\"icon-trash #{active}\"></i>" +t(:trash_name,:scope => :folder)
|
||||||
else
|
else
|
||||||
name_shown = folder.name.capitalize
|
name_shown = "<i class=\"icon-none\"></i>" + folder.name.capitalize
|
||||||
end
|
end
|
||||||
|
|
||||||
if folder.isTrash?
|
if folder.isTrash?
|
||||||
|
|
|
@ -98,6 +98,9 @@ module MessagesHelper
|
||||||
html << link_to(Message.human_attribute_name(f), {:controller => 'messages',:action => 'index',:sort_field => f,:sort_dir => dir}, {:class=>"header"})
|
html << link_to(Message.human_attribute_name(f), {:controller => 'messages',:action => 'index',:sort_field => f,:sort_dir => dir}, {:class=>"header"})
|
||||||
html << "</th>"
|
html << "</th>"
|
||||||
end
|
end
|
||||||
|
if @current_folder == @drafts_folder
|
||||||
|
html << "<th> </th>"
|
||||||
|
end
|
||||||
html
|
html
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,13 @@ class Server < ActiveRecord::Base
|
||||||
where(:for_smtp=>true).first
|
where(:for_smtp=>true).first
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.create_defaults(user)
|
def self.create_default(user)
|
||||||
|
create_server(user,"localhost")
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.create_server(user,server)
|
||||||
create( :user_id=>user.id,
|
create( :user_id=>user.id,
|
||||||
:name=>"localhost",
|
:name=>server,
|
||||||
:port=>$defaults['imap_port'],
|
:port=>$defaults['imap_port'],
|
||||||
:use_ssl=>false,
|
:use_ssl=>false,
|
||||||
:use_tls=>false,
|
:use_tls=>false,
|
||||||
|
@ -22,7 +26,7 @@ class Server < ActiveRecord::Base
|
||||||
:for_imap=>true
|
:for_imap=>true
|
||||||
)
|
)
|
||||||
create( :user_id=>user.id,
|
create( :user_id=>user.id,
|
||||||
:name=>"localhost",
|
:name=>server,
|
||||||
:port=>$defaults['smtp_port'],
|
:port=>$defaults['smtp_port'],
|
||||||
:use_ssl=>false,
|
:use_ssl=>false,
|
||||||
:use_tls=>false,
|
:use_tls=>false,
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
- size ||= "btn-small"
|
|
||||||
- type ||= "btn-primary"
|
|
||||||
|
|
||||||
%button{:class=>"btn #{size} #{type}",:type=>"submit",:onclick=>"window.location='#{url}'"}
|
|
||||||
%i{:class=>"#{icon}"}
|
|
||||||
= t(text.to_sym, :scope => scope.to_sym)
|
|
|
@ -1,4 +0,0 @@
|
||||||
.control-group
|
|
||||||
.controls
|
|
||||||
%button{:class=>"btn btn-primary",:type=>"submit"}
|
|
||||||
= text
|
|
|
@ -1,6 +0,0 @@
|
||||||
- size ||= "btn-small"
|
|
||||||
- type ||= "btn-primary"
|
|
||||||
|
|
||||||
%button{:class=>"btn #{size} #{type}",:type=>"submit", :name=>"#{name}"}
|
|
||||||
%i{:class=>"#{icon_class}"}
|
|
||||||
= text
|
|
|
@ -10,7 +10,7 @@
|
||||||
- @folders_shown.each do |folder|
|
- @folders_shown.each do |folder|
|
||||||
- if folder == @current_folder
|
- if folder == @current_folder
|
||||||
%li{:class=>"active"}
|
%li{:class=>"active"}
|
||||||
= folder_link(folder)
|
= folder_link(:folder=>folder,:active=>true)
|
||||||
- else
|
- else
|
||||||
%li
|
%li
|
||||||
= folder_link(folder)
|
= folder_link(:folder=>folder,:active=>false)
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
<p class="version">
|
|
||||||
<%= link_to (t(:version,:scope=>:common) + " " + $defaults["version"]),about_path %>
|
|
||||||
</p>
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
<% content_for :title do %>
|
|
||||||
- <%= t(:about,:scope=>:internal) %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for :sidebar do %>
|
|
||||||
<%= content_for_sidebar %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="block">
|
|
||||||
<div class="navigation-tabs clearfix">
|
|
||||||
<%= raw single_navigation(:about,:internal) %>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
|
|
||||||
<h4>
|
|
||||||
<%= t(:current_version,:scope=>:internal) + ": " + $defaults["version"] %>
|
|
||||||
</h4>
|
|
||||||
|
|
||||||
<div class="md">
|
|
||||||
<%= raw BlueCloth::new(render :file => 'README.markdown').to_html %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="md">
|
|
||||||
<%= raw BlueCloth::new(render :file => 'CHANGES').to_html %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="md">
|
|
||||||
<%= raw BlueCloth::new(render :file => 'TODO').to_html %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
52
app/views/internal/about.html.haml
Executable file
52
app/views/internal/about.html.haml
Executable file
|
@ -0,0 +1,52 @@
|
||||||
|
= content_for :sidebar do
|
||||||
|
= render :partial => "sidebar/sidebar"
|
||||||
|
|
||||||
|
= content_for :title do
|
||||||
|
= t(:about,:scope=>:internal)
|
||||||
|
|
||||||
|
= render :partial => 'common/main_navigation', :locals => { :about => :active }
|
||||||
|
|
||||||
|
.well{:style=>"padding: 5px 3pt;"}
|
||||||
|
%h3
|
||||||
|
= t(:current_version,:scope=>:internal) + ": " + $defaults["version"]
|
||||||
|
.well
|
||||||
|
= raw BlueCloth::new(render :file => 'README.markdown').to_html
|
||||||
|
.well
|
||||||
|
= raw BlueCloth::new(render :file => 'CHANGES.markdown').to_html
|
||||||
|
.well
|
||||||
|
= raw BlueCloth::new(render :file => 'TODO.markdown').to_html
|
||||||
|
|
||||||
|
-#
|
||||||
|
<% content_for :title do %>
|
||||||
|
- <%= t(:about,:scope=>:internal) %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% content_for :sidebar do %>
|
||||||
|
<%= content_for_sidebar %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="block">
|
||||||
|
<div class="navigation-tabs clearfix">
|
||||||
|
<%= raw single_navigation(:about,:internal) %>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
<%= t(:current_version,:scope=>:internal) + ": " + $defaults["version"] %>
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<div class="md">
|
||||||
|
<%= raw BlueCloth::new(render :file => 'README.markdown').to_html %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="md">
|
||||||
|
<%= raw BlueCloth::new(render :file => 'CHANGES').to_html %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="md">
|
||||||
|
<%= raw BlueCloth::new(render :file => 'TODO').to_html %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
<!DOCTYPE html
|
|
||||||
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<title>
|
|
||||||
<%= t(:mailr,:scope=>:common) %>
|
|
||||||
<%= yield :title %>
|
|
||||||
</title>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
|
|
||||||
<%=stylesheet_link_tag current_theme_stylesheet_path('olive') %>
|
|
||||||
<%=stylesheet_link_tag current_theme_stylesheet_path('calendar_olive') %>
|
|
||||||
<%=stylesheet_link_tag current_theme_stylesheet_path('jquery-ui-dialog') %>
|
|
||||||
<%=stylesheet_link_tag current_theme_stylesheet_path('jquery-ui-custom') %>
|
|
||||||
|
|
||||||
<%=javascript_include_tag current_theme_javascript_path('jquery') %>
|
|
||||||
<%=javascript_include_tag current_theme_javascript_path('jquery-ui') %>
|
|
||||||
<%=javascript_include_tag current_theme_javascript_path('rails') %>
|
|
||||||
<%=javascript_include_tag current_theme_javascript_path('application') %>
|
|
||||||
|
|
||||||
<link rel="icon" type="image/x-icon" href="/favicon.ico"/>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="container">
|
|
||||||
<div id="sidebar">
|
|
||||||
<%= yield :sidebar %>
|
|
||||||
</div>
|
|
||||||
<div id="main">
|
|
||||||
<%= render :partial=>'layouts/flash', :object => flash %>
|
|
||||||
<%= calendar_window(:title=>t(:calendar,:scope=>:common)) %>
|
|
||||||
<%= yield %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,19 +0,0 @@
|
||||||
<td>
|
|
||||||
<%= link_to attachment.filename_charseted, attachment_download_path(attachment.parent_id,attachment.idx) %>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<%= attachment.main_type %>/<%= attachment.sub_type %>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<%= attachment.charset %>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<%= attachment.content_transfer_encoding %>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<%= size_formatter(attachment.getSize) %>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<%= link_to image_tag(current_theme_image_path('download.png')), attachment_download_path(attachment.parent_id,attachment.idx) %>
|
|
||||||
</td>
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<div class="attachments">
|
|
||||||
<span class="title"><%= t(:attachments,:scope=>:message) %></span>
|
|
||||||
<table class="table">
|
|
||||||
|
|
||||||
<% trclass = :even %>
|
|
||||||
<% for idx in 0..@attachments.size-1 %>
|
|
||||||
<tr class="<%= trclass.to_s %>">
|
|
||||||
<%= render :partial => 'attachment', :object => @attachments[idx] %>
|
|
||||||
</tr>
|
|
||||||
<% trclass == :even ? trclass = :odd : trclass = :even %>
|
|
||||||
<% end %>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
|
@ -1,4 +0,0 @@
|
||||||
<td><%= check_box_tag "files[]", file_attach[:name] %></td>
|
|
||||||
<td><%= file_attach[:name] %></td>
|
|
||||||
<td><%= size_formatter(file_attach[:size]) %></td>
|
|
||||||
<td class="last"> </td>
|
|
|
@ -1,16 +0,0 @@
|
||||||
<div class="attachments">
|
|
||||||
<span class="title"><%= t(:attachments,:scope=>:message) %></span>
|
|
||||||
<% if not @attachments.size.zero? %>
|
|
||||||
<% trclass = :even %>
|
|
||||||
<table class="table">
|
|
||||||
<% @attachments.each do |a| %>
|
|
||||||
<tr class="<%= trclass.to_s %>">
|
|
||||||
<%= render :partial => 'messages/file_attach', :object => a %>
|
|
||||||
</tr>
|
|
||||||
<% trclass == :even ? trclass = :odd : trclass = :even %>
|
|
||||||
<% end %>
|
|
||||||
</table>
|
|
||||||
<%= raw single_action('delete_marked','compose','minus.png') %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
<div class="fileselect clearfix">
|
|
||||||
<label for="upload_file"><%= t(:select_file,:scope=>:compose) %></label>:
|
|
||||||
<%= file_field 'file', 'data' %>
|
|
||||||
<%= raw single_action('upload','compose','up.png') %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
<div class="msg_header clearfix">
|
|
||||||
<%= raw show_param_view(@message,"from_addr",address_formatter(@from,:show)) %>
|
|
||||||
<%= raw show_param_view(@message,"to_addr",address_formatter(@to,:show)) %>
|
|
||||||
<% if not @cc.nil? %>
|
|
||||||
<%= raw show_param_view(@message,"cc_addr","CC jest") %>
|
|
||||||
<% end %>
|
|
||||||
<% if not @bcc.nil? %>
|
|
||||||
<%= raw show_param_view(@message,"bcc_addr","BCC jest ") %>
|
|
||||||
<% end %>
|
|
||||||
<%= raw show_param_view(@message,"subject",subject_formatter(@message,:show)) %>
|
|
||||||
<%= raw show_param_view(@message,"date",date_formatter(@date)) %>
|
|
||||||
<%= hidden_field_tag 'uids[]', @message.uid %>
|
|
||||||
<%= hidden_field_tag 'source', 'show' %>
|
|
||||||
</div>
|
|
|
@ -1,3 +0,0 @@
|
||||||
<iframe frameborder="0" src="<%= html_body_path(@message.uid) %>">
|
|
||||||
</iframe>
|
|
||||||
|
|
3
app/views/messages/_html_part.html.haml
Executable file
3
app/views/messages/_html_part.html.haml
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
%iframe{:frameborder=>"0",:src=>"#{html_body_path(@message.uid)}"}/
|
||||||
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<div class="images">
|
|
||||||
|
|
||||||
<% for idx in 0..@images.size-1 %>
|
|
||||||
<%= render :partial => 'image', :object => @images[idx] %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
|
@ -9,30 +9,10 @@
|
||||||
= address_formatter(message.from_addr,:index)
|
= address_formatter(message.from_addr,:index)
|
||||||
%td
|
%td
|
||||||
= subject_formatter(message,:index)
|
= subject_formatter(message,:index)
|
||||||
%td
|
%td{:nowrap=>"nowrap"}
|
||||||
= date_formatter(message.date)
|
= date_formatter(message.date)
|
||||||
%td
|
%td
|
||||||
= size_formatter(message.size)
|
= size_formatter(message.size)
|
||||||
%td
|
|
||||||
- if @current_folder == @drafts_folder
|
- if @current_folder == @drafts_folder
|
||||||
|
%td
|
||||||
= link_to(t(:edit,:scope=>:message),edit_path(message.uid))
|
= link_to(t(:edit,:scope=>:message),edit_path(message.uid))
|
||||||
- else
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-#
|
|
||||||
<td><%= check_box_tag "uids[]", message.uid %></td>
|
|
||||||
<td><%= attachment_formatter(message) %></td>
|
|
||||||
<% if @current_folder == @sent_folder || @current_folder == @drafts_folder %>
|
|
||||||
<td nowrap="nowrap"><%= address_formatter(message.to_addr,:index) %></td>
|
|
||||||
<% else %>
|
|
||||||
<td nowrap="nowrap"><%= address_formatter(message.from_addr,:index) %></td>
|
|
||||||
<% end %>
|
|
||||||
<td nowrap="nowrap"><%= subject_formatter(message,:index) %></td>
|
|
||||||
<td nowrap="nowrap"><%= date_formatter(message.date) %></td>
|
|
||||||
</td><td nowrap="nowrap"><%= size_formatter(message.size) %></td>
|
|
||||||
<% if @current_folder == @drafts_folder %>
|
|
||||||
<td><%= link_to(t(:edit,:scope=>:message),edit_path(message.uid)) %></td>
|
|
||||||
<% else %>
|
|
||||||
<td><%= raw(' ') %></td>
|
|
||||||
<% end %>
|
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
\:
|
\:
|
||||||
= @messages.total_entries
|
= @messages.total_entries
|
||||||
|
|
||||||
= will_paginate @messages
|
= will_paginate @messages, :class => "custom_pagination bottom-pix18"
|
||||||
|
|
||||||
%table{:class=>"table table-bordered"}
|
%table{:class=>"table table-bordered records"}
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th
|
%th
|
||||||
|
@ -18,15 +18,12 @@
|
||||||
%th
|
%th
|
||||||
%i{:class=>"icon-file"}
|
%i{:class=>"icon-file"}
|
||||||
= raw headers_links
|
= raw headers_links
|
||||||
%th
|
|
||||||
|
|
||||||
%tbody
|
%tbody
|
||||||
- @messages.each do |m|
|
- @messages.each do |m|
|
||||||
- m.unseen == true ? unseen = "unseen" : unseen = ""
|
- m.unseen == true ? unseen = "unseen" : unseen = ""
|
||||||
%tr{:class=>"#{unseen}"}
|
%tr{:class=>"#{unseen}"}
|
||||||
= render :partial => 'messages/message', :locals => {:message => m}
|
= render :partial => 'messages/message', :locals => {:message => m}
|
||||||
|
|
||||||
|
= will_paginate @messages , :class => "custom_pagination bottom-pix18"
|
||||||
= will_paginate @messages
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<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) %>
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
<div id="search" class="ops">
|
|
||||||
<p>
|
|
||||||
<%= t(:search) %>
|
|
||||||
<%= t(:in_message_field) %>
|
|
||||||
<select name="search_field"><%= options_for_select($defaults["msg_search_fields"])%></select>
|
|
||||||
<%= t(:string) %>
|
|
||||||
<input type="text" name="search_value" value="" size='16' id='search_value'/>
|
|
||||||
<%= submit_tag(t(:search), :name=>'search')%>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
|
@ -1,10 +0,0 @@
|
||||||
<div class="ops clearfix">
|
|
||||||
<%= raw group_action_text(@multi1_buttons,t(:to_folder,:scope=>:folder)+ " " + simple_select_for_folders("folder","target",@folders_shown,'',true)) %>
|
|
||||||
<%= raw group_action(@multi3_buttons) %>
|
|
||||||
|
|
||||||
<div id="header_source" title="<%= t(:header_source,:scope=>:message)%>">
|
|
||||||
<pre>
|
|
||||||
<%= @plain_header %>
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,23 +0,0 @@
|
||||||
<% content_for :sidebar do %>
|
|
||||||
<%= content_for_sidebar %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for :title do %>
|
|
||||||
- <%= t(:compose,:scope=>:compose) %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="block">
|
|
||||||
<div class="navigation-tabs clearfix">
|
|
||||||
<%= raw main_navigation(:compose_tab) %>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<h2><%= t(:new_message,:scope=>:compose) %></h2>
|
|
||||||
<div class="inner">
|
|
||||||
<%= form_tag(composed_path, :multipart => true) %>
|
|
||||||
<%= render :partial => 'messages/new' %>
|
|
||||||
<%= render :partial=> 'messages/file_attachs' %>
|
|
||||||
<%= render :partial => 'messages/file_select' %>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
<%= raw @body -%>
|
|
||||||
|
|
2
app/views/messages/html_body.html.haml
Executable file
2
app/views/messages/html_body.html.haml
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
= raw @body
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
<% content_for :sidebar do %>
|
|
||||||
<%= content_for_sidebar %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for :title do %>
|
|
||||||
- <%= t(:messages,:scope=>:message) %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="block">
|
|
||||||
<div class="navigation-tabs clearfix">
|
|
||||||
<%= raw main_navigation(:messages_tab) %>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<%= form_tag({:controller=>'messages_ops', :action=>'multi'},{:name=>'messages'})%>
|
|
||||||
|
|
||||||
<% if @current_folder.nil? %>
|
|
||||||
<h2><%= t(:no_selected,:scope=>:folder) %></h2>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if @messages.size.zero? %>
|
|
||||||
<div class="actions-bar wat-cf">
|
|
||||||
<div class="header_info"><%= t(:no_in,:scope=>:message) %></div>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<%= render :partial => 'multi_ops' %>
|
|
||||||
<%= render :partial => 'messages' %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
<% content_for :sidebar do %>
|
|
||||||
<%= content_for_sidebar %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for :title do %>
|
|
||||||
- <%= subject_formatter(@message,:show) %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="block">
|
|
||||||
<div class="navigation-tabs clearfix">
|
|
||||||
<%= raw main_navigation(:show) %>
|
|
||||||
</div>
|
|
||||||
<div class="content clearfix">
|
|
||||||
<%= form_tag(messages_ops_single_path)%>
|
|
||||||
<%= render :partial => 'header' %>
|
|
||||||
<%= render :partial => 'single_ops' %>
|
|
||||||
|
|
||||||
<% if not @attachments.size.zero? %>
|
|
||||||
<%= render :partial => 'attachments' %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if not @images.size.zero? %>
|
|
||||||
<%= render :partial => 'images' %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if not @html_part.nil? %>
|
|
||||||
<%= render :partial => 'html_part' %>
|
|
||||||
<% else %>
|
|
||||||
<div class="render_text clearfix">
|
|
||||||
<% if @text_part.nil? %>
|
|
||||||
<p>
|
|
||||||
<%= t(:no_content,:scope => :message) %>
|
|
||||||
</p>
|
|
||||||
<% else %>
|
|
||||||
<%= raw content_text_plain_for_render(@text_part) %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
= render :partial => "common/input_password_form_field",:locals => { :model => 'user',:attr => 'password'}
|
= render :partial => "common/input_password_form_field",:locals => { :model => 'user',:attr => 'password'}
|
||||||
.control-group
|
.control-group
|
||||||
.controls
|
.controls
|
||||||
= render :partial => "common/button",:locals => { :name=>'login', :caption => t(:please_login,:scope=>:user), :icon =>'icon-lock icon-white'}
|
= render :partial => "common/button",:locals => { :name=>'login_button', :caption => t(:please_login,:scope=>:user), :icon =>'icon-lock icon-white'}
|
||||||
|
%hr/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,9 @@
|
||||||
= render :partial => "common/input_form_desc_field",:locals => {:object => @user,:attr => 'first_name',:label => nil,:example => 'Joe',:value => params[:user] ? params[:user][:first_name] : ""}
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @user,:attr => 'first_name',:label => nil,:example => 'Joe',:value => params[:user] ? params[:user][:first_name] : ""}
|
||||||
= render :partial => "common/input_form_desc_field",:locals => {:object => @user,:attr => 'last_name',:label => nil,:example => 'Doe',:value => params[:user] ? params[:user][:last_name] : ""}
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @user,:attr => 'last_name',:label => nil,:example => 'Doe',:value => params[:user] ? params[:user][:last_name] : ""}
|
||||||
= render :partial => "common/input_form_desc_field",:locals => {:object => @server,:attr => 'name',:label => nil,:example => 'server.domain',:value => params[:server] ? params[:server][:name] : ""}
|
= render :partial => "common/input_form_desc_field",:locals => {:object => @server,:attr => 'name',:label => nil,:example => 'server.domain',:value => params[:server] ? params[:server][:name] : ""}
|
||||||
= render :partial => "common/form_button_icon",:locals => { :text => t(:send_config,:scope=>:user), :icon_class =>'icon-ok icon-white'}
|
.control-group
|
||||||
|
.controls
|
||||||
|
= render :partial => "common/button",:locals => { :name=>'send',
|
||||||
|
:caption => t(:send_config,:scope=>:user),
|
||||||
|
:icon =>'icon-ok icon-white'}
|
||||||
|
%hr/
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
en:
|
en:
|
||||||
|
will_paginate:
|
||||||
|
previous_label: "← Previous"
|
||||||
|
next_label: "Next →"
|
||||||
|
page_gap: "…"
|
||||||
activerecord:
|
activerecord:
|
||||||
attributes:
|
attributes:
|
||||||
prefs:
|
prefs:
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
pl:
|
pl:
|
||||||
|
will_paginate:
|
||||||
|
previous_label: "← Poprzednia"
|
||||||
|
next_label: "Następna →"
|
||||||
|
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]
|
||||||
abbr_day_names: [Ni, Po, Wt, Śr, Cz, Pi, So]
|
abbr_day_names: [Ni, Po, Wt, Śr, Cz, Pi, So]
|
||||||
|
@ -192,7 +196,7 @@ pl:
|
||||||
logout: Wyloguj
|
logout: Wyloguj
|
||||||
has_no_domain: Użytkownik nie ma ustawionej domeny
|
has_no_domain: Użytkownik nie ma ustawionej domeny
|
||||||
send_config: Wyślij
|
send_config: Wyślij
|
||||||
no_config: W bazie nie znaleziono żadnego użytkownika. Prawdopodobnie aplikacja nie została jeszcze skonfigurowana. Wypełnij poniższy formularz, aby dokonać podtsawowej konfiguracji.
|
no_config: W bazie nie znaleziono żadnego użytkownika. Prawdopodobnie aplikacja nie została jeszcze skonfigurowana. Wypełnij poniższy formularz, aby dokonać podstawowej konfiguracji.
|
||||||
|
|
||||||
internal:
|
internal:
|
||||||
imap_error: Błąd protokołu IMAP
|
imap_error: Błąd protokołu IMAP
|
||||||
|
|
|
@ -6,19 +6,19 @@ module Mail
|
||||||
attr_accessor :idx,:parent_id
|
attr_accessor :idx,:parent_id
|
||||||
|
|
||||||
|
|
||||||
#def decoded_and_charseted
|
def decoded_and_charseted
|
||||||
#begin
|
begin
|
||||||
#if not charset.upcase == 'UTF-8'
|
if not charset.upcase == 'UTF-8'
|
||||||
#charset.nil? ? source_charset = $defaults["msg_unknown_charset"] : source_charset = charset
|
charset.nil? ? source_charset = $defaults["msg_unknown_charset"] : source_charset = charset
|
||||||
#charseted = Iconv.iconv("UTF-8",source_charset,decoded).first
|
charseted = Iconv.iconv("UTF-8",source_charset,decoded).first
|
||||||
#else
|
else
|
||||||
#charseted = decoded
|
charseted = decoded
|
||||||
#end
|
end
|
||||||
#rescue
|
rescue
|
||||||
#decoded
|
decoded
|
||||||
#end
|
end
|
||||||
|
|
||||||
#end
|
end
|
||||||
|
|
||||||
def isImage?
|
def isImage?
|
||||||
not (content_type =~ /^image/).nil?
|
not (content_type =~ /^image/).nil?
|
||||||
|
@ -58,74 +58,74 @@ module Mail
|
||||||
|
|
||||||
attr_accessor :idx,:parent_id
|
attr_accessor :idx,:parent_id
|
||||||
|
|
||||||
#def isImage?
|
def isImage?
|
||||||
#not (content_type =~ /^image/).nil?
|
not (content_type =~ /^image/).nil?
|
||||||
#end
|
end
|
||||||
|
|
||||||
#def isText?
|
def isText?
|
||||||
#not (content_type =~ /^text\/plain/).nil?
|
not (content_type =~ /^text\/plain/).nil?
|
||||||
#end
|
end
|
||||||
|
|
||||||
#def isHtml?
|
def isHtml?
|
||||||
#not (content_type =~ /^text\/html/).nil?
|
not (content_type =~ /^text\/html/).nil?
|
||||||
#end
|
end
|
||||||
|
|
||||||
#def getSize
|
def getSize
|
||||||
#body.raw_source.size
|
body.raw_source.size
|
||||||
#end
|
end
|
||||||
|
|
||||||
#def decoded_and_charseted
|
def decoded_and_charseted
|
||||||
#begin
|
begin
|
||||||
#if not charset.upcase == 'UTF-8'
|
if not charset.upcase == 'UTF-8'
|
||||||
#charset.nil? ? source_charset = $defaults["msg_unknown_charset"] : source_charset = charset
|
charset.nil? ? source_charset = $defaults["msg_unknown_charset"] : source_charset = charset
|
||||||
#charseted = Iconv.iconv("UTF-8",source_charset,decoded).first
|
charseted = Iconv.iconv("UTF-8",source_charset,decoded).first
|
||||||
#else
|
else
|
||||||
#charseted = decoded
|
charseted = decoded
|
||||||
#end
|
end
|
||||||
#rescue
|
rescue
|
||||||
#decoded
|
decoded
|
||||||
#end
|
end
|
||||||
|
|
||||||
#end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#class Field
|
class Field
|
||||||
#def charseted
|
def charseted
|
||||||
#begin
|
begin
|
||||||
#if value =~ /\=\?([\w\-]+)\?/
|
if value =~ /\=\?([\w\-]+)\?/
|
||||||
#source_charset = $1
|
source_charset = $1
|
||||||
#if source_charset.upcase == 'UTF-8'
|
if source_charset.upcase == 'UTF-8'
|
||||||
#return decoded
|
return decoded
|
||||||
#end
|
end
|
||||||
#else
|
else
|
||||||
#source_charset = $defaults["msg_unknown_charset"]
|
source_charset = $defaults["msg_unknown_charset"]
|
||||||
#end
|
end
|
||||||
#Iconv.iconv("UTF-8",source_charset,decoded).first
|
Iconv.iconv("UTF-8",source_charset,decoded).first
|
||||||
#rescue
|
rescue
|
||||||
#decoded
|
decoded
|
||||||
#end
|
end
|
||||||
#end
|
end
|
||||||
#end
|
end
|
||||||
|
|
||||||
#class Address
|
class Address
|
||||||
#def charseted
|
def charseted
|
||||||
#begin
|
begin
|
||||||
#if value =~ /\=\?([\w\-]+)\?/
|
if value =~ /\=\?([\w\-]+)\?/
|
||||||
#source_charset = $1
|
source_charset = $1
|
||||||
#if source_charset.upcase == 'UTF-8'
|
if source_charset.upcase == 'UTF-8'
|
||||||
#return decoded
|
return decoded
|
||||||
#end
|
end
|
||||||
#else
|
else
|
||||||
#source_charset = $defaults["msg_unknown_charset"]
|
source_charset = $defaults["msg_unknown_charset"]
|
||||||
#end
|
end
|
||||||
#Iconv.iconv("UTF-8",source_charset,decoded).first
|
Iconv.iconv("UTF-8",source_charset,decoded).first
|
||||||
#rescue
|
rescue
|
||||||
#decoded
|
decoded
|
||||||
#end
|
end
|
||||||
#end
|
end
|
||||||
#end
|
end
|
||||||
|
|
||||||
#class Part
|
#class Part
|
||||||
#def filename_charseted
|
#def filename_charseted
|
||||||
|
|
Loading…
Reference in a new issue