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