Fix choose contact
This commit is contained in:
parent
d1e57475ce
commit
a2bad3c81d
|
@ -272,7 +272,7 @@ class WebmailController < ApplicationController
|
||||||
@filter.expressions << Expression.new
|
@filter.expressions << Expression.new
|
||||||
@expressions = @filter.expressions
|
@expressions = @filter.expressions
|
||||||
@destfolders = get_to_folders
|
@destfolders = get_to_folders
|
||||||
render_action("filter")
|
render "filter"
|
||||||
end
|
end
|
||||||
# end of filters
|
# end of filters
|
||||||
|
|
||||||
|
@ -314,8 +314,8 @@ class WebmailController < ApplicationController
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def additional_scripts()
|
def additional_scripts()
|
||||||
'<link rel="stylesheet" href="/stylesheets/webmail/webmail.css" type="text/css" media="screen" />'<<
|
@additional_css = ["webmail/webmail"]
|
||||||
'<script type="text/javascript" src="/javascripts/webmail.js"></script>'
|
@additional_js = ["webmail"]
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -25,11 +25,11 @@ module NavigationHelper
|
||||||
|
|
||||||
def link_import_preview() "/contacts/import_preview" end
|
def link_import_preview() "/contacts/import_preview" end
|
||||||
def link_main_index() root_url end
|
def link_main_index() root_url end
|
||||||
def link_contact_import() "/contacts/import" end
|
def link_contact_import() url_for(:controller => :contacts, :action => :import) end
|
||||||
def link_contact_choose() "/contacts/contact/choose" end
|
def link_contact_choose() url_for(:controller => :contacts, :action => :choose) end
|
||||||
|
|
||||||
def link_contact_list
|
def link_contact_list
|
||||||
link_to(_('List'), :controller => "/contacts/contact", :action => "list")
|
link_to(t(:list), :controller => :contacts, :action => :index)
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_contact_add_one
|
def link_contact_add_one
|
||||||
|
@ -37,11 +37,11 @@ module NavigationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_contact_add_multiple
|
def link_contact_add_multiple
|
||||||
link_to(t(:add_multiple), :controller => "/contacts/contact", :action => "add_multiple")
|
link_to(t(:add_multiple), :controller => :contacts, :action => "add_multiple")
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_contact_group_list
|
def link_contact_group_list
|
||||||
link_to(_('Groups'), :controller => "/contacts/contact_group", :action => "list")
|
link_to(t(:groups), :controller => :contact_group, :action => :index)
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_folders
|
def link_folders
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<h1><%= t :contacts %></h1>
|
<h1><%= t :contacts %></h1>
|
||||||
|
<% unless @mode == "choose" %>
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<ul id="primary">
|
<ul id="primary">
|
||||||
<li><%=link_folders%></li>
|
<li><%=link_folders%></li>
|
||||||
|
@ -16,7 +17,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<% end -%>
|
||||||
<div id="tab_main">
|
<div id="tab_main">
|
||||||
<div id="tab_content">
|
<div id="tab_content">
|
||||||
|
|
||||||
|
@ -45,7 +46,7 @@
|
||||||
<th><%= t :name %></th>
|
<th><%= t :name %></th>
|
||||||
<th><%= t :email %></th>
|
<th><%= t :email %></th>
|
||||||
</tr>
|
</tr>
|
||||||
<% for contact in @contacts %>
|
<% for contact in @contacts %>
|
||||||
<tr class="<%= alternator %>">
|
<tr class="<%= alternator %>">
|
||||||
<td><input type="checkbox" name="contacts_to[<%=contact.id%>]" value="1"/>
|
<td><input type="checkbox" name="contacts_to[<%=contact.id%>]" value="1"/>
|
||||||
<input type="checkbox" name="contacts_cc[<%=contact.id%>]" value="1"/>
|
<input type="checkbox" name="contacts_cc[<%=contact.id%>]" value="1"/>
|
||||||
|
@ -54,8 +55,8 @@
|
||||||
<td><%=contact.email%></td>
|
<td><%=contact.email%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr class="rowsep"><td colspan="3"><%=_('Groups')%>:</td></tr>
|
<tr class="rowsep"><td colspan="3"><%=t(:groups)%>:</td></tr>
|
||||||
<% for group in @contactgroups %>
|
<% for group in @contactgroups %>
|
||||||
<tr class="<%= alternator %>">
|
<tr class="<%= alternator %>">
|
||||||
<td><input type="checkbox" name="groups_to[<%=group.id%>]" value="1"/>
|
<td><input type="checkbox" name="groups_to[<%=group.id%>]" value="1"/>
|
||||||
<input type="checkbox" name="groups_cc[<%=group.id%>]" value="1"/>
|
<input type="checkbox" name="groups_cc[<%=group.id%>]" value="1"/>
|
||||||
|
@ -66,18 +67,18 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=3 class="buttonBar">
|
<td colspan=3 class="buttonBar">
|
||||||
<input type="submit" value="<%= _('choose')%>">
|
<input type="submit" value="<%= t(:choose)%>">
|
||||||
<input type="button" value="<%= _('cancel')%>" onclick="javascript:window.close();">
|
<input type="button" value="<%= t(:cancel)%>" onclick="javascript:window.close();">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% elsif @mode == "groups"%>
|
<% elsif @mode == "groups"%>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th width="200px"><%= t(:name)%></th>
|
<th width="200px"><%= t(:name)%></th>
|
||||||
<th><%= t(:email)%></th>
|
<th><%= t(:email)%></th>
|
||||||
</tr>
|
</tr>
|
||||||
<% for contact in @contacts %>
|
<% for contact in @contacts %>
|
||||||
<input type="hidden" id="contacts_for_group[<%=contact.id%>]" name="contacts_for_group[<%=contact.id%>]" value="<%=@contacts_for_group[contact.id]%>" >
|
<input type="hidden" id="contacts_for_group[<%=contact.id%>]" name="contacts_for_group[<%=contact.id%>]" value="<%=@contacts_for_group[contact.id]%>" >
|
||||||
<tr class="<%= alternator %>">
|
<tr class="<%= alternator %>">
|
||||||
<td><input type="checkbox" id="contacts_for_group[<%=contact.id%>]" name="contacts_for_group[<%=contact.id%>]"
|
<td><input type="checkbox" id="contacts_for_group[<%=contact.id%>]" name="contacts_for_group[<%=contact.id%>]"
|
||||||
value="<%=@contacts_for_group[contact.id]%>" onclick="toggleCheckbox(this)"
|
value="<%=@contacts_for_group[contact.id]%>" onclick="toggleCheckbox(this)"
|
||||||
|
@ -88,8 +89,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 class="buttonBar">
|
<td colspan=2 class="buttonBar">
|
||||||
<input type="submit" value="<%= _('Save')%>">
|
<input type="submit" value="<%= t(:save)%>">
|
||||||
<input type="button" value="<%= _('Back to groups')%>" onclick="window.location='<%=link_contact_group_list%>'">
|
<input type="button" value="<%= t(:back_to_groups)%>" onclick="window.location='<%=link_contact_group_list%>'">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -98,7 +99,7 @@
|
||||||
<th><%= t(:email)%></th>
|
<th><%= t(:email)%></th>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
</tr>
|
</tr>
|
||||||
<% for contact in @contacts %>
|
<% for contact in @contacts %>
|
||||||
<tr class="<%= alternator %>">
|
<tr class="<%= alternator %>">
|
||||||
<td><%= link_to(contact.full_name, :controller=>:contacts, :action => "edit", :id => contact.id ) %></td>
|
<td><%= link_to(contact.full_name, :controller=>:contacts, :action => "edit", :id => contact.id ) %></td>
|
||||||
<td><%= link_to( contact.email, :controller => :webmail, :action => "compose", :params => { "mail[to]" => contact.email } ) %></td>
|
<td><%= link_to( contact.email, :controller => :webmail, :action => "compose", :params => { "mail[to]" => contact.email } ) %></td>
|
||||||
|
@ -111,4 +112,4 @@
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,9 +4,11 @@
|
||||||
<head>
|
<head>
|
||||||
<title><%= t :mailr %></title>
|
<title><%= t :mailr %></title>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
<%=stylesheet_link_tag "admin", "tabs", "mailr", "webmail" %>
|
<% @additional_css ||= [] %>
|
||||||
<%=javascript_include_tag :defaults, "global", "webmail", [] %>
|
<% @additional_js ||= [] %>
|
||||||
<%=(@content_for_scripts ? @content_for_scripts : @additional_scripts )%>
|
<%=stylesheet_link_tag "admin", "tabs", "mailr", @additional_css %>
|
||||||
|
<%=javascript_include_tag :defaults, "global", "webmail", @additional_js %>
|
||||||
|
<%#=(@content_for_scripts ? @content_for_scripts : @additional_scripts )%>
|
||||||
</head>
|
</head>
|
||||||
<body id="bodyID" onload="<%=@onload_function%>">
|
<body id="bodyID" onload="<%=@onload_function%>">
|
||||||
<div id="wholepage">
|
<div id="wholepage">
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<ul id="secondary">
|
<ul id="secondary">
|
||||||
<li><%= link_compose_new %></li>
|
<li><%= link_compose_new %></li>
|
||||||
<li><a href='#' onclick="getFormField('composeMail').submit();"><%= t :send %></a></li>
|
<li><a href='#' onclick="getFormField('composeMail').submit();"><%= t :send %></a></li>
|
||||||
<li><a href="#" onclick="chooseContacts();"><%= t :choose_address %></a></li>
|
<li><a href="#" onclick="chooseContacts('<%=url_for(:controller => :contacts, :action => :index) %>');"><%= t :choose_address %></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><%=link_mail_prefs%></li>
|
<li><%=link_mail_prefs%></li>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<input type="hidden" name="page" value="<%=@page%>"/>
|
<input type="hidden" name="page" value="<%=@page%>"/>
|
||||||
|
|
||||||
<a href='#' onclick='toggle_msg_operations(true);'>
|
<a href='#' onclick='toggle_msg_operations(true);'>
|
||||||
<%=t :operations%><img id='img_msgops' alt='open' src='/images/list_<%=@ops_img_src%>.gif'/>
|
<%=t :operations%><img id='img_msgops' alt='open' src='../images/list_<%=@ops_img_src%>.gif'/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div id="msgops" class='<%=@ops_class%>'>
|
<div id="msgops" class='<%=@ops_class%>'>
|
||||||
|
|
|
@ -46,7 +46,9 @@ es-ES:
|
||||||
bcc: BCC
|
bcc: BCC
|
||||||
send: Enviar
|
send: Enviar
|
||||||
choose_address: Elegir dirección desde contactos
|
choose_address: Elegir dirección desde contactos
|
||||||
|
choose: Elegir
|
||||||
compose_txt: Componer nuevo correo
|
compose_txt: Componer nuevo correo
|
||||||
|
groups: Grupos
|
||||||
attachment: Adjunto
|
attachment: Adjunto
|
||||||
add: Agregar
|
add: Agregar
|
||||||
first_name: Nombre
|
first_name: Nombre
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
function chooseContacts() {
|
function chooseContacts(url) {
|
||||||
rs('', '/contacts/contact/list?mode=choose',550,480,0);
|
rs('', url + '?mode=choose',550,480,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setBulk() {
|
function setBulk() {
|
||||||
|
|
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 155 B |
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#folders { margin: 0 0 0 0; padding: 0; border: 1px solid #888; background: #fff; text-align: left; }
|
#folders { margin: 0 0 0 0; padding: 0; border: 1px solid #888; background: #fff; text-align: left; }
|
||||||
#folders ul { margin: 0; padding: 10px; }
|
#folders ul { margin: 0; padding: 10px; }
|
||||||
#folders ul li { margin: 0; padding-left: 20px; list-style-type:none; font-size: 1em; background: url("/images/icon-folder-open.gif") top left no-repeat; }
|
#folders ul li { margin: 0; padding-left: 20px; list-style-type:none; font-size: 1em; background: url("icon-folder-open.gif") top left no-repeat; }
|
||||||
#folders h4 { margin: 0; padding: 5px; text-align: left; }
|
#folders h4 { margin: 0; padding: 5px; text-align: left; }
|
||||||
|
|
||||||
#messages { margin: 0 0 0 0; padding: 0; width: 100%; }
|
#messages { margin: 0 0 0 0; padding: 0; width: 100%; }
|
||||||
|
|
Loading…
Reference in a new issue