contact groups controller
This commit is contained in:
parent
25d965d30a
commit
f2ff5eed09
|
@ -1,17 +1,9 @@
|
||||||
class Contacts::ContactGroupController < ApplicationController
|
class ContactGroupsController < ApplicationController
|
||||||
|
|
||||||
uses_component_template_root
|
|
||||||
|
|
||||||
model :contact_group
|
|
||||||
layout 'public'
|
layout 'public'
|
||||||
|
|
||||||
def index
|
def index
|
||||||
redirect_to(:action=>"list")
|
@contact_group = ContactGroup.new
|
||||||
end
|
@contact_group.customer_id = logged_user
|
||||||
|
|
||||||
def list
|
|
||||||
@contactgroup = ContactGroup.new
|
|
||||||
@contactgroup.customer_id = logged_user
|
|
||||||
@contactgroups = ContactGroup.find_by_user(logged_user)
|
@contactgroups = ContactGroup.find_by_user(logged_user)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<h1><%=_('Contact Groups')%></h1>
|
<h1><%=_('Contact Groups')%></h1>
|
||||||
|
|
||||||
<form action="/contact_group/add" method="post">
|
<%- form_for @contact_group do |f| %>
|
||||||
<%= hidden_field "contactgroup", "user_id" %>
|
<%= hidden_field "contactgroup", "user_id" %>
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -23,4 +23,4 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
<%- end %>
|
|
@ -60,3 +60,4 @@ en:
|
||||||
add_one_contact: Add one contact
|
add_one_contact: Add one contact
|
||||||
add_multiple: Add multiple
|
add_multiple: Add multiple
|
||||||
name: name
|
name: name
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
ActionController::Routing::Routes.draw do |map|
|
ActionController::Routing::Routes.draw do |map|
|
||||||
map.resources :folders, :requirements => {:id => /[^\/]+/}
|
map.resources :folders, :requirements => {:id => /[^\/]+/}
|
||||||
map.resources :contacts
|
map.resources :contacts
|
||||||
|
map.resources :contact_groups
|
||||||
|
|
||||||
# Add your own custom routes here.
|
# Add your own custom routes here.
|
||||||
# The priority is based upon order of creation: first created -> highest priority.
|
# The priority is based upon order of creation: first created -> highest priority.
|
||||||
|
|
Loading…
Reference in a new issue