More fixes with hard links and more translation fixes

master-old
Emilio Blanco 2011-03-28 21:59:28 -03:00
parent eff724bdb5
commit d1e57475ce
17 changed files with 134 additions and 135 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View 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>

View File

@ -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>

View 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) %> &raquo; <%= t(:please_login)%></title>
<%=stylesheet_link_tag "admin", "mailr" %>
</head>
<body>
<%= yield %>
</body>
</html>

View 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>

View File

@ -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>

View File

@ -1,41 +1,29 @@
<!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 &raquo; 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'] %>
<div id="SystemError"><%= flash['error'] %></div>
<% elsif flash['status'] %>
<div id="SystemStatus"><%= flash['status'] %></div>
<% end %>
<form action="<%=url_for(:controller => 'login', :action => 'authenticate')%>" method="post">
<table class="form_layout">
<tr>
<th><label for="email"><%= t :email %>:</label></th>
<td><%= text_field "login_user", "email" %></td>
</tr>
<tr>
<th><label for="password"><%= t :password %>:</label></th>
<td><%= password_field "login_user", "password" %></td>
</tr>
<tr>
<td colspan="2" class="form_actions">
<input type="submit" name="submit" value="<%= t :log_in %>"/>
</td>
</tr>
</table>
</form>
<b class='cn tl'></b>
<b class='cn tr'></b>
<b class='cn bl'></b>
<b class='cn br'></b>
</div>
</body>
</html>
<div id="login" <%= 'class="login_error"' if flash['error'] %>>
<h1>Mailr</h1>
<% if flash['error'] %>
<div id="SystemError"><%= flash['error'] %></div>
<% elsif flash['status'] %>
<div id="SystemStatus"><%= flash['status'] %></div>
<% end %>
<form action="<%=url_for(:controller => 'login', :action => 'authenticate')%>" method="post">
<table class="form_layout">
<tr>
<th><label for="email"><%= t :email %>:</label></th>
<td><%= text_field "login_user", "email" %></td>
</tr>
<tr>
<th><label for="password"><%= t :password %>:</label></th>
<td><%= password_field "login_user", "password" %></td>
</tr>
<tr>
<td colspan="2" class="form_actions">
<input type="submit" name="submit" value="<%= t :log_in %>"/>
</td>
</tr>
</table>
</form>
<b class='cn tl'></b>
<b class='cn tr'></b>
<b class='cn bl'></b>
<b class='cn br'></b>
</div>

View File

@ -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>

View File

@ -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">&amp;lt;</div><%= h contact.email %><div class="notviscode">&amp;gt;</div></div></li>
<% end -%>
</ul>
<% 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>
<% end -%>
</ul>

View File

@ -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" %>
<% %>
<% } %>

View File

@ -1,11 +1,11 @@
<h1><%=_('Mailbox')%></h1>
<div id="header">
<ul id="primary">
<li><span><%= _('Folders') %></span>
<ul id="secondary">
<li><%=link_refresh%></li>
</ul>
</li>
<li><span><%= _('Folders') %></span>
<ul id="secondary">
<li><%=link_refresh%></li>
</ul>
</li>
<li><%=link_send_mail%></li>
<li><%=link_mail_prefs%></li>
<li><%=link_mail_filters%></li>
@ -13,17 +13,17 @@
</ul>
</div>
<div id="tab_main">
<div id="tab_content">
<div id="tab_content">
<% content_for('sidebar') { %>
<%= render :partial => 'shared' %>
<% } %>
<div id="messages">
<% if not(request['msg_id'] == '') %>
<%= render_component(:controller => "webmail/webmail", :action => "message", :params => { 'msg_id' => request['msg_id']})%>
<% else %>
<%= render_component(:controller => "webmail/webmail", :action => "messages") %>
<% end %>
</div>
<% content_for('sidebar') { %>
<%= render :partial => 'shared' %>
<% } %>
<div id="messages">
<% if not(request['msg_id'] == '') %>
<%= render_component(:controller => "webmail/webmail", :action => "message", :params => { 'msg_id' => request['msg_id']})%>
<% else %>
<%= render_component(:controller => "webmail/webmail", :action => "messages") %>
<% end %>
</div>
</div></div>

View File

@ -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>

View File

@ -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>&nbsp;</th>
</tr>
</thead>

View File

@ -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&oacute;n cerrada correctamente
please_login: Por favor, inicie sesi&oacute;n
want_to_empty_trash_message: ¿Realmente quieres vaciar la papelera?