refinerycms-members-ci 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/admin/members_controller.rb +8 -0
- data/app/controllers/members_controller.rb +30 -0
- data/app/controllers/pages_controller.rb +38 -0
- data/app/controllers/registrations_controller.rb +17 -0
- data/app/models/member.rb +13 -0
- data/app/views/admin/members/_actions.html.erb +28 -0
- data/app/views/admin/members/_form.html.erb +19 -0
- data/app/views/admin/members/_member.html.erb +18 -0
- data/app/views/admin/members/_members.html.erb +2 -0
- data/app/views/admin/members/_records.html.erb +18 -0
- data/app/views/admin/members/_sortable_list.html.erb +7 -0
- data/app/views/admin/members/edit.html.erb +1 -0
- data/app/views/admin/members/index.html.erb +10 -0
- data/app/views/admin/members/new.html.erb +1 -0
- data/app/views/admin/pages/_form_advanced_options.html.erb +89 -0
- data/app/views/devise/confirmations/new.html.erb +12 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +16 -0
- data/app/views/devise/passwords/new.html.erb +12 -0
- data/app/views/devise/registrations/edit.html.erb +20 -0
- data/app/views/devise/sessions/new.html.erb +17 -0
- data/app/views/devise/shared/_links.erb +19 -0
- data/app/views/devise/unlocks/new.html.erb +12 -0
- data/app/views/registrations/edit.html.erb +22 -0
- data/app/views/registrations/new.html.erb +18 -0
- data/app/views/shared/_header.html.erb +23 -0
- data/config/locales/en.yml +26 -0
- data/config/locales/lolcat.yml +25 -0
- data/config/locales/nb.yml +21 -0
- data/config/locales/nl.yml +21 -0
- data/config/routes.rb +11 -0
- data/lib/generators/refinerycms_members_generator.rb +6 -0
- data/lib/refinerycms-members.rb +21 -0
- data/lib/tasks/members.rake +13 -0
- metadata +102 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
class MembersController < ApplicationController
|
2
|
+
|
3
|
+
before_filter :find_all_members
|
4
|
+
before_filter :find_page
|
5
|
+
|
6
|
+
def index
|
7
|
+
# you can use meta fields from your model instead (e.g. browser_title)
|
8
|
+
# by swapping @page for @member in the line below:
|
9
|
+
present(@page)
|
10
|
+
end
|
11
|
+
|
12
|
+
def show
|
13
|
+
@member = Member.find(params[:id])
|
14
|
+
|
15
|
+
# you can use meta fields from your model instead (e.g. browser_title)
|
16
|
+
# by swapping @page for @member in the line below:
|
17
|
+
present(@page)
|
18
|
+
end
|
19
|
+
|
20
|
+
protected
|
21
|
+
|
22
|
+
def find_all_members
|
23
|
+
@members = Member.find(:all, :order => "position ASC")
|
24
|
+
end
|
25
|
+
|
26
|
+
def find_page
|
27
|
+
@page = Page.find_by_link_url("/members")
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
class PagesController < ApplicationController
|
2
|
+
|
3
|
+
# This action is usually accessed with the root path, normally '/'
|
4
|
+
def home
|
5
|
+
error_404 unless (@page = Page.where(:link_url => '/').first).present?
|
6
|
+
end
|
7
|
+
|
8
|
+
# This action can be accessed normally, or as nested pages.
|
9
|
+
# Assuming a page named "mission" that is a child of "about",
|
10
|
+
# you can access the pages with the following URLs:
|
11
|
+
#
|
12
|
+
# GET /pages/about
|
13
|
+
# GET /about
|
14
|
+
#
|
15
|
+
# GET /pages/mission
|
16
|
+
# GET /about/mission
|
17
|
+
#
|
18
|
+
def show
|
19
|
+
@page = Page.find("#{params[:path]}/#{params[:id]}".split('/').last)
|
20
|
+
|
21
|
+
if @page.need_login and !member_signed_in?
|
22
|
+
flash[:notice] = I18n.t("members.need_login")
|
23
|
+
redirect_to '/members/sign_in' and return
|
24
|
+
end
|
25
|
+
|
26
|
+
if @page.try(:live?) || (refinery_user? && current_user.authorized_plugins.include?("refinery_pages"))
|
27
|
+
# if the admin wants this to be a "placeholder" page which goes to its first child, go to that instead.
|
28
|
+
if @page.skip_to_first_child && (first_live_child = @page.children.order('lft ASC').where(:draft=>false).first).present?
|
29
|
+
redirect_to first_live_child.url
|
30
|
+
elsif @page.link_url.present?
|
31
|
+
redirect_to @page.link_url and return
|
32
|
+
end
|
33
|
+
else
|
34
|
+
error_404
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class RegistrationsController < Devise::RegistrationsController
|
2
|
+
def update
|
3
|
+
self.resource = resource_class.to_adapter.get!(send(:"current_#{resource_name}").to_key)
|
4
|
+
|
5
|
+
# Devise use update_with_password instead of update_attributes.
|
6
|
+
# This is the only change we make.
|
7
|
+
if resource.update_profile(params[resource_name])
|
8
|
+
set_flash_message :notice, :updated
|
9
|
+
# Line below required if using Devise >= 1.2.0
|
10
|
+
sign_in resource_name, resource, :bypass => true
|
11
|
+
redirect_to after_update_path_for(resource)
|
12
|
+
else
|
13
|
+
clean_up_passwords(resource)
|
14
|
+
render_with_scope :edit
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class Member < ActiveRecord::Base
|
2
|
+
# Include default devise modules. Others available are:
|
3
|
+
# :token_authenticatable, :confirmable, :lockable and :timeoutable
|
4
|
+
devise :database_authenticatable, :registerable,
|
5
|
+
:recoverable, :rememberable, :trackable, :validatable
|
6
|
+
|
7
|
+
def update_profile(attrs={})
|
8
|
+
attrs.delete(:password) if attrs[:password].empty?
|
9
|
+
attrs.delete(:password_confirmation) if attrs[:password_confirmation].empty?
|
10
|
+
update_attributes(attrs)
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<ul>
|
2
|
+
<% if Admin::MembersController.searchable? %>
|
3
|
+
<li>
|
4
|
+
<%= render :partial => "/shared/admin/search",
|
5
|
+
:locals => {
|
6
|
+
:url => admin_members_url
|
7
|
+
} %>
|
8
|
+
</li>
|
9
|
+
<% end %>
|
10
|
+
<li>
|
11
|
+
<%= link_to t('.create_new'), new_admin_member_url,
|
12
|
+
:class => "add_icon" %>
|
13
|
+
</li>
|
14
|
+
<% if !searching? and Admin::MembersController.sortable? and Member.count > 1 %>
|
15
|
+
<li>
|
16
|
+
<%= link_to t('.reorder', :what => "Members"),
|
17
|
+
admin_members_url,
|
18
|
+
:id => "reorder_action",
|
19
|
+
:class => "reorder_icon" %>
|
20
|
+
|
21
|
+
<%= link_to t('.reorder_done', :what => "Members"),
|
22
|
+
admin_members_url,
|
23
|
+
:id => "reorder_action_done",
|
24
|
+
:style => "display: none;",
|
25
|
+
:class => "reorder_icon" %>
|
26
|
+
</li>
|
27
|
+
<% end %>
|
28
|
+
</ul>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%= form_for [:admin, @member] do |f| -%>
|
2
|
+
<%= render :partial => "/shared/admin/error_messages", :locals => {
|
3
|
+
:object => @member,
|
4
|
+
:include_object_name => true
|
5
|
+
} %>
|
6
|
+
|
7
|
+
<div class='field'>
|
8
|
+
<%= f.label :email -%>
|
9
|
+
<%= f.text_field :email, :class => 'larger widest' -%>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<%= render :partial => "/shared/admin/form_actions",
|
13
|
+
:locals => {
|
14
|
+
:f => f,
|
15
|
+
:continue_editing => false,
|
16
|
+
:delete_title => t('delete', :scope => 'admin.members.member'),
|
17
|
+
:delete_confirmation => t('message', :scope => 'shared.admin.delete', :title => @member.email)
|
18
|
+
} %>
|
19
|
+
<% end -%>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(member) -%>">
|
2
|
+
<span class='title'>
|
3
|
+
<%= member.email %>
|
4
|
+
<span class="preview"> </span>
|
5
|
+
</span>
|
6
|
+
<span class='actions'>
|
7
|
+
<%= link_to refinery_icon_tag("application_go.png"), '#', #admin_member_url(member),
|
8
|
+
:title => t('.view_live_html'),
|
9
|
+
:target => "_blank" %>
|
10
|
+
<%= link_to refinery_icon_tag("application_edit.png"), edit_admin_member_path(member),
|
11
|
+
:title => t('.edit') %>
|
12
|
+
<%= link_to refinery_icon_tag("delete.png"), admin_member_path(member),
|
13
|
+
:class => "cancel confirm-delete",
|
14
|
+
:title => t('.delete'),
|
15
|
+
:confirm => t('message', :scope => 'shared.admin.delete', :title => member.email),
|
16
|
+
:method => :delete %>
|
17
|
+
</span>
|
18
|
+
</li>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if searching? %>
|
2
|
+
<h2><%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %></h2>
|
3
|
+
<% end %>
|
4
|
+
<% if @members.any? %>
|
5
|
+
<div class='pagination_container'>
|
6
|
+
<%= render :partial => 'members' %>
|
7
|
+
</div>
|
8
|
+
<% else %>
|
9
|
+
<p>
|
10
|
+
<% unless searching? %>
|
11
|
+
<strong>
|
12
|
+
<%= t('.no_items_yet') %>
|
13
|
+
</strong>
|
14
|
+
<% else %>
|
15
|
+
<%= t('no_results', :scope => 'shared.admin.search') %>
|
16
|
+
<% end %>
|
17
|
+
</p>
|
18
|
+
<% end %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<ul id='sortable_list'>
|
2
|
+
<%= render :partial => 'member', :collection => @members %>
|
3
|
+
</ul>
|
4
|
+
<%= render :partial => "/shared/admin/sortable_list",
|
5
|
+
:locals => {
|
6
|
+
:continue_reordering => (local_assigns.keys.include?(:continue_reordering)) ? continue_reordering : true
|
7
|
+
} %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => "form" %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<section id='records'>
|
2
|
+
<%= render :partial => 'records' %>
|
3
|
+
</section>
|
4
|
+
<aside id='actions'>
|
5
|
+
<%= render :partial => 'actions' %>
|
6
|
+
</aside>
|
7
|
+
<%= render :partial => '/shared/admin/make_sortable',
|
8
|
+
:locals => {
|
9
|
+
:tree => false
|
10
|
+
} if !searching? and Admin::MembersController.sortable? and Member.count > 1 %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => "form" %>
|
@@ -0,0 +1,89 @@
|
|
1
|
+
<div id='more_options_field'>
|
2
|
+
<p>
|
3
|
+
<%= link_to t('.advanced_options'), "#",
|
4
|
+
:id => 'toggle_advanced_options',
|
5
|
+
:title => t('.toggle_advanced_options') %>
|
6
|
+
</p>
|
7
|
+
<span id='draft_field'>
|
8
|
+
<%= f.check_box :draft %>
|
9
|
+
<%= f.label :draft, t('.save_as_draft'),
|
10
|
+
:class => "stripped" %>
|
11
|
+
</span>
|
12
|
+
</div>
|
13
|
+
<div id='more_options' style="display:none;">
|
14
|
+
<div class="hemisquare">
|
15
|
+
<h2><%= t('.page_options') %></h2>
|
16
|
+
<div class='field'>
|
17
|
+
<span class='label_with_help'>
|
18
|
+
<%= f.label :parent_id, t('.parent_page') %>
|
19
|
+
<%= refinery_help_tag t('.parent_page_help') %>
|
20
|
+
</span>
|
21
|
+
<%= f.select :parent_id, nested_set_options(Page, @page) {|i| "#{'-' * i.level} #{i.title}" },
|
22
|
+
:include_blank => true %>
|
23
|
+
</div>
|
24
|
+
<div class='field'>
|
25
|
+
<span class='label_with_help'>
|
26
|
+
<%= label_tag :custom_title, t('.custom_title') %>
|
27
|
+
<%= refinery_help_tag t('.custom_title_help') %>
|
28
|
+
</span>
|
29
|
+
<% %w(none text).each do |type| %>
|
30
|
+
<%= f.radio_button :custom_title_type, type %>
|
31
|
+
<%= label_tag "page_custom_title_type_#{type}", t(type.downcase.gsub(" ", "_"), :scope => 'admin.pages.form_advanced_options.title_types'),
|
32
|
+
:class => "stripped" %>
|
33
|
+
<% end %>
|
34
|
+
<div id='custom_title_none'></div>
|
35
|
+
<div id='custom_title_text' style='display: <%= @page.custom_title_type == 'text' ? 'block' : 'none' %>'>
|
36
|
+
<%= f.text_field :custom_title, :class => 'widest' %>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
<div class='field'>
|
40
|
+
<span class='label_with_help'>
|
41
|
+
<%= f.label :skip_to_first_child?, t('.skip_to_first_child') %>
|
42
|
+
<%= refinery_help_tag t('.skip_to_first_child_help') %>
|
43
|
+
</span>
|
44
|
+
<%= f.check_box :skip_to_first_child %>
|
45
|
+
<%= f.label :skip_to_first_child, t('.skip_to_first_child_label'),
|
46
|
+
:class => "stripped" %>
|
47
|
+
</div>
|
48
|
+
<div class='field'>
|
49
|
+
<span class='label_with_help'>
|
50
|
+
<%= f.label :link_url, t('.link_url') %>
|
51
|
+
<%= refinery_help_tag t('.link_url_help') %>
|
52
|
+
</span>
|
53
|
+
<%= f.text_field :link_url, :style=> 'width:400px;' %>
|
54
|
+
<% content_for :javascripts do %>
|
55
|
+
<script>
|
56
|
+
$(document).ready(function(){
|
57
|
+
link_tester.init('<%= test_url_admin_pages_dialogs_url %>',
|
58
|
+
'<%= test_email_admin_pages_dialogs_url %>');
|
59
|
+
|
60
|
+
link_tester.validate_url_textbox("#page_link_url")
|
61
|
+
});
|
62
|
+
</script>
|
63
|
+
<% end %>
|
64
|
+
</div>
|
65
|
+
<div class='field'>
|
66
|
+
<span class='label_with_help'>
|
67
|
+
<%= f.label :show_in_menu, t('.show_in_menu_title'),
|
68
|
+
:id => 'page_show_in_menu_heading' %>
|
69
|
+
<%= refinery_help_tag t('.show_in_menu_help') %>
|
70
|
+
</span>
|
71
|
+
<%= f.check_box :show_in_menu %>
|
72
|
+
<%= f.label :show_in_menu, t('.show_in_menu_description'),
|
73
|
+
:class => "stripped" %>
|
74
|
+
</div>
|
75
|
+
<div class='field'>
|
76
|
+
<span class='label_with_help'>
|
77
|
+
<%= f.label :need_login, 'Need login',
|
78
|
+
:id => 'need_login' %>
|
79
|
+
<%= refinery_help_tag "Set the page if it's need to login first to view" %>
|
80
|
+
</span>
|
81
|
+
<%= f.check_box :need_login %>
|
82
|
+
<%= f.label :need_login, "Set the page if it's need to login first to view",
|
83
|
+
:class => "stripped" %>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<%= render :partial => "form_advanced_options_seo",
|
88
|
+
:locals => {:f => f} %>
|
89
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Resend confirmation instructions</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<p><%= f.label :email %><br />
|
7
|
+
<%= f.text_field :email %></p>
|
8
|
+
|
9
|
+
<p><%= f.submit "Resend confirmation instructions" %></p>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render :partial => "devise/shared/links" %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
|
4
|
+
|
5
|
+
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
|
6
|
+
|
7
|
+
<p>If you didn't request this, please ignore this email.</p>
|
8
|
+
<p>Your password won't change until you access the link above and create a new one.</p>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
|
4
|
+
|
5
|
+
<p>Click the link below to unlock your account:</p>
|
6
|
+
|
7
|
+
<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<h2>Change your password</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
<%= f.hidden_field :reset_password_token %>
|
6
|
+
|
7
|
+
<p><%= f.label :password %><br />
|
8
|
+
<%= f.password_field :password %></p>
|
9
|
+
|
10
|
+
<p><%= f.label :password_confirmation %><br />
|
11
|
+
<%= f.password_field :password_confirmation %></p>
|
12
|
+
|
13
|
+
<p><%= f.submit "Change my password" %></p>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%= render :partial => "devise/shared/links" %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Forgot your password?</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<p><%= f.label :email %><br />
|
7
|
+
<%= f.text_field :email %></p>
|
8
|
+
|
9
|
+
<p><%= f.submit "Send me reset password instructions" %></p>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render :partial => "devise/shared/links" %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<p><%= f.label :email %><br />
|
7
|
+
<%= f.text_field :email %></p>
|
8
|
+
|
9
|
+
<p><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
10
|
+
<%= f.password_field :password %></p>
|
11
|
+
|
12
|
+
<p><%= f.label :password_confirmation %><br />
|
13
|
+
<%= f.password_field :password_confirmation %></p>
|
14
|
+
|
15
|
+
<p><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
16
|
+
<%= f.password_field :current_password %></p>
|
17
|
+
|
18
|
+
<p><%= f.submit "Update" %></p>
|
19
|
+
<% end %>
|
20
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<h2>Sign in</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
4
|
+
<p><%= f.label :email %><br />
|
5
|
+
<%= f.text_field :email %></p>
|
6
|
+
|
7
|
+
<p><%= f.label :password %><br />
|
8
|
+
<%= f.password_field :password %></p>
|
9
|
+
|
10
|
+
<% if devise_mapping.rememberable? -%>
|
11
|
+
<p><%= f.check_box :remember_me %> <%= f.label :remember_me %></p>
|
12
|
+
<% end -%>
|
13
|
+
|
14
|
+
<p><%= f.submit "Sign in" %></p>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<%= render :partial => "devise/shared/links" %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%- if controller_name != 'sessions' %>
|
2
|
+
<%= link_to "Sign in", new_session_path(resource_name) %><br />
|
3
|
+
<% end -%>
|
4
|
+
|
5
|
+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
6
|
+
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
|
10
|
+
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
11
|
+
<% end -%>
|
12
|
+
|
13
|
+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
14
|
+
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
15
|
+
<% end -%>
|
16
|
+
|
17
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
18
|
+
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
19
|
+
<% end -%>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Resend unlock instructions</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<p><%= f.label :email %><br />
|
7
|
+
<%= f.text_field :email %></p>
|
8
|
+
|
9
|
+
<p><%= f.submit "Resend unlock instructions" %></p>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render :partial => "devise/shared/links" %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<p><%= f.label :email %><br />
|
7
|
+
<%= f.text_field :email %></p>
|
8
|
+
|
9
|
+
<p><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
10
|
+
<%= f.password_field :password %></p>
|
11
|
+
|
12
|
+
<p><%= f.label :password_confirmation %><br />
|
13
|
+
<%= f.password_field :password_confirmation %></p>
|
14
|
+
|
15
|
+
<p><%= f.submit "Update" %></p>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<h3>Cancel my account</h3>
|
19
|
+
|
20
|
+
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
|
21
|
+
|
22
|
+
<%= link_to "Back", :back %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<h2>Sign up</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<p><%= f.label :email %><br />
|
7
|
+
<%= f.text_field :email %></p>
|
8
|
+
|
9
|
+
<p><%= f.label :password %><br />
|
10
|
+
<%= f.password_field :password %></p>
|
11
|
+
|
12
|
+
<p><%= f.label :password_confirmation %><br />
|
13
|
+
<%= f.password_field :password_confirmation %></p>
|
14
|
+
|
15
|
+
<p><%= f.submit "Sign up" %></p>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<%= render :partial => "devise/shared/links" %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<h1 id='logo'>
|
2
|
+
<%= link_to RefinerySetting.find_or_set(:site_name, "Company Name"), root_path %>
|
3
|
+
</h1>
|
4
|
+
<%= render :partial => "/shared/menu",
|
5
|
+
:locals => {
|
6
|
+
:dom_id => 'menu',
|
7
|
+
:css => 'menu'
|
8
|
+
} -%>
|
9
|
+
|
10
|
+
<% if member_signed_in? %>
|
11
|
+
<li>
|
12
|
+
<%= link_to('Logout', destroy_member_session_path) %>
|
13
|
+
</li>
|
14
|
+
<li>
|
15
|
+
<%= link_to('profile',edit_member_registration_path) %>
|
16
|
+
</li>
|
17
|
+
<% else %>
|
18
|
+
<li>
|
19
|
+
<%= link_to('Login', new_member_session_path) %>
|
20
|
+
</li>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<%= flash[:notice]%>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
en:
|
2
|
+
shared:
|
3
|
+
admin:
|
4
|
+
image_picker:
|
5
|
+
image: image
|
6
|
+
plugins:
|
7
|
+
members:
|
8
|
+
title: Members
|
9
|
+
admin:
|
10
|
+
members:
|
11
|
+
actions:
|
12
|
+
create_new: Add New Member
|
13
|
+
reorder: Reorder Members
|
14
|
+
reorder_done: Done Reordering Members
|
15
|
+
records:
|
16
|
+
title: Members
|
17
|
+
sorry_no_results: Sorry! There are no results found.
|
18
|
+
no_items_yet: There are no Members yet. Click "Add New Member" to add your first member.
|
19
|
+
member:
|
20
|
+
view_live_html: View this member live <br/><em>(opens in a new window)</em>
|
21
|
+
edit: Edit this member
|
22
|
+
delete: Remove this member forever
|
23
|
+
members:
|
24
|
+
show:
|
25
|
+
need_login: This page require member login first and continue
|
26
|
+
other: Other Members
|
@@ -0,0 +1,25 @@
|
|
1
|
+
lolcat:
|
2
|
+
shared:
|
3
|
+
admin:
|
4
|
+
image_picker:
|
5
|
+
image: IMAGE
|
6
|
+
plugins:
|
7
|
+
members:
|
8
|
+
title: Members
|
9
|
+
admin:
|
10
|
+
members:
|
11
|
+
actions:
|
12
|
+
create_new: CREATE NEW Member
|
13
|
+
reorder: REORDR Members
|
14
|
+
reorder_done: DUN REORDERIN Members
|
15
|
+
records:
|
16
|
+
title: Members
|
17
|
+
sorry_no_results: SRY! THAR R NO RESULTS FINDZ.
|
18
|
+
no_items_yet: THAR R NO Members YET. CLICK "CREATE NEW Member" 2 ADD UR FURST member.
|
19
|
+
member:
|
20
|
+
view_live_html: VIEW DIS member LIV <BR/><EM>(OPENS IN NEW WINDOW)</EM>
|
21
|
+
edit: EDIT DIS member
|
22
|
+
delete: REMOOV DIS member FOREVR
|
23
|
+
members:
|
24
|
+
show:
|
25
|
+
other: OTHR Members
|
@@ -0,0 +1,21 @@
|
|
1
|
+
nb:
|
2
|
+
plugins:
|
3
|
+
members:
|
4
|
+
title: Members
|
5
|
+
admin:
|
6
|
+
members:
|
7
|
+
actions:
|
8
|
+
create_new: Lag en ny Member
|
9
|
+
reorder: Endre rekkefølgen på Members
|
10
|
+
reorder_done: Ferdig å endre rekkefølgen Members
|
11
|
+
records:
|
12
|
+
title: Members
|
13
|
+
sorry_no_results: Beklager! Vi fant ikke noen resultater.
|
14
|
+
no_items_yet: Det er ingen Members enda. Klikk på "Lag en ny Member" for å legge til din første member.
|
15
|
+
member:
|
16
|
+
view_live_html: Vis hvordan denne member ser ut offentlig <br/><em>(åpner i et nytt vindu)</em>
|
17
|
+
edit: Rediger denne member
|
18
|
+
delete: Fjern denne member permanent
|
19
|
+
members:
|
20
|
+
show:
|
21
|
+
other: Andre Members
|
@@ -0,0 +1,21 @@
|
|
1
|
+
nl:
|
2
|
+
plugins:
|
3
|
+
members:
|
4
|
+
title: Members
|
5
|
+
admin:
|
6
|
+
members:
|
7
|
+
actions:
|
8
|
+
create_new: Maak een nieuwe Member
|
9
|
+
reorder: Wijzig de volgorde van de Members
|
10
|
+
reorder_done: Klaar met het wijzingen van de volgorde van de Members
|
11
|
+
records:
|
12
|
+
title: Members
|
13
|
+
sorry_no_results: Helaas! Er zijn geen resultaten gevonden.
|
14
|
+
no_items_yet: Er zijn nog geen Members. Druk op 'Maak een nieuwe Member' om de eerste aan te maken.
|
15
|
+
member:
|
16
|
+
view_live_html: Bekijk deze member op de website <br/><em>(opent een nieuw venster)</em>
|
17
|
+
edit: Bewerk deze member
|
18
|
+
delete: Verwijder deze member voor eeuwig
|
19
|
+
members:
|
20
|
+
show:
|
21
|
+
other: Andere Members
|
data/config/routes.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
Refinery::Application.routes.draw do
|
2
|
+
devise_for :members, :controllers => { :registrations => "registrations" }
|
3
|
+
|
4
|
+
scope(:path => 'refinery', :as => 'admin', :module => 'admin') do
|
5
|
+
resources :members, :except => :show do
|
6
|
+
collection do
|
7
|
+
post :update_positions
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'refinery'
|
2
|
+
|
3
|
+
module Refinery
|
4
|
+
module Members
|
5
|
+
class Engine < Rails::Engine
|
6
|
+
initializer "static assets" do |app|
|
7
|
+
app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public"
|
8
|
+
end
|
9
|
+
|
10
|
+
config.after_initialize do
|
11
|
+
Refinery::Plugin.register do |plugin|
|
12
|
+
plugin.name = "members"
|
13
|
+
plugin.activity = {
|
14
|
+
:class => Member,
|
15
|
+
:title => 'email'
|
16
|
+
}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: refinerycms-members-ci
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Based on work of n5ken, modified by ovargas27
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-03-19 00:00:00 -06:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description: Ruby on Rails Members engine for Refinery CMS
|
23
|
+
email:
|
24
|
+
executables: []
|
25
|
+
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files: []
|
29
|
+
|
30
|
+
files:
|
31
|
+
- lib/generators/refinerycms_members_generator.rb
|
32
|
+
- lib/refinerycms-members.rb
|
33
|
+
- lib/tasks/members.rake
|
34
|
+
- config/locales/en.yml
|
35
|
+
- config/locales/lolcat.yml
|
36
|
+
- config/locales/nb.yml
|
37
|
+
- config/locales/nl.yml
|
38
|
+
- config/routes.rb
|
39
|
+
- app/controllers/admin/members_controller.rb
|
40
|
+
- app/controllers/members_controller.rb
|
41
|
+
- app/controllers/pages_controller.rb
|
42
|
+
- app/controllers/registrations_controller.rb
|
43
|
+
- app/models/member.rb
|
44
|
+
- app/views/admin/members/_actions.html.erb
|
45
|
+
- app/views/admin/members/_form.html.erb
|
46
|
+
- app/views/admin/members/_member.html.erb
|
47
|
+
- app/views/admin/members/_members.html.erb
|
48
|
+
- app/views/admin/members/_records.html.erb
|
49
|
+
- app/views/admin/members/_sortable_list.html.erb
|
50
|
+
- app/views/admin/members/edit.html.erb
|
51
|
+
- app/views/admin/members/index.html.erb
|
52
|
+
- app/views/admin/members/new.html.erb
|
53
|
+
- app/views/admin/pages/_form_advanced_options.html.erb
|
54
|
+
- app/views/devise/confirmations/new.html.erb
|
55
|
+
- app/views/devise/mailer/confirmation_instructions.html.erb
|
56
|
+
- app/views/devise/mailer/reset_password_instructions.html.erb
|
57
|
+
- app/views/devise/mailer/unlock_instructions.html.erb
|
58
|
+
- app/views/devise/passwords/edit.html.erb
|
59
|
+
- app/views/devise/passwords/new.html.erb
|
60
|
+
- app/views/devise/registrations/edit.html.erb
|
61
|
+
- app/views/devise/sessions/new.html.erb
|
62
|
+
- app/views/devise/shared/_links.erb
|
63
|
+
- app/views/devise/unlocks/new.html.erb
|
64
|
+
- app/views/registrations/edit.html.erb
|
65
|
+
- app/views/registrations/new.html.erb
|
66
|
+
- app/views/shared/_header.html.erb
|
67
|
+
has_rdoc: true
|
68
|
+
homepage: https://github.com/crowdint/refinerycms-member
|
69
|
+
licenses: []
|
70
|
+
|
71
|
+
post_install_message:
|
72
|
+
rdoc_options: []
|
73
|
+
|
74
|
+
require_paths:
|
75
|
+
- lib
|
76
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
77
|
+
none: false
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
hash: 3
|
82
|
+
segments:
|
83
|
+
- 0
|
84
|
+
version: "0"
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
hash: 3
|
91
|
+
segments:
|
92
|
+
- 0
|
93
|
+
version: "0"
|
94
|
+
requirements: []
|
95
|
+
|
96
|
+
rubyforge_project:
|
97
|
+
rubygems_version: 1.3.7
|
98
|
+
signing_key:
|
99
|
+
specification_version: 3
|
100
|
+
summary: Members engine for Refinery CMS
|
101
|
+
test_files: []
|
102
|
+
|