More fixes with hard links and more translation fixes
This commit is contained in:
parent
eff724bdb5
commit
d1e57475ce
|
@ -33,7 +33,7 @@ class LoginController < ApplicationController
|
|||
|
||||
def logout
|
||||
reset_session
|
||||
flash["status"] = _('User successfully logged out')
|
||||
flash["status"] = t(:user_logged_out)
|
||||
redirect_to :action => "index"
|
||||
end
|
||||
|
||||
|
|
|
@ -9,15 +9,12 @@ class WebmailController < ApplicationController
|
|||
|
||||
# Administrative functions
|
||||
before_filter :login_required
|
||||
|
||||
before_filter :obtain_cookies_for_search_and_nav, :only=>[:messages]
|
||||
before_filter :load_imap_session
|
||||
after_filter :close_imap_session
|
||||
|
||||
layout "public", :except => [:view_source, :download]
|
||||
|
||||
before_filter :load_imap_session
|
||||
|
||||
after_filter :close_imap_session
|
||||
|
||||
# model :filter, :expression, :mail_pref, :customer
|
||||
|
||||
BOOL_ON = "on"
|
||||
|
@ -70,10 +67,10 @@ class WebmailController < ApplicationController
|
|||
session['lsort'] = sort_query = params["scc"]
|
||||
session['tsort'][sort_query] = (session['tsort'][sort_query]? false : true)
|
||||
@search_field, @search_value = session['search_field'], session['search_value']
|
||||
when _('Search') # search
|
||||
when t(:search) # search
|
||||
session['search_field'] = @search_field
|
||||
session['search_value'] = @search_value
|
||||
when _('Show all') # search
|
||||
when t(:show_all) # search
|
||||
session['search_field'] = @search_field = nil
|
||||
session['search_value'] = @search_value = nil
|
||||
else
|
||||
|
@ -175,9 +172,9 @@ class WebmailController < ApplicationController
|
|||
get_parts(mail).each { |part|
|
||||
return send_part(part) if part.header and part.header['content-type']['name'] == params['ctype']
|
||||
}
|
||||
render("webmail/webmail/noattachment")
|
||||
render("webmail/noattachment")
|
||||
else
|
||||
render("webmail/webmail/noattachment")
|
||||
render("webmail/noattachment")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ module NavigationHelper
|
|||
end
|
||||
|
||||
def link_import_preview() "/contacts/import_preview" end
|
||||
def link_main_index() "/" end
|
||||
def link_main_index() root_url end
|
||||
def link_contact_import() "/contacts/import" end
|
||||
def link_contact_choose() "/contacts/contact/choose" end
|
||||
|
||||
|
@ -45,7 +45,7 @@ module NavigationHelper
|
|||
end
|
||||
|
||||
def link_folders
|
||||
link_to( t(:folders), :controller=>"/webmail", :action=>"messages")
|
||||
link_to( t(:folders), :controller=>:webmail, :action=>:messages)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -159,6 +159,6 @@ module WebmailHelper
|
|||
def empty_trash_link(folder_name)
|
||||
link_to( "(#{t :empty})",
|
||||
{ :controller => "webmail", :action => "empty", :params=>{"folder_name"=>folder_name}},
|
||||
:confirm => _('Do you really want to empty trash?'))
|
||||
:confirm => t(:want_to_empty_trash_message))
|
||||
end
|
||||
end
|
||||
|
|
16
app/views/layouts/chooser.html.erb
Normal file
16
app/views/layouts/chooser.html.erb
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= @htmllang %>" lang="<%= @htmllang %>">
|
||||
<head>
|
||||
<title><%=@title%></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%=javascript_include_tag "global" %>
|
||||
<%=stylesheet_link_tag "admin", "tabs", "mailr" %>
|
||||
<%=@additional_scripts%>
|
||||
</head>
|
||||
<body id="bodyID" onload="<%=@onload_function%>">
|
||||
<%= @content_for_layout %>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= @htmllang %>" lang="<%= @htmllang %>">
|
||||
<head>
|
||||
<title><%=@title%></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" src="/javascripts/global.js"></script>
|
||||
<link rel="stylesheet" href="/stylesheets/admin.css" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="/stylesheets/tabs.css" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="/stylesheets/mailr.css" type="text/css" media="screen" />
|
||||
<%=@additional_scripts%>
|
||||
</head>
|
||||
<body id="bodyID" onload="<%=@onload_function%>">
|
||||
<%= @content_for_layout %>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
12
app/views/layouts/login.html.erb
Normal file
12
app/views/layouts/login.html.erb
Normal file
|
@ -0,0 +1,12 @@
|
|||
<!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) %> » <%= t(:please_login)%></title>
|
||||
<%=stylesheet_link_tag "admin", "mailr" %>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
22
app/views/layouts/public.html.erb
Normal file
22
app/views/layouts/public.html.erb
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= @htmllang %>" lang="<%= @htmllang %>">
|
||||
<head>
|
||||
<title><%= t :mailr %></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<%=stylesheet_link_tag "admin", "tabs", "mailr", "webmail" %>
|
||||
<%=javascript_include_tag :defaults, "global", "webmail", [] %>
|
||||
<%=(@content_for_scripts ? @content_for_scripts : @additional_scripts )%>
|
||||
</head>
|
||||
<body id="bodyID" onload="<%=@onload_function%>">
|
||||
<div id="wholepage">
|
||||
<div id="container">
|
||||
<div id="sidebar_outer">
|
||||
<div id="sidebar"><%= yield :sidebar %></div>
|
||||
</div>
|
||||
<div id="content"><%= yield %></div>
|
||||
<br class="clear"/>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,25 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= @htmllang %>" lang="<%= @htmllang %>">
|
||||
<head>
|
||||
<title><%= t :mailr %></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="/stylesheets/admin.css" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="/stylesheets/tabs.css" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="/stylesheets/mailr.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript" src="/javascripts/global.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/prototype.js"></script>
|
||||
<%=(@content_for_scripts ? @content_for_scripts : @additional_scripts )%>
|
||||
</head>
|
||||
<body id="bodyID" onload="<%=@onload_function%>">
|
||||
<div id="wholepage">
|
||||
<div id="container">
|
||||
<div id="sidebar_outer">
|
||||
<div id="sidebar"><%= yield :sidebar %></div>
|
||||
</div>
|
||||
<div id="content"><%= yield %></div>
|
||||
<br class="clear"/>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,13 +1,3 @@
|
|||
<!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>Mailr » Please Log In</title>
|
||||
<link rel="stylesheet" type="text/css" href="/stylesheets/admin.css" />
|
||||
<link rel="stylesheet" href="/stylesheets/mailr.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="login" <%= 'class="login_error"' if flash['error'] %>>
|
||||
<h1>Mailr</h1>
|
||||
<% if flash['error'] %>
|
||||
|
@ -37,5 +27,3 @@
|
|||
<b class='cn bl'></b>
|
||||
<b class='cn br'></b>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div id="folders">
|
||||
<h4><%=t :folders %><br/><%= link_to 'add/edit', folders_path %></h4>
|
||||
<h4><%=t :folders %><br/><%= link_to t(:add_edit_folder), folders_path %></h4>
|
||||
<hr/>
|
||||
<ul>
|
||||
<% @folders.each do |folder| -%>
|
||||
|
@ -8,5 +8,5 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div style="text-align: center; padding: 10px;">
|
||||
<input type="button" value="<%= t :logout %>" onclick="window.location='/login/logout'">
|
||||
<input type="button" value="<%= t :logout %>" onclick="window.location='<%= url_for(:controller => :login, :action => :logout) %>'">
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
<ul class="contacts">
|
||||
<% for contact in @contacts do -%>
|
||||
<li class="contact"><%=h contact.fname %> <%= h contact.lname %> <div class='email'><div class="notviscode">&lt;</div><%= h contact.email %><div class="notviscode">&gt;</div></div></li>
|
||||
<li class="contact">
|
||||
<%=h contact.fname %> <%= h contact.lname %>
|
||||
<div class='email'>
|
||||
<div class="notviscode"><</div>
|
||||
<%= h contact.email %>
|
||||
<div class="notviscode">></div>
|
||||
</div>
|
||||
</li>
|
||||
<% end -%>
|
||||
</ul>
|
|
@ -3,7 +3,7 @@
|
|||
<% } %>
|
||||
|
||||
<h1><%= t :mailbox %></h1>
|
||||
<form name="composeMail" id='composeMail' action="/webmail/compose" enctype="multipart/form-data" method="post">
|
||||
<form name="composeMail" id='composeMail' action="<%= url_for(:controller => :webmail, :action => :compose) %>" enctype="multipart/form-data" method="post">
|
||||
<div id="header">
|
||||
<ul id="primary">
|
||||
<li><%= link_folders %></li>
|
||||
|
@ -64,8 +64,4 @@
|
|||
<% if ['text/html', 'multipart'].include?(@mail.content_type) %>
|
||||
<%= include_tinymce %>
|
||||
<% end %>
|
||||
<%= javascript_include_tag "controls" %>
|
||||
<%= javascript_include_tag "dragdrop" %>
|
||||
<%= javascript_include_tag "effects" %>
|
||||
<% %>
|
||||
<% } %>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<h1><%=_('Mailbox')%></h1>
|
||||
<h1><%=t(:mailbox)%></h1>
|
||||
<div id="header">
|
||||
<ul id="primary">
|
||||
<li><%=link_folders%></li>
|
||||
<li><span><%= _('Compose') %></span>
|
||||
<li><span><%= t(:compose) %></span>
|
||||
<ul id="secondary">
|
||||
<li><%=link_compose_new%></li>
|
||||
</ul>
|
||||
|
@ -17,14 +17,14 @@
|
|||
|
||||
<div class="msghdr">
|
||||
<dl>
|
||||
<dt><%=_('To')%></dt><dd><%= CGI.escapeHTML(@mail.to) %></dd>
|
||||
<dt><%=t(:to)%></dt><dd><%= CGI.escapeHTML(@mail.to) %></dd>
|
||||
<% if @mail.cc %>
|
||||
<dt><%=_('CC')%></dt><dd><%= CGI.escapeHTML(@mail.cc) %></dd>
|
||||
<dt><%=t(:cc)%></dt><dd><%= CGI.escapeHTML(@mail.cc) %></dd>
|
||||
<% end
|
||||
if @mail.bcc %>
|
||||
<dt><%=_('BCC')%></dt><dd><%= CGI.escapeHTML(@mail.bcc) %></dd>
|
||||
<dt><%=t(:bcc)%></dt><dd><%= CGI.escapeHTML(@mail.bcc) %></dd>
|
||||
<% end %>
|
||||
<dt><%=_('Subject')%></dt><dd><%= CGI.escapeHTML(@mail.subject) %></dd>
|
||||
<dt><%=t(:subject)%></dt><dd><%= CGI.escapeHTML(@mail.subject) %></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -55,13 +55,13 @@
|
|||
<tr>
|
||||
<th width="1%"><input type="checkbox" name="allbox" onclick="checkAll(this.form)" style="margin: 0 0 0 4px" /></th>
|
||||
<% if @folder_name == CDF::CONFIG[:mail_sent] %>
|
||||
<th width="20%"><%= link_to(t(:to), :controller=>'/webmail/webmail', :action=>'messages', :op=>'SORT', :page=>@page, :scc=>'to_flat')%></th>
|
||||
<th width="20%"><%= link_to(t(:to), :controller=>:webmail, :action=>:messages, :op=>'SORT', :page=>@page, :scc=>'to_flat')%></th>
|
||||
<% else %>
|
||||
<th width="20%"><%= link_to(t(:from), :controller=>'/webmail/webmail', :action=>'messages', :op=>'SORT', :page=>@page, :scc=>'from_flat')%></th>
|
||||
<th width="20%"><%= link_to(t(:from), :controller=>:webmail, :action=>:messages, :op=>'SORT', :page=>@page, :scc=>'from_flat')%></th>
|
||||
<% end%>
|
||||
<th width='60%'><%= link_to(t(:subject), :controller=>'/webmail/webmail', :action=>'messages', :op=>'SORT', :page=>@page, :scc=>'subject')%></th>
|
||||
<th><%= link_to(t(:date), :controller=>'/webmail/webmail', :action=>'messages', :op=>'SORT', :page=>@page, :scc=>'date')%></th>
|
||||
<th><%= link_to(t(:size), :controller=>'/webmail/webmail', :action=>'messages', :op=>'SORT', :page=>@page, :scc=>'size')%></th>
|
||||
<th width='60%'><%= link_to(t(:subject), :controller=>:webmail, :action=>:messages, :op=>'SORT', :page=>@page, :scc=>'subject')%></th>
|
||||
<th><%= link_to(t(:date), :controller=>:webmail, :action=>:messages, :op=>'SORT', :page=>@page, :scc=>'date')%></th>
|
||||
<th><%= link_to(t(:size), :controller=>:webmail, :action=>:messages, :op=>'SORT', :page=>@page, :scc=>'size')%></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -78,3 +78,7 @@ es-ES:
|
|||
select_file: Selecionar archivo
|
||||
import: Importar
|
||||
back_to_folders: Volver a carpetas
|
||||
add_edit_folder: agregar/editar
|
||||
user_logged_out: Sesión cerrada correctamente
|
||||
please_login: Por favor, inicie sesión
|
||||
want_to_empty_trash_message: ¿Realmente quieres vaciar la papelera?
|
||||
|
|
Loading…
Reference in a new issue