diff --git a/app/controllers/profile_admin/membership_editor_controller.rb b/app/controllers/profile_admin/membership_editor_controller.rb index 7046767..dd60cd3 100644 --- a/app/controllers/profile_admin/membership_editor_controller.rb +++ b/app/controllers/profile_admin/membership_editor_controller.rb @@ -1,12 +1,14 @@ class MembershipEditorController < ProfileAdminController + before_filter :logon + def index @memberships = current_user.person.memberships end def new_enterprise @enterprise = Enterprise.new() - @vitual_communities = Environment.find(:all) + @virtual_communities = Environment.find(:all) @validation_entities = Organization.find(:all) end @@ -29,4 +31,10 @@ class MembershipEditorController < ProfileAdminController def search @tagged_enterprises = Enterprise.search(params[:query]) end + + protected + + def logon + redirect_to :controller => :account unless logged_in? + end end diff --git a/app/views/membership_editor/_enterprise.rhtml b/app/views/membership_editor/_enterprise.rhtml new file mode 100644 index 0000000..1c32c0d --- /dev/null +++ b/app/views/membership_editor/_enterprise.rhtml @@ -0,0 +1,2 @@ +<%= link_to enterprise.name, '/' + enterprise.identifier %> + diff --git a/app/views/membership_editor/index.rhtml b/app/views/membership_editor/index.rhtml index 1b4346b..a15e73b 100644 --- a/app/views/membership_editor/index.rhtml +++ b/app/views/membership_editor/index.rhtml @@ -1,5 +1,9 @@

<%= _('Listing memberships')%>

+<% form_tag 'membership_editor/search' do %> + <%= _('Search') %> <%= text_field_tag 'query' %> +<% end %> +