refinerycms-magickal_workings 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/refinery/magickal_working/admin/magickal_workings_controller.rb +12 -0
- data/app/controllers/refinery/magickal_working/magickal_workings_controller.rb +34 -0
- data/app/models/refinery/magickal_working/magickal_working.rb +13 -0
- data/app/views/refinery/magickal_working/admin/magickal_workings/_actions.html.erb +25 -0
- data/app/views/refinery/magickal_working/admin/magickal_workings/_form.html.erb +92 -0
- data/app/views/refinery/magickal_working/admin/magickal_workings/_magickal_working.html.erb +20 -0
- data/app/views/refinery/magickal_working/admin/magickal_workings/_magickal_workings.html.erb +2 -0
- data/app/views/refinery/magickal_working/admin/magickal_workings/_records.html.erb +18 -0
- data/app/views/refinery/magickal_working/admin/magickal_workings/_sortable_list.html.erb +5 -0
- data/app/views/refinery/magickal_working/admin/magickal_workings/edit.html.erb +1 -0
- data/app/views/refinery/magickal_working/admin/magickal_workings/index.html.erb +7 -0
- data/app/views/refinery/magickal_working/admin/magickal_workings/new.html.erb +1 -0
- data/app/views/refinery/magickal_working/magickal_workings/index.html.erb +11 -0
- data/app/views/refinery/magickal_working/magickal_workings/show.html.erb +87 -0
- data/config/locales/en.yml +37 -0
- data/config/locales/es.yml +38 -0
- data/config/locales/fr.yml +37 -0
- data/config/locales/nb.yml +37 -0
- data/config/locales/nl.yml +37 -0
- data/config/locales/sk.yml +37 -0
- data/config/routes.rb +19 -0
- data/db/migrate/1_create_magickal_working_magickal_workings.rb +36 -0
- data/db/seeds.rb +25 -0
- data/lib/generators/refinery/magickal_workings_generator.rb +19 -0
- data/lib/refinery/magickal_workings.rb +21 -0
- data/lib/refinery/magickal_workings/engine.rb +27 -0
- data/lib/refinerycms-magickal_workings.rb +1 -0
- data/lib/tasks/refinery/magickal_workings.rake +13 -0
- data/readme.md +10 -0
- metadata +107 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
module Refinery
|
2
|
+
module MagickalWorking
|
3
|
+
module Admin
|
4
|
+
class MagickalWorkingsController < ::Refinery::AdminController
|
5
|
+
|
6
|
+
crudify :'refinery/magickal_working/magickal_working',
|
7
|
+
:title_attribute => 'opus', :xhr_paging => true
|
8
|
+
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Refinery
|
2
|
+
module MagickalWorking
|
3
|
+
class MagickalWorkingsController < ::ApplicationController
|
4
|
+
|
5
|
+
before_filter :find_all_magickal_workings
|
6
|
+
before_filter :find_page
|
7
|
+
|
8
|
+
def index
|
9
|
+
# you can use meta fields from your model instead (e.g. browser_title)
|
10
|
+
# by swapping @page for @magickal_working in the line below:
|
11
|
+
present(@page)
|
12
|
+
end
|
13
|
+
|
14
|
+
def show
|
15
|
+
@magickal_working = MagickalWorking.find(params[:id])
|
16
|
+
|
17
|
+
# you can use meta fields from your model instead (e.g. browser_title)
|
18
|
+
# by swapping @page for @magickal_working in the line below:
|
19
|
+
present(@page)
|
20
|
+
end
|
21
|
+
|
22
|
+
protected
|
23
|
+
|
24
|
+
def find_all_magickal_workings
|
25
|
+
@magickal_workings = MagickalWorking.order('position ASC')
|
26
|
+
end
|
27
|
+
|
28
|
+
def find_page
|
29
|
+
@page = ::Refinery::Page.where(:link_url => "/magickal_workings").first
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Refinery
|
2
|
+
module MagickalWorking
|
3
|
+
class MagickalWorking < Refinery::Core::BaseModel
|
4
|
+
self.table_name = 'refinery_magickal_workings'
|
5
|
+
|
6
|
+
attr_accessible :opus, :start, :finish, :anno, :sol, :luna, :location, :weather, :magick, :notes, :comments, :position
|
7
|
+
|
8
|
+
acts_as_indexed :fields => [:opus, :anno, :sol, :luna, :location, :weather, :magick, :notes, :comments]
|
9
|
+
|
10
|
+
validates :opus, :presence => true, :uniqueness => true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<ul>
|
2
|
+
<% if ::Refinery::MagickalWorking::Admin::MagickalWorkingsController.searchable? %>
|
3
|
+
<li>
|
4
|
+
<%= render '/refinery/admin/search', :url => refinery.magickal_working_admin_magickal_workings_path %>
|
5
|
+
</li>
|
6
|
+
<% end %>
|
7
|
+
<li>
|
8
|
+
<%= link_to t('.create_new'), refinery.new_magickal_working_admin_magickal_working_path,
|
9
|
+
:class => "add_icon" %>
|
10
|
+
</li>
|
11
|
+
<% if !searching? && ::Refinery::MagickalWorking::Admin::MagickalWorkingsController.sortable? && ::Refinery::MagickalWorking::MagickalWorking.any? %>
|
12
|
+
<li>
|
13
|
+
<%= link_to t('.reorder', :what => "Magickal Workings"),
|
14
|
+
refinery.magickal_working_admin_magickal_workings_path,
|
15
|
+
:id => "reorder_action",
|
16
|
+
:class => "reorder_icon" %>
|
17
|
+
|
18
|
+
<%= link_to t('.reorder_done', :what => "Magickal Workings"),
|
19
|
+
refinery.magickal_working_admin_magickal_workings_path,
|
20
|
+
:id => "reorder_action_done",
|
21
|
+
:style => "display: none;",
|
22
|
+
:class => "reorder_icon" %>
|
23
|
+
</li>
|
24
|
+
<% end %>
|
25
|
+
</ul>
|
@@ -0,0 +1,92 @@
|
|
1
|
+
<%= form_for [refinery, :magickal_working_admin, @magickal_working] do |f| -%>
|
2
|
+
<%= render '/refinery/admin/error_messages',
|
3
|
+
:object => @magickal_working,
|
4
|
+
:include_object_name => true %>
|
5
|
+
|
6
|
+
|
7
|
+
<div class='field'>
|
8
|
+
<%= f.label :opus -%>
|
9
|
+
<%= f.text_field :opus, :class => 'larger widest' -%>
|
10
|
+
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class='field'>
|
14
|
+
<%= f.label :start -%>
|
15
|
+
<%= f.datetime_select :start -%>
|
16
|
+
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class='field'>
|
20
|
+
<%= f.label :finish -%>
|
21
|
+
<%= f.datetime_select :finish -%>
|
22
|
+
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div class='field'>
|
26
|
+
<%= f.label :anno -%>
|
27
|
+
<%= f.text_field :anno -%>
|
28
|
+
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class='field'>
|
32
|
+
<%= f.label :sol -%>
|
33
|
+
<%= f.text_field :sol -%>
|
34
|
+
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div class='field'>
|
38
|
+
<%= f.label :luna -%>
|
39
|
+
<%= f.text_field :luna -%>
|
40
|
+
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div class='field'>
|
44
|
+
<%= f.label :location -%>
|
45
|
+
<%= f.text_field :location -%>
|
46
|
+
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div class='field'>
|
50
|
+
<%= f.label :weather -%>
|
51
|
+
<%= f.text_field :weather -%>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<div class='field'>
|
56
|
+
<div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'>
|
57
|
+
<ul id='page_parts'>
|
58
|
+
<% [:magick, :notes, :comments].each_with_index do |part, part_index| %>
|
59
|
+
<li class='ui-state-default<%= ' ui-state-active' if part_index == 0 %>'>
|
60
|
+
<%= link_to t("#{part}", :scope => "activerecord.attributes.refinery/magickal_working/magickal_working", :default => part.to_s.titleize), "##{part}" %>
|
61
|
+
</li>
|
62
|
+
<% end %>
|
63
|
+
</ul>
|
64
|
+
<div id='page_part_editors'>
|
65
|
+
<% [:magick, :notes, :comments].each do |part| %>
|
66
|
+
<div class='page_part' id='<%= part %>'>
|
67
|
+
<%= f.text_area part, :rows => 20, :class => 'wymeditor widest' -%>
|
68
|
+
</div>
|
69
|
+
<% end %>
|
70
|
+
</div>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<%= render '/refinery/admin/form_actions', :f => f,
|
82
|
+
:continue_editing => false,
|
83
|
+
:delete_title => t('delete', :scope => 'refinery.magickal_workings.admin.magickal_workings.magickal_working'),
|
84
|
+
:delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @magickal_working.opus) %>
|
85
|
+
<% end -%>
|
86
|
+
<% content_for :javascripts do %>
|
87
|
+
<script>
|
88
|
+
$(document).ready(function(){
|
89
|
+
page_options.init(false, '', '');
|
90
|
+
});
|
91
|
+
</script>
|
92
|
+
<% end %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(magickal_working) -%>">
|
2
|
+
<span class='title'>
|
3
|
+
<%= magickal_working.opus %>
|
4
|
+
|
5
|
+
</span>
|
6
|
+
<span class='actions'>
|
7
|
+
|
8
|
+
<%= link_to refinery_icon_tag("application_go.png"), refinery.magickal_working_magickal_working_path(magickal_working),
|
9
|
+
:title => t('.view_live_html'),
|
10
|
+
:target => "_blank" %>
|
11
|
+
|
12
|
+
<%= link_to refinery_icon_tag("application_edit.png"), refinery.edit_magickal_working_admin_magickal_working_path(magickal_working),
|
13
|
+
:title => t('.edit') %>
|
14
|
+
<%= link_to refinery_icon_tag("delete.png"), refinery.magickal_working_admin_magickal_working_path(magickal_working),
|
15
|
+
:class => "cancel confirm-delete",
|
16
|
+
:title => t('.delete'),
|
17
|
+
:confirm => t('message', :scope => 'refinery.admin.delete', :title => magickal_working.opus),
|
18
|
+
:method => :delete %>
|
19
|
+
</span>
|
20
|
+
</li>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if searching? %>
|
2
|
+
<h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
|
3
|
+
<% end %>
|
4
|
+
<div class='pagination_container'>
|
5
|
+
<% if @magickal_workings.any? %>
|
6
|
+
<%= render 'magickal_workings' %>
|
7
|
+
<% else %>
|
8
|
+
<p>
|
9
|
+
<% unless searching? %>
|
10
|
+
<strong>
|
11
|
+
<%= t('.no_items_yet') %>
|
12
|
+
</strong>
|
13
|
+
<% else %>
|
14
|
+
<%= t('no_results', :scope => 'refinery.admin.search') %>
|
15
|
+
<% end %>
|
16
|
+
</p>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'form' %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<section id='records'>
|
2
|
+
<%= render 'records' %>
|
3
|
+
</section>
|
4
|
+
<aside id='actions'>
|
5
|
+
<%= render 'actions' %>
|
6
|
+
</aside>
|
7
|
+
<%= render '/refinery/admin/make_sortable', :tree => false if !searching? and ::Refinery::MagickalWorking::Admin::MagickalWorkingsController.sortable? and ::Refinery::MagickalWorking::MagickalWorking.count > 1 %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'form' %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% content_for :body do %>
|
2
|
+
<ul id="magickal_workings">
|
3
|
+
<% @magickal_workings.each do |magickal_working| %>
|
4
|
+
<li>
|
5
|
+
<%= link_to magickal_working.opus, refinery.magickal_working_magickal_working_path(magickal_working) %>
|
6
|
+
</li>
|
7
|
+
<% end %>
|
8
|
+
</ul>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= render '/refinery/content_page' %>
|
@@ -0,0 +1,87 @@
|
|
1
|
+
<% content_for :body_content_title do %>
|
2
|
+
<%= @magickal_working.opus %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :body do %>
|
6
|
+
<section>
|
7
|
+
<h1>Opus</h1>
|
8
|
+
<p>
|
9
|
+
<%=raw @magickal_working.opus %>
|
10
|
+
</p>
|
11
|
+
</section>
|
12
|
+
<section>
|
13
|
+
<h1>Start</h1>
|
14
|
+
<p>
|
15
|
+
<%=raw @magickal_working.start %>
|
16
|
+
</p>
|
17
|
+
</section>
|
18
|
+
<section>
|
19
|
+
<h1>Finish</h1>
|
20
|
+
<p>
|
21
|
+
<%=raw @magickal_working.finish %>
|
22
|
+
</p>
|
23
|
+
</section>
|
24
|
+
<section>
|
25
|
+
<h1>Anno</h1>
|
26
|
+
<p>
|
27
|
+
<%=raw @magickal_working.anno %>
|
28
|
+
</p>
|
29
|
+
</section>
|
30
|
+
<section>
|
31
|
+
<h1>Sol</h1>
|
32
|
+
<p>
|
33
|
+
<%=raw @magickal_working.sol %>
|
34
|
+
</p>
|
35
|
+
</section>
|
36
|
+
<section>
|
37
|
+
<h1>Luna</h1>
|
38
|
+
<p>
|
39
|
+
<%=raw @magickal_working.luna %>
|
40
|
+
</p>
|
41
|
+
</section>
|
42
|
+
<section>
|
43
|
+
<h1>Location</h1>
|
44
|
+
<p>
|
45
|
+
<%=raw @magickal_working.location %>
|
46
|
+
</p>
|
47
|
+
</section>
|
48
|
+
<section>
|
49
|
+
<h1>Weather</h1>
|
50
|
+
<p>
|
51
|
+
<%=raw @magickal_working.weather %>
|
52
|
+
</p>
|
53
|
+
</section>
|
54
|
+
<section>
|
55
|
+
<h1>Magick</h1>
|
56
|
+
<p>
|
57
|
+
<%=raw @magickal_working.magick %>
|
58
|
+
</p>
|
59
|
+
</section>
|
60
|
+
<section>
|
61
|
+
<h1>Notes</h1>
|
62
|
+
<p>
|
63
|
+
<%=raw @magickal_working.notes %>
|
64
|
+
</p>
|
65
|
+
</section>
|
66
|
+
<section>
|
67
|
+
<h1>Comments</h1>
|
68
|
+
<p>
|
69
|
+
<%=raw @magickal_working.comments %>
|
70
|
+
</p>
|
71
|
+
</section>
|
72
|
+
<% end %>
|
73
|
+
|
74
|
+
<% content_for :side_body do %>
|
75
|
+
<aside>
|
76
|
+
<h2><%= t('.other') %></h2>
|
77
|
+
<ul id="magickal_workings">
|
78
|
+
<% @magickal_workings.each do |magickal_working| %>
|
79
|
+
<li>
|
80
|
+
<%= link_to magickal_working.opus, refinery.magickal_working_magickal_working_path(magickal_working) %>
|
81
|
+
</li>
|
82
|
+
<% end %>
|
83
|
+
</ul>
|
84
|
+
</aside>
|
85
|
+
<% end %>
|
86
|
+
|
87
|
+
<%= render '/refinery/content_page' %>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
en:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
magickal_workings:
|
5
|
+
title: Magickal Workings
|
6
|
+
magickal_working:
|
7
|
+
admin:
|
8
|
+
magickal_workings:
|
9
|
+
actions:
|
10
|
+
create_new: Add New Magickal Working
|
11
|
+
reorder: Reorder Magickal Workings
|
12
|
+
reorder_done: Done Reordering Magickal Workings
|
13
|
+
records:
|
14
|
+
title: Magickal Workings
|
15
|
+
sorry_no_results: Sorry! There are no results found.
|
16
|
+
no_items_yet: There are no Magickal Workings yet. Click "Add New Magickal Working" to add your first magickal working.
|
17
|
+
magickal_working:
|
18
|
+
view_live_html: View this magickal working live <br/><em>(opens in a new window)</em>
|
19
|
+
edit: Edit this magickal working
|
20
|
+
delete: Remove this magickal working forever
|
21
|
+
magickal_workings:
|
22
|
+
show:
|
23
|
+
other: Other Magickal Workings
|
24
|
+
activerecord:
|
25
|
+
attributes:
|
26
|
+
'refinery/magickal_working/magickal_working':
|
27
|
+
opus: Opus
|
28
|
+
start: Start
|
29
|
+
finish: Finish
|
30
|
+
anno: Anno
|
31
|
+
sol: Sol
|
32
|
+
luna: Luna
|
33
|
+
location: Location
|
34
|
+
weather: Weather
|
35
|
+
magick: Magick
|
36
|
+
notes: Notes
|
37
|
+
comments: Comments
|
@@ -0,0 +1,38 @@
|
|
1
|
+
es:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
magickal_workings:
|
5
|
+
title: Magickal Workings
|
6
|
+
# article: masculino/femenino
|
7
|
+
magickal_working:
|
8
|
+
admin:
|
9
|
+
magickal_workings:
|
10
|
+
actions:
|
11
|
+
create_new: Crear nuevo magickal working
|
12
|
+
reorder: Reordenar magickal workings
|
13
|
+
reorder_done: Reordenación de magickal workings completada
|
14
|
+
records:
|
15
|
+
title: Magickal Workings
|
16
|
+
sorry_no_results: Lo siento, no hay resultados
|
17
|
+
no_items_yet: No hay magickal workings todavía. Pulsa en "Crear nuevo Magickal Working" para crear tu primer magickal working.
|
18
|
+
magickal_working:
|
19
|
+
view_live_html: Ver este magickal working como abierto al público <br/><em>(abre en ventana nueva)</em>
|
20
|
+
edit: Editar este magickal working
|
21
|
+
delete: Borrar este magickal working para siempre
|
22
|
+
magickal_workings:
|
23
|
+
show:
|
24
|
+
other: Otros magickal workings
|
25
|
+
activerecord:
|
26
|
+
attributes:
|
27
|
+
'refinery/magickal_working/magickal_working':
|
28
|
+
opus: Opus
|
29
|
+
start: Start
|
30
|
+
finish: Finish
|
31
|
+
anno: Anno
|
32
|
+
sol: Sol
|
33
|
+
luna: Luna
|
34
|
+
location: Location
|
35
|
+
weather: Weather
|
36
|
+
magick: Magick
|
37
|
+
notes: Notes
|
38
|
+
comments: Comments
|
@@ -0,0 +1,37 @@
|
|
1
|
+
fr:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
magickal_workings:
|
5
|
+
title: Magickal Workings
|
6
|
+
magickal_working:
|
7
|
+
admin:
|
8
|
+
magickal_workings:
|
9
|
+
actions:
|
10
|
+
create_new: Créer un(e) nouve(au/l/lle) Magickal Working
|
11
|
+
reorder: Réordonner les Magickal Workings
|
12
|
+
reorder_done: Fin de réordonnancement des Magickal Workings
|
13
|
+
records:
|
14
|
+
title: Magickal Workings
|
15
|
+
sorry_no_results: "Désolé ! Aucun résultat."
|
16
|
+
no_items_yet: 'Il n''y a actuellement aucun(e) Magickal Working. Cliquer sur "Créer un(e) nouve(au/l/lle) Magickal Working" pour créer votre premi(er/ère) magickal working.'
|
17
|
+
magickal_working:
|
18
|
+
view_live_html: Voir ce(t/tte) magickal working <br/><em>(Ouvre une nouvelle fenêtre)</em>
|
19
|
+
edit: Modifier ce(t/tte) magickal working
|
20
|
+
delete: Supprimer définitivement ce(t/tte) magickal working
|
21
|
+
magickal_workings:
|
22
|
+
show:
|
23
|
+
other: Autres Magickal Workings
|
24
|
+
activerecord:
|
25
|
+
attributes:
|
26
|
+
'refinery/magickal_working/magickal_working':
|
27
|
+
opus: Opus
|
28
|
+
start: Start
|
29
|
+
finish: Finish
|
30
|
+
anno: Anno
|
31
|
+
sol: Sol
|
32
|
+
luna: Luna
|
33
|
+
location: Location
|
34
|
+
weather: Weather
|
35
|
+
magick: Magick
|
36
|
+
notes: Notes
|
37
|
+
comments: Comments
|
@@ -0,0 +1,37 @@
|
|
1
|
+
nb:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
magickal_workings:
|
5
|
+
title: Magickal Workings
|
6
|
+
magickal_working:
|
7
|
+
admin:
|
8
|
+
magickal_workings:
|
9
|
+
actions:
|
10
|
+
create_new: Lag en ny Magickal Working
|
11
|
+
reorder: Endre rekkefølgen på Magickal Workings
|
12
|
+
reorder_done: Ferdig å endre rekkefølgen Magickal Workings
|
13
|
+
records:
|
14
|
+
title: Magickal Workings
|
15
|
+
sorry_no_results: Beklager! Vi fant ikke noen resultater.
|
16
|
+
no_items_yet: Det er ingen Magickal Workings enda. Klikk på "Lag en ny Magickal Working" for å legge til din første magickal working.
|
17
|
+
magickal_working:
|
18
|
+
view_live_html: Vis hvordan denne magickal working ser ut offentlig <br/><em>(åpner i et nytt vindu)</em>
|
19
|
+
edit: Rediger denne magickal working
|
20
|
+
delete: Fjern denne magickal working permanent
|
21
|
+
magickal_workings:
|
22
|
+
show:
|
23
|
+
other: Andre Magickal Workings
|
24
|
+
activerecord:
|
25
|
+
attributes:
|
26
|
+
'refinery/magickal_working/magickal_working':
|
27
|
+
opus: Opus
|
28
|
+
start: Start
|
29
|
+
finish: Finish
|
30
|
+
anno: Anno
|
31
|
+
sol: Sol
|
32
|
+
luna: Luna
|
33
|
+
location: Location
|
34
|
+
weather: Weather
|
35
|
+
magick: Magick
|
36
|
+
notes: Notes
|
37
|
+
comments: Comments
|
@@ -0,0 +1,37 @@
|
|
1
|
+
nl:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
magickal_workings:
|
5
|
+
title: Magickal Workings
|
6
|
+
magickal_working:
|
7
|
+
admin:
|
8
|
+
magickal_workings:
|
9
|
+
actions:
|
10
|
+
create_new: Maak een nieuwe Magickal Working
|
11
|
+
reorder: Wijzig de volgorde van de Magickal Workings
|
12
|
+
reorder_done: Klaar met het wijzingen van de volgorde van de Magickal Workings
|
13
|
+
records:
|
14
|
+
title: Magickal Workings
|
15
|
+
sorry_no_results: Helaas! Er zijn geen resultaten gevonden.
|
16
|
+
no_items_yet: Er zijn nog geen Magickal Workings. Druk op 'Maak een nieuwe Magickal Working' om de eerste aan te maken.
|
17
|
+
magickal_working:
|
18
|
+
view_live_html: Bekijk deze magickal working op de website <br/><em>(opent een nieuw venster)</em>
|
19
|
+
edit: Bewerk deze magickal working
|
20
|
+
delete: Verwijder deze magickal working voor eeuwig
|
21
|
+
magickal_workings:
|
22
|
+
show:
|
23
|
+
other: Andere Magickal Workings
|
24
|
+
activerecord:
|
25
|
+
attributes:
|
26
|
+
'refinery/magickal_working/magickal_working':
|
27
|
+
opus: Opus
|
28
|
+
start: Start
|
29
|
+
finish: Finish
|
30
|
+
anno: Anno
|
31
|
+
sol: Sol
|
32
|
+
luna: Luna
|
33
|
+
location: Location
|
34
|
+
weather: Weather
|
35
|
+
magick: Magick
|
36
|
+
notes: Notes
|
37
|
+
comments: Comments
|
@@ -0,0 +1,37 @@
|
|
1
|
+
sk:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
magickal_workings:
|
5
|
+
title: Magickal Workings
|
6
|
+
magickal_working:
|
7
|
+
admin:
|
8
|
+
magickal_workings:
|
9
|
+
actions:
|
10
|
+
create_new: Pridať Magickal Working
|
11
|
+
reorder: Preusporiadať Magickal Workings
|
12
|
+
reorder_done: Koniec radenia Magickal Workings
|
13
|
+
records:
|
14
|
+
title: Magickal Workings
|
15
|
+
sorry_no_results: Ľutujeme, ale neboli nájdené žiadne výsledky.
|
16
|
+
no_items_yet: Nie sú vytvorené žiadne Magickal Workings. Kliknite na "Pridať Magickal Working" pre pridanie prvého magickal working.
|
17
|
+
magickal_working:
|
18
|
+
view_live_html: Zobraziť náhľad magickal working<br/><em>(otvorí sa v novom okne)</em>
|
19
|
+
edit: Upraviť magickal working
|
20
|
+
delete: Zmazať magickal working
|
21
|
+
magickal_workings:
|
22
|
+
show:
|
23
|
+
other: Daľšie Magickal Workings
|
24
|
+
activerecord:
|
25
|
+
attributes:
|
26
|
+
'refinery/magickal_working/magickal_working':
|
27
|
+
opus: Opus
|
28
|
+
start: Start
|
29
|
+
finish: Finish
|
30
|
+
anno: Anno
|
31
|
+
sol: Sol
|
32
|
+
luna: Luna
|
33
|
+
location: Location
|
34
|
+
weather: Weather
|
35
|
+
magick: Magick
|
36
|
+
notes: Notes
|
37
|
+
comments: Comments
|
data/config/routes.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Refinery::Core::Engine.routes.append do
|
2
|
+
|
3
|
+
# Frontend routes
|
4
|
+
namespace :magickal_working do
|
5
|
+
resources :magickal_workings, :only => [:index, :show]
|
6
|
+
end
|
7
|
+
|
8
|
+
# Admin routes
|
9
|
+
namespace :magickal_working, :path => '' do
|
10
|
+
namespace :admin, :path => 'refinery/magickal_working' do
|
11
|
+
resources :magickal_workings, :except => :show do
|
12
|
+
collection do
|
13
|
+
post :update_positions
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
class CreateMagickalWorkingMagickalWorkings < ActiveRecord::Migration
|
2
|
+
|
3
|
+
def up
|
4
|
+
create_table :refinery_magickal_workings do |t|
|
5
|
+
t.string :opus
|
6
|
+
t.datetime :start
|
7
|
+
t.datetime :finish
|
8
|
+
t.string :anno
|
9
|
+
t.string :sol
|
10
|
+
t.string :luna
|
11
|
+
t.string :location
|
12
|
+
t.string :weather
|
13
|
+
t.text :magick
|
14
|
+
t.text :notes
|
15
|
+
t.text :comments
|
16
|
+
t.integer :position
|
17
|
+
|
18
|
+
t.timestamps
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
def down
|
24
|
+
if defined?(::Refinery::UserPlugin)
|
25
|
+
::Refinery::UserPlugin.destroy_all({:name => "refinerycms-magickal_working"})
|
26
|
+
end
|
27
|
+
|
28
|
+
if defined?(::Refinery::Page)
|
29
|
+
::Refinery::Page.delete_all({:link_url => "/magickal_working/magickal_workings"})
|
30
|
+
end
|
31
|
+
|
32
|
+
drop_table :refinery_magickal_workings
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
data/db/seeds.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
(Refinery.i18n_enabled? ? Refinery::I18n.frontend_locales : [:en]).each do |lang|
|
2
|
+
I18n.locale = lang
|
3
|
+
|
4
|
+
if defined?(Refinery::User)
|
5
|
+
Refinery::User.all.each do |user|
|
6
|
+
if user.plugins.where(:name => 'refinerycms-magickal_working').blank?
|
7
|
+
user.plugins.create(:name => 'refinerycms-magickal_working',
|
8
|
+
:position => (user.plugins.maximum(:position) || -1) +1)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
url = "/magickal_working/magickal_workings"
|
14
|
+
if defined?(Refinery::Page) && Refinery::Page.where(:link_url => url).empty?
|
15
|
+
page = Refinery::Page.create(
|
16
|
+
:title => 'Magickal Workings',
|
17
|
+
:link_url => url,
|
18
|
+
:deletable => false,
|
19
|
+
:menu_match => "^#{url}(\/|\/.+?|)$"
|
20
|
+
)
|
21
|
+
Refinery::Pages.default_parts.each_with_index do |default_page_part, index|
|
22
|
+
page.parts.create(:title => default_page_part, :body => nil, :position => index)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Refinery
|
2
|
+
class MagickalWorkingsGenerator < Rails::Generators::Base
|
3
|
+
|
4
|
+
def rake_db
|
5
|
+
rake("refinery_magickal_workings:install:migrations")
|
6
|
+
end
|
7
|
+
|
8
|
+
def append_load_seed_data
|
9
|
+
create_file 'db/seeds.rb' unless File.exists?(File.join(destination_root, 'db', 'seeds.rb'))
|
10
|
+
append_file 'db/seeds.rb', :verbose => true do
|
11
|
+
<<-EOH
|
12
|
+
|
13
|
+
# Added by Refinery CMS Magickal Workings extension
|
14
|
+
Refinery::MagickalWorking::Engine.load_seed
|
15
|
+
EOH
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'refinerycms-core'
|
2
|
+
|
3
|
+
module Refinery
|
4
|
+
autoload :MagickalWorkingsGenerator, 'generators/refinery/magickal_workings_generator'
|
5
|
+
|
6
|
+
module MagickalWorkings
|
7
|
+
require 'refinery/magickal_workings/engine'
|
8
|
+
|
9
|
+
class << self
|
10
|
+
attr_writer :root
|
11
|
+
|
12
|
+
def root
|
13
|
+
@root ||= Pathname.new(File.expand_path('../../../', __FILE__))
|
14
|
+
end
|
15
|
+
|
16
|
+
def factory_paths
|
17
|
+
@factory_paths ||= [ root.join('spec', 'factories').to_s ]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Refinery
|
2
|
+
module MagickalWorking
|
3
|
+
class Engine < Rails::Engine
|
4
|
+
include Refinery::Engine
|
5
|
+
isolate_namespace Refinery::MagickalWorking
|
6
|
+
|
7
|
+
engine_name :refinery_magickal_workings
|
8
|
+
|
9
|
+
initializer "register refinerycms_magickal_workings plugin" do
|
10
|
+
Refinery::Plugin.register do |plugin|
|
11
|
+
plugin.name = "magickal_workings"
|
12
|
+
plugin.url = proc { Refinery::Core::Engine.routes.url_helpers.magickal_working_admin_magickal_workings_path }
|
13
|
+
plugin.pathname = root
|
14
|
+
plugin.activity = {
|
15
|
+
:class_name => :'refinery/magickal_working/magickal_working',
|
16
|
+
:title => 'opus'
|
17
|
+
}
|
18
|
+
plugin.menu_match = %r{refinery/magickal_working/magickal_workings(/.*)?$}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
config.after_initialize do
|
23
|
+
Refinery.register_extension(Refinery::MagickalWorkings)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'refinery/magickal_workings'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
namespace :refinery do
|
2
|
+
|
3
|
+
namespace :magickal_workings do
|
4
|
+
|
5
|
+
# call this task by running: rake refinery:magickal_workings:my_task
|
6
|
+
# desc "Description of my task below"
|
7
|
+
# task :my_task => :environment do
|
8
|
+
# # add your logic here
|
9
|
+
# end
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
data/readme.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Magickal Workings extension for Refinery CMS.
|
2
|
+
|
3
|
+
## How to build this extension as a gem
|
4
|
+
|
5
|
+
cd vendor/extensions/magickal_workings
|
6
|
+
gem build refinerycms-magickal_workings.gemspec
|
7
|
+
gem install refinerycms-magickal_workings.gem
|
8
|
+
|
9
|
+
# Sign up for a http://rubygems.org/ account and publish the gem
|
10
|
+
gem push refinerycms-magickal_workings.gem
|
metadata
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: refinerycms-magickal_workings
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.0'
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- NShYH
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-11-21 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: refinerycms-core
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 2.0.8
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.0.8
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: refinerycms-testing
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 2.0.8
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.0.8
|
46
|
+
description: Ruby on Rails Magickal Workings extension for Refinery CMS
|
47
|
+
email: frater.nshyh@nightofpan.com
|
48
|
+
executables: []
|
49
|
+
extensions: []
|
50
|
+
extra_rdoc_files: []
|
51
|
+
files:
|
52
|
+
- app/controllers/refinery/magickal_working/admin/magickal_workings_controller.rb
|
53
|
+
- app/controllers/refinery/magickal_working/magickal_workings_controller.rb
|
54
|
+
- app/models/refinery/magickal_working/magickal_working.rb
|
55
|
+
- app/views/refinery/magickal_working/admin/magickal_workings/_actions.html.erb
|
56
|
+
- app/views/refinery/magickal_working/admin/magickal_workings/_form.html.erb
|
57
|
+
- app/views/refinery/magickal_working/admin/magickal_workings/_magickal_working.html.erb
|
58
|
+
- app/views/refinery/magickal_working/admin/magickal_workings/_magickal_workings.html.erb
|
59
|
+
- app/views/refinery/magickal_working/admin/magickal_workings/_records.html.erb
|
60
|
+
- app/views/refinery/magickal_working/admin/magickal_workings/_sortable_list.html.erb
|
61
|
+
- app/views/refinery/magickal_working/admin/magickal_workings/edit.html.erb
|
62
|
+
- app/views/refinery/magickal_working/admin/magickal_workings/index.html.erb
|
63
|
+
- app/views/refinery/magickal_working/admin/magickal_workings/new.html.erb
|
64
|
+
- app/views/refinery/magickal_working/magickal_workings/index.html.erb
|
65
|
+
- app/views/refinery/magickal_working/magickal_workings/show.html.erb
|
66
|
+
- config/locales/en.yml
|
67
|
+
- config/locales/es.yml
|
68
|
+
- config/locales/fr.yml
|
69
|
+
- config/locales/nb.yml
|
70
|
+
- config/locales/nl.yml
|
71
|
+
- config/locales/sk.yml
|
72
|
+
- config/routes.rb
|
73
|
+
- db/migrate/1_create_magickal_working_magickal_workings.rb
|
74
|
+
- db/seeds.rb
|
75
|
+
- lib/generators/refinery/magickal_workings_generator.rb
|
76
|
+
- lib/refinery/magickal_workings/engine.rb
|
77
|
+
- lib/refinery/magickal_workings.rb
|
78
|
+
- lib/refinerycms-magickal_workings.rb
|
79
|
+
- lib/tasks/refinery/magickal_workings.rake
|
80
|
+
- readme.md
|
81
|
+
homepage: http://www.nightofpan.com
|
82
|
+
licenses:
|
83
|
+
- GPL-2
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
96
|
+
requirements:
|
97
|
+
- - ! '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
requirements: []
|
101
|
+
rubyforge_project:
|
102
|
+
rubygems_version: 1.8.24
|
103
|
+
signing_key:
|
104
|
+
specification_version: 3
|
105
|
+
summary: Magickal Workings extension for Refinery CMS. This Gem creates a Magickal
|
106
|
+
Journal in Refinery CMS for use by Mystics, Magicians, and Thelemites.
|
107
|
+
test_files: []
|