refinerycms-real_estates 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/admin/categories_controller.rb +7 -0
- data/app/controllers/admin/real_estates_controller.rb +8 -0
- data/app/controllers/categories_controller.rb +30 -0
- data/app/controllers/real_estates_controller.rb +30 -0
- data/app/models/category.rb +7 -0
- data/app/models/real_estate.rb +10 -0
- data/app/views/admin/categories/_actions.html.erb +28 -0
- data/app/views/admin/categories/_categories.html.erb +2 -0
- data/app/views/admin/categories/_category.html.erb +18 -0
- data/app/views/admin/categories/_form.html.erb +19 -0
- data/app/views/admin/categories/_records.html.erb +18 -0
- data/app/views/admin/categories/_sortable_list.html.erb +7 -0
- data/app/views/admin/categories/edit.html.erb +1 -0
- data/app/views/admin/categories/index.html.erb +10 -0
- data/app/views/admin/categories/new.html.erb +1 -0
- data/app/views/admin/real_estates/_actions.html.erb +33 -0
- data/app/views/admin/real_estates/_form.html.erb +72 -0
- data/app/views/admin/real_estates/_real_estate.html.erb +18 -0
- data/app/views/admin/real_estates/_real_estates.html.erb +2 -0
- data/app/views/admin/real_estates/_records.html.erb +18 -0
- data/app/views/admin/real_estates/_sortable_list.html.erb +7 -0
- data/app/views/admin/real_estates/edit.html.erb +1 -0
- data/app/views/admin/real_estates/index.html.erb +10 -0
- data/app/views/admin/real_estates/new.html.erb +1 -0
- data/app/views/categories/index.html.erb +11 -0
- data/app/views/categories/show.html.erb +27 -0
- data/app/views/real_estates/index.html.erb +11 -0
- data/app/views/real_estates/show.html.erb +39 -0
- data/config/locales/en.yml +44 -0
- data/config/locales/lolcat.yml +44 -0
- data/config/locales/nb.yml +40 -0
- data/config/locales/nl.yml +40 -0
- data/config/locales/pt-BR.yml +43 -0
- data/config/routes.rb +20 -0
- data/lib/generators/refinerycms_categories_generator.rb +6 -0
- data/lib/generators/refinerycms_real_estates_generator.rb +6 -0
- data/lib/refinerycms-categories.rb +19 -0
- data/lib/refinerycms-real_estates.rb +22 -0
- data/lib/tasks/categories.rake +13 -0
- data/lib/tasks/real_estates.rake +13 -0
- metadata +95 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
class CategoriesController < ApplicationController
|
2
|
+
|
3
|
+
before_filter :find_all_categories
|
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 @category in the line below:
|
9
|
+
present(@page)
|
10
|
+
end
|
11
|
+
|
12
|
+
def show
|
13
|
+
@category = Category.find(params[:id])
|
14
|
+
|
15
|
+
# you can use meta fields from your model instead (e.g. browser_title)
|
16
|
+
# by swapping @page for @category in the line below:
|
17
|
+
present(@page)
|
18
|
+
end
|
19
|
+
|
20
|
+
protected
|
21
|
+
|
22
|
+
def find_all_categories
|
23
|
+
@categories = Category.order('position ASC')
|
24
|
+
end
|
25
|
+
|
26
|
+
def find_page
|
27
|
+
@page = Page.where(:link_url => "/categories").first
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
class RealEstatesController < ApplicationController
|
2
|
+
|
3
|
+
before_filter :find_all_real_estates
|
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 @real_estate in the line below:
|
9
|
+
present(@page)
|
10
|
+
end
|
11
|
+
|
12
|
+
def show
|
13
|
+
@real_estate = RealEstate.find(params[:id])
|
14
|
+
|
15
|
+
# you can use meta fields from your model instead (e.g. browser_title)
|
16
|
+
# by swapping @page for @real_estate in the line below:
|
17
|
+
present(@page)
|
18
|
+
end
|
19
|
+
|
20
|
+
protected
|
21
|
+
|
22
|
+
def find_all_real_estates
|
23
|
+
@real_estates = RealEstate.order('position ASC')
|
24
|
+
end
|
25
|
+
|
26
|
+
def find_page
|
27
|
+
@page = Page.where(:link_url => "/real_estates").first
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<ul>
|
2
|
+
<% if Admin::CategoriesController.searchable? %>
|
3
|
+
<li>
|
4
|
+
<%= render :partial => "/shared/admin/search",
|
5
|
+
:locals => {
|
6
|
+
:url => admin_categories_url
|
7
|
+
} %>
|
8
|
+
</li>
|
9
|
+
<% end %>
|
10
|
+
<li>
|
11
|
+
<%= link_to t('.create_new'), new_admin_category_url,
|
12
|
+
:class => "add_icon" %>
|
13
|
+
</li>
|
14
|
+
<% if !searching? and Admin::CategoriesController.sortable? and Category.count > 1 %>
|
15
|
+
<li>
|
16
|
+
<%= link_to t('.reorder', :what => "Categories"),
|
17
|
+
admin_categories_url,
|
18
|
+
:id => "reorder_action",
|
19
|
+
:class => "reorder_icon" %>
|
20
|
+
|
21
|
+
<%= link_to t('.reorder_done', :what => "Categories"),
|
22
|
+
admin_categories_url,
|
23
|
+
:id => "reorder_action_done",
|
24
|
+
:style => "display: none;",
|
25
|
+
:class => "reorder_icon" %>
|
26
|
+
</li>
|
27
|
+
<% end %>
|
28
|
+
</ul>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(category) -%>">
|
2
|
+
<span class='title'>
|
3
|
+
<%= category.title %>
|
4
|
+
<span class="preview"> </span>
|
5
|
+
</span>
|
6
|
+
<span class='actions'>
|
7
|
+
<%= link_to refinery_icon_tag("application_go.png"), category_url(category),
|
8
|
+
:title => t('.view_live_html'),
|
9
|
+
:target => "_blank" %>
|
10
|
+
<%= link_to refinery_icon_tag("application_edit.png"), edit_admin_category_path(category),
|
11
|
+
:title => t('.edit') %>
|
12
|
+
<%= link_to refinery_icon_tag("delete.png"), admin_category_path(category),
|
13
|
+
:class => "cancel confirm-delete",
|
14
|
+
:title => t('.delete'),
|
15
|
+
:confirm => t('message', :scope => 'shared.admin.delete', :title => category.title),
|
16
|
+
:method => :delete %>
|
17
|
+
</span>
|
18
|
+
</li>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%= form_for [:admin, @category] do |f| -%>
|
2
|
+
<%= render :partial => "/shared/admin/error_messages", :locals => {
|
3
|
+
:object => @category,
|
4
|
+
:include_object_name => true
|
5
|
+
} %>
|
6
|
+
|
7
|
+
<div class='field'>
|
8
|
+
<%= f.label :title -%>
|
9
|
+
<%= f.text_field :title, :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.categories.category'),
|
17
|
+
:delete_confirmation => t('message', :scope => 'shared.admin.delete', :title => @category.title)
|
18
|
+
} %>
|
19
|
+
<% end -%>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if searching? %>
|
2
|
+
<h2><%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %></h2>
|
3
|
+
<% end %>
|
4
|
+
<% if @categories.any? %>
|
5
|
+
<div class='pagination_container'>
|
6
|
+
<%= render :partial => 'categories' %>
|
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 => 'category', :collection => @categories %>
|
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::CategoriesController.sortable? and Category.count > 1 %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => "form" %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<ul>
|
2
|
+
<% if Admin::RealEstatesController.searchable? %>
|
3
|
+
<li>
|
4
|
+
<%= render :partial => "/shared/admin/search",
|
5
|
+
:locals => {
|
6
|
+
:url => admin_real_estates_url,
|
7
|
+
:url => admin_categories_url
|
8
|
+
} %>
|
9
|
+
</li>
|
10
|
+
<% end %>
|
11
|
+
<li>
|
12
|
+
<%= link_to t('.create_new'), new_admin_real_estate_url,
|
13
|
+
:class => "add_icon" %>
|
14
|
+
</li>
|
15
|
+
<li>
|
16
|
+
<%= link_to t('.create_new'), new_admin_category_url,
|
17
|
+
:class => "add_icon" %>
|
18
|
+
</li>
|
19
|
+
<% if !searching? and Admin::RealEstatesController.sortable? and RealEstate.count > 1 %>
|
20
|
+
<li>
|
21
|
+
<%= link_to t('.reorder', :what => "Real Estates"),
|
22
|
+
admin_real_estates_url,
|
23
|
+
:id => "reorder_action",
|
24
|
+
:class => "reorder_icon" %>
|
25
|
+
|
26
|
+
<%= link_to t('.reorder_done', :what => "Real Estates"),
|
27
|
+
admin_real_estates_url,
|
28
|
+
:id => "reorder_action_done",
|
29
|
+
:style => "display: none;",
|
30
|
+
:class => "reorder_icon" %>
|
31
|
+
</li>
|
32
|
+
<% end %>
|
33
|
+
</ul>
|
@@ -0,0 +1,72 @@
|
|
1
|
+
<%= form_for [:admin, @real_estate] do |f| -%>
|
2
|
+
<%= render :partial => "/shared/admin/error_messages", :locals => {
|
3
|
+
:object => @real_estate,
|
4
|
+
:include_object_name => true
|
5
|
+
} %>
|
6
|
+
|
7
|
+
|
8
|
+
<div id= "realestate_options">
|
9
|
+
<div class="column_left">
|
10
|
+
<div class="field">
|
11
|
+
<%= f.label :title -%>
|
12
|
+
<%= f.text_field :title, :size => "50" -%>
|
13
|
+
</div>
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :address -%>
|
16
|
+
<%= f.text_area :address, :cols => "50", :rows => "6" -%>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
</div>
|
20
|
+
<div class="column_right">
|
21
|
+
<div class="field">
|
22
|
+
<%= f.label :city -%>
|
23
|
+
<%= f.text_field :city , :size => "20" -%>
|
24
|
+
</div>
|
25
|
+
<div class="field">
|
26
|
+
<%= f.label :state -%>
|
27
|
+
<%= f.text_field :state , :size => "20" -%>
|
28
|
+
</div>
|
29
|
+
<div class="field">
|
30
|
+
<%= f.label :price -%>
|
31
|
+
<%= f.text_field :price , :size => "20"-%>
|
32
|
+
</div>
|
33
|
+
<div class="field">
|
34
|
+
<%= f.label :status -%>
|
35
|
+
<%= f.check_box :status -%>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
<div class='field'>
|
40
|
+
<div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'>
|
41
|
+
<ul id='page_parts'>
|
42
|
+
<% [:description].each_with_index do |part, part_index| %>
|
43
|
+
<li class='ui-state-default<%= ' ui-state-active' if part_index == 0 %>'>
|
44
|
+
<%= link_to part.to_s.titleize, "##{part}" %>
|
45
|
+
</li>
|
46
|
+
<% end %>
|
47
|
+
</ul>
|
48
|
+
|
49
|
+
<div id='page_part_editors'>
|
50
|
+
<% [:description].each do |part| %>
|
51
|
+
<div class='page_part' id='<%= part %>'>
|
52
|
+
<%= f.text_area part, :rows => 20, :class => 'wymeditor widest' -%>
|
53
|
+
</div>
|
54
|
+
<% end %>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<%= render :partial => "/shared/admin/form_actions",
|
59
|
+
:locals => {
|
60
|
+
:f => f,
|
61
|
+
:continue_editing => false,
|
62
|
+
:delete_title => t('delete', :scope => 'admin.real_estates.real_estate'),
|
63
|
+
:delete_confirmation => t('message', :scope => 'shared.admin.delete', :title => @real_estate.title)
|
64
|
+
} %>
|
65
|
+
<% end -%>
|
66
|
+
<% content_for :javascripts do %>
|
67
|
+
<script>
|
68
|
+
$(document).ready(function(){
|
69
|
+
page_options.init(false, '', '');
|
70
|
+
});
|
71
|
+
</script>
|
72
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(real_estate) -%>">
|
2
|
+
<span class='title'>
|
3
|
+
<%= real_estate.title %>
|
4
|
+
<span class="preview"> </span>
|
5
|
+
</span>
|
6
|
+
<span class='actions'>
|
7
|
+
<%= link_to refinery_icon_tag("application_go.png"), real_estate_url(real_estate),
|
8
|
+
:title => t('.view_live_html'),
|
9
|
+
:target => "_blank" %>
|
10
|
+
<%= link_to refinery_icon_tag("application_edit.png"), edit_admin_real_estate_path(real_estate),
|
11
|
+
:title => t('.edit') %>
|
12
|
+
<%= link_to refinery_icon_tag("delete.png"), admin_real_estate_path(real_estate),
|
13
|
+
:class => "cancel confirm-delete",
|
14
|
+
:title => t('.delete'),
|
15
|
+
:confirm => t('message', :scope => 'shared.admin.delete', :title => real_estate.title),
|
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 @real_estates.any? %>
|
5
|
+
<div class='pagination_container'>
|
6
|
+
<%= render :partial => 'real_estates' %>
|
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 => 'real_estate', :collection => @real_estates %>
|
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::RealEstatesController.sortable? and RealEstate.count > 1 %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render :partial => "form" %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% content_for :body_content_left do %>
|
2
|
+
<ul id="categories">
|
3
|
+
<% @categories.each do |category| %>
|
4
|
+
<li>
|
5
|
+
<%= link_to category.title, category_url(category) %>
|
6
|
+
</li>
|
7
|
+
<% end %>
|
8
|
+
</ul>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= render :partial => "/shared/content_page" %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<% content_for :body_content_title do %>
|
2
|
+
<%= @category.title %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :body_content_left do %>
|
6
|
+
<section>
|
7
|
+
<h1>Title</h1>
|
8
|
+
<p>
|
9
|
+
<%=raw @category.title %>
|
10
|
+
</p>
|
11
|
+
</section>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<% content_for :body_content_right do %>
|
15
|
+
<aside>
|
16
|
+
<h2><%= t('.other') %></h2>
|
17
|
+
<ul id="categories">
|
18
|
+
<% @categories.each do |category| %>
|
19
|
+
<li>
|
20
|
+
<%= link_to category.title, category_url(category) %>
|
21
|
+
</li>
|
22
|
+
<% end %>
|
23
|
+
</ul>
|
24
|
+
</aside>
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<%= render :partial => "/shared/content_page" %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% content_for :body_content_left do %>
|
2
|
+
<ul id="real_estates">
|
3
|
+
<% @real_estates.each do |real_estate| %>
|
4
|
+
<li>
|
5
|
+
<%= link_to real_estate.title, real_estate_url(real_estate) %>
|
6
|
+
</li>
|
7
|
+
<% end %>
|
8
|
+
</ul>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= render :partial => "/shared/content_page" %>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<% content_for :body_content_title do %>
|
2
|
+
<%= @real_estate.title %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :body_content_left do %>
|
6
|
+
<section>
|
7
|
+
<h1>Informações</h1>
|
8
|
+
<p>
|
9
|
+
<%=raw @real_estate.title %> | <%=raw @real_estate.address %>
|
10
|
+
</p>
|
11
|
+
<p>
|
12
|
+
<%=raw @real_estate.city %> | <%=raw @real_estate.state %>
|
13
|
+
</p>
|
14
|
+
<p><%=raw @real_estate.price %> | <%=raw @real_estate.status %> </p>
|
15
|
+
</section>
|
16
|
+
|
17
|
+
<section>
|
18
|
+
<h1>Description</h1>
|
19
|
+
<p>
|
20
|
+
<%=raw @real_estate.description %>
|
21
|
+
</p>
|
22
|
+
</section>
|
23
|
+
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<% content_for :body_content_right do %>
|
27
|
+
<aside>
|
28
|
+
<h2><%= t('.other') %></h2>
|
29
|
+
<ul id="real_estates">
|
30
|
+
<% @real_estates.each do |real_estate| %>
|
31
|
+
<li>
|
32
|
+
<%= link_to real_estate.title, real_estate_url(real_estate) %>
|
33
|
+
</li>
|
34
|
+
<% end %>
|
35
|
+
</ul>
|
36
|
+
</aside>
|
37
|
+
<% end %>
|
38
|
+
|
39
|
+
<%= render :partial => "/shared/content_page" %>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
en:
|
3
|
+
shared:
|
4
|
+
admin:
|
5
|
+
image_picker:
|
6
|
+
image: image
|
7
|
+
plugins:
|
8
|
+
categories:
|
9
|
+
title: Categories
|
10
|
+
real_estates:
|
11
|
+
title: Real Estates
|
12
|
+
admin:
|
13
|
+
categories:
|
14
|
+
actions:
|
15
|
+
create_new: Add New Category
|
16
|
+
reorder: Reorder Categories
|
17
|
+
reorder_done: Done Reordering Categories
|
18
|
+
records:
|
19
|
+
title: Categories
|
20
|
+
sorry_no_results: Sorry! There are no results found.
|
21
|
+
no_items_yet: There are no Categories yet. Click "Add New Category" to add your first category.
|
22
|
+
category:
|
23
|
+
view_live_html: View this category live <br/><em>(opens in a new window)</em>
|
24
|
+
edit: Edit this category
|
25
|
+
delete: Remove this category forever
|
26
|
+
real_estates:
|
27
|
+
actions:
|
28
|
+
create_new: Add New Real Estate
|
29
|
+
reorder: Reorder Real Estates
|
30
|
+
reorder_done: Done Reordering Real Estates
|
31
|
+
records:
|
32
|
+
title: Real Estates
|
33
|
+
sorry_no_results: Sorry! There are no results found.
|
34
|
+
no_items_yet: There are no Real Estates yet. Click "Add New Real Estate" to add your first real estate.
|
35
|
+
real_estate:
|
36
|
+
view_live_html: View this real estate live <br/><em>(opens in a new window)</em>
|
37
|
+
edit: Edit this real estate
|
38
|
+
delete: Remove this real estate forever
|
39
|
+
categories:
|
40
|
+
show:
|
41
|
+
other: Other Categories
|
42
|
+
real_estates:
|
43
|
+
show:
|
44
|
+
other: Other Real Estates
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
lolcat:
|
3
|
+
shared:
|
4
|
+
admin:
|
5
|
+
image_picker:
|
6
|
+
image: IMAGE
|
7
|
+
plugins:
|
8
|
+
categories:
|
9
|
+
title: Categories
|
10
|
+
real_estates:
|
11
|
+
title: Real Estates
|
12
|
+
admin:
|
13
|
+
categories:
|
14
|
+
actions:
|
15
|
+
create_new: CREATE NEW Category
|
16
|
+
reorder: REORDR Categories
|
17
|
+
reorder_done: DUN REORDERIN Categories
|
18
|
+
records:
|
19
|
+
title: Categories
|
20
|
+
sorry_no_results: SRY! THAR R NO RESULTS FINDZ.
|
21
|
+
no_items_yet: THAR R NO Categories YET. CLICK "CREATE NEW Category" 2 ADD UR FURST category.
|
22
|
+
category:
|
23
|
+
view_live_html: VIEW DIS category LIV <BR/><EM>(OPENS IN NEW WINDOW)</EM>
|
24
|
+
edit: EDIT DIS category
|
25
|
+
delete: REMOOV DIS category FOREVR
|
26
|
+
real_estates:
|
27
|
+
actions:
|
28
|
+
create_new: CREATE NEW Real Estate
|
29
|
+
reorder: REORDR Real Estates
|
30
|
+
reorder_done: DUN REORDERIN Real Estates
|
31
|
+
records:
|
32
|
+
title: Real Estates
|
33
|
+
sorry_no_results: SRY! THAR R NO RESULTS FINDZ.
|
34
|
+
no_items_yet: THAR R NO Real Estates YET. CLICK "CREATE NEW Real Estate" 2 ADD UR FURST real estate.
|
35
|
+
real_estate:
|
36
|
+
view_live_html: VIEW DIS real estate LIV <BR/><EM>(OPENS IN NEW WINDOW)</EM>
|
37
|
+
edit: EDIT DIS real estate
|
38
|
+
delete: REMOOV DIS real estate FOREVR
|
39
|
+
categories:
|
40
|
+
show:
|
41
|
+
other: OTHR Categories
|
42
|
+
real_estates:
|
43
|
+
show:
|
44
|
+
other: OTHR Real Estates
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
nb:
|
3
|
+
plugins:
|
4
|
+
categories:
|
5
|
+
title: Categories
|
6
|
+
real_estates:
|
7
|
+
title: Real Estates
|
8
|
+
admin:
|
9
|
+
categories:
|
10
|
+
actions:
|
11
|
+
create_new: Lag en ny Category
|
12
|
+
reorder: "Endre rekkef\xC3\xB8lgen p\xC3\xA5 Categories"
|
13
|
+
reorder_done: "Ferdig \xC3\xA5 endre rekkef\xC3\xB8lgen Categories"
|
14
|
+
records:
|
15
|
+
title: Categories
|
16
|
+
sorry_no_results: Beklager! Vi fant ikke noen resultater.
|
17
|
+
no_items_yet: "Det er ingen Categories enda. Klikk p\xC3\xA5 \"Lag en ny Category\" for \xC3\xA5 legge til din f\xC3\xB8rste category."
|
18
|
+
category:
|
19
|
+
view_live_html: "Vis hvordan denne category ser ut offentlig <br/><em>(\xC3\xA5pner i et nytt vindu)</em>"
|
20
|
+
edit: Rediger denne category
|
21
|
+
delete: Fjern denne category permanent
|
22
|
+
real_estates:
|
23
|
+
actions:
|
24
|
+
create_new: Lag en ny Real Estate
|
25
|
+
reorder: "Endre rekkef\xC3\xB8lgen p\xC3\xA5 Real Estates"
|
26
|
+
reorder_done: "Ferdig \xC3\xA5 endre rekkef\xC3\xB8lgen Real Estates"
|
27
|
+
records:
|
28
|
+
title: Real Estates
|
29
|
+
sorry_no_results: Beklager! Vi fant ikke noen resultater.
|
30
|
+
no_items_yet: "Det er ingen Real Estates enda. Klikk p\xC3\xA5 \"Lag en ny Real Estate\" for \xC3\xA5 legge til din f\xC3\xB8rste real estate."
|
31
|
+
real_estate:
|
32
|
+
view_live_html: "Vis hvordan denne real estate ser ut offentlig <br/><em>(\xC3\xA5pner i et nytt vindu)</em>"
|
33
|
+
edit: Rediger denne real estate
|
34
|
+
delete: Fjern denne real estate permanent
|
35
|
+
categories:
|
36
|
+
show:
|
37
|
+
other: Andre Categories
|
38
|
+
real_estates:
|
39
|
+
show:
|
40
|
+
other: Andre Real Estates
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
nl:
|
3
|
+
plugins:
|
4
|
+
categories:
|
5
|
+
title: Categories
|
6
|
+
real_estates:
|
7
|
+
title: Real Estates
|
8
|
+
admin:
|
9
|
+
categories:
|
10
|
+
actions:
|
11
|
+
create_new: Maak een nieuwe Category
|
12
|
+
reorder: Wijzig de volgorde van de Categories
|
13
|
+
reorder_done: Klaar met het wijzingen van de volgorde van de Categories
|
14
|
+
records:
|
15
|
+
title: Categories
|
16
|
+
sorry_no_results: Helaas! Er zijn geen resultaten gevonden.
|
17
|
+
no_items_yet: Er zijn nog geen Categories. Druk op 'Maak een nieuwe Category' om de eerste aan te maken.
|
18
|
+
category:
|
19
|
+
view_live_html: Bekijk deze category op de website <br/><em>(opent een nieuw venster)</em>
|
20
|
+
edit: Bewerk deze category
|
21
|
+
delete: Verwijder deze category voor eeuwig
|
22
|
+
real_estates:
|
23
|
+
actions:
|
24
|
+
create_new: Maak een nieuwe Real Estate
|
25
|
+
reorder: Wijzig de volgorde van de Real Estates
|
26
|
+
reorder_done: Klaar met het wijzingen van de volgorde van de Real Estates
|
27
|
+
records:
|
28
|
+
title: Real Estates
|
29
|
+
sorry_no_results: Helaas! Er zijn geen resultaten gevonden.
|
30
|
+
no_items_yet: Er zijn nog geen Real Estates. Druk op 'Maak een nieuwe Real Estate' om de eerste aan te maken.
|
31
|
+
real_estate:
|
32
|
+
view_live_html: Bekijk deze real estate op de website <br/><em>(opent een nieuw venster)</em>
|
33
|
+
edit: Bewerk deze real estate
|
34
|
+
delete: Verwijder deze real estate voor eeuwig
|
35
|
+
categories:
|
36
|
+
show:
|
37
|
+
other: Andere Categories
|
38
|
+
real_estates:
|
39
|
+
show:
|
40
|
+
other: Andere Real Estates
|
@@ -0,0 +1,43 @@
|
|
1
|
+
pt-BR:
|
2
|
+
shared:
|
3
|
+
admin:
|
4
|
+
image_picker:
|
5
|
+
image: Imagem
|
6
|
+
plugins:
|
7
|
+
categories:
|
8
|
+
title: Categorias
|
9
|
+
real_estates:
|
10
|
+
title: Imóveis
|
11
|
+
admin:
|
12
|
+
categories:
|
13
|
+
actions:
|
14
|
+
create_new: Adicionar uma nova categoria
|
15
|
+
reorder: Reordenar categoria
|
16
|
+
reorder_done: Categoria reordenada
|
17
|
+
records:
|
18
|
+
title: Categoria
|
19
|
+
sorry_no_results: Desculpe! Nenhum resultado encontrado.
|
20
|
+
no_items_yet: Você não tem nenhuma categoria cadastrada até o momento. Clique em "Adicionar uma nova categoria".
|
21
|
+
category:
|
22
|
+
view_live_html: Visualize esta página <br/><em>(abre em uma nova janela)</em>
|
23
|
+
edit: Edite esta categoria
|
24
|
+
delete: Deletar categoria
|
25
|
+
real_estates:
|
26
|
+
actions:
|
27
|
+
create_new: Adicionar um novo imóvel
|
28
|
+
reorder: Reordenar imóvel
|
29
|
+
reorder_done: Imóveis reordenado
|
30
|
+
records:
|
31
|
+
title: Imobiliária
|
32
|
+
sorry_no_results: Desculpe! Nenhum resultado encontrado.
|
33
|
+
no_items_yet: Você não tem nenhum imóvel cadastrado até o momento. Clique em "Adicionar um novo imóvel".
|
34
|
+
real_estate:
|
35
|
+
view_live_html: Visualize esta página <br/><em>(abre em uma nova janela)</em>
|
36
|
+
edit: Edite este imóvel
|
37
|
+
delete: Deletar imóvel
|
38
|
+
categories:
|
39
|
+
show:
|
40
|
+
other: Outras categorias
|
41
|
+
real_estates:
|
42
|
+
show:
|
43
|
+
other: Outros Imóveis
|
data/config/routes.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Refinery::Application.routes.draw do
|
2
|
+
resources :real_estates, :only => [:index, :show]
|
3
|
+
|
4
|
+
scope(:path => 'refinery', :as => 'admin', :module => 'admin') do
|
5
|
+
resources :real_estates, :except => :show do
|
6
|
+
collection do
|
7
|
+
post :update_positions
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
resources :categories, :only => [:index, :show]
|
12
|
+
|
13
|
+
scope(:path => 'refinery', :as => 'admin', :module => 'admin') do
|
14
|
+
resources :categories, :except => :show do
|
15
|
+
collection do
|
16
|
+
post :update_positions
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'refinerycms-base'
|
2
|
+
|
3
|
+
module Refinery
|
4
|
+
module Categories
|
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 = "categories"
|
13
|
+
plugin.activity = {
|
14
|
+
:class => Category}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'refinerycms-base'
|
2
|
+
require File.expand_path('../refinerycms-categories', __FILE__)
|
3
|
+
|
4
|
+
module Refinery
|
5
|
+
module RealEstates
|
6
|
+
class Engine < Rails::Engine
|
7
|
+
initializer "static assets" do |app|
|
8
|
+
app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public"
|
9
|
+
end
|
10
|
+
|
11
|
+
config.after_initialize do
|
12
|
+
Refinery::Plugin.register do |plugin|
|
13
|
+
plugin.name = "real_estates"
|
14
|
+
plugin.activity = {
|
15
|
+
:class => RealEstate,
|
16
|
+
:title => 'house'
|
17
|
+
}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: refinerycms-real_estates
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: "1.0"
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Davi Thiesse A. S. Fontes
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-05-01 00:00:00 -03:00
|
14
|
+
default_executable:
|
15
|
+
dependencies: []
|
16
|
+
|
17
|
+
description: Ruby on Rails Real Estates engine for Refinery CMS
|
18
|
+
email: davithss@gmail.com
|
19
|
+
executables: []
|
20
|
+
|
21
|
+
extensions: []
|
22
|
+
|
23
|
+
extra_rdoc_files: []
|
24
|
+
|
25
|
+
files:
|
26
|
+
- lib/generators/refinerycms_categories_generator.rb
|
27
|
+
- lib/generators/refinerycms_real_estates_generator.rb
|
28
|
+
- lib/refinerycms-categories.rb
|
29
|
+
- lib/refinerycms-real_estates.rb
|
30
|
+
- lib/tasks/categories.rake
|
31
|
+
- lib/tasks/real_estates.rake
|
32
|
+
- config/locales/en.yml
|
33
|
+
- config/locales/lolcat.yml
|
34
|
+
- config/locales/nb.yml
|
35
|
+
- config/locales/nl.yml
|
36
|
+
- config/locales/pt-BR.yml
|
37
|
+
- config/routes.rb
|
38
|
+
- app/controllers/admin/categories_controller.rb
|
39
|
+
- app/controllers/admin/real_estates_controller.rb
|
40
|
+
- app/controllers/categories_controller.rb
|
41
|
+
- app/controllers/real_estates_controller.rb
|
42
|
+
- app/models/category.rb
|
43
|
+
- app/models/real_estate.rb
|
44
|
+
- app/views/admin/categories/_actions.html.erb
|
45
|
+
- app/views/admin/categories/_categories.html.erb
|
46
|
+
- app/views/admin/categories/_category.html.erb
|
47
|
+
- app/views/admin/categories/_form.html.erb
|
48
|
+
- app/views/admin/categories/_records.html.erb
|
49
|
+
- app/views/admin/categories/_sortable_list.html.erb
|
50
|
+
- app/views/admin/categories/edit.html.erb
|
51
|
+
- app/views/admin/categories/index.html.erb
|
52
|
+
- app/views/admin/categories/new.html.erb
|
53
|
+
- app/views/admin/real_estates/_actions.html.erb
|
54
|
+
- app/views/admin/real_estates/_form.html.erb
|
55
|
+
- app/views/admin/real_estates/_real_estate.html.erb
|
56
|
+
- app/views/admin/real_estates/_real_estates.html.erb
|
57
|
+
- app/views/admin/real_estates/_records.html.erb
|
58
|
+
- app/views/admin/real_estates/_sortable_list.html.erb
|
59
|
+
- app/views/admin/real_estates/edit.html.erb
|
60
|
+
- app/views/admin/real_estates/index.html.erb
|
61
|
+
- app/views/admin/real_estates/new.html.erb
|
62
|
+
- app/views/categories/index.html.erb
|
63
|
+
- app/views/categories/show.html.erb
|
64
|
+
- app/views/real_estates/index.html.erb
|
65
|
+
- app/views/real_estates/show.html.erb
|
66
|
+
has_rdoc: true
|
67
|
+
homepage: https://github.com/davithss/refinerycms_real_estates
|
68
|
+
licenses: []
|
69
|
+
|
70
|
+
post_install_message:
|
71
|
+
rdoc_options: []
|
72
|
+
|
73
|
+
require_paths:
|
74
|
+
- lib
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: "0"
|
81
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: "0"
|
87
|
+
requirements: []
|
88
|
+
|
89
|
+
rubyforge_project:
|
90
|
+
rubygems_version: 1.6.2
|
91
|
+
signing_key:
|
92
|
+
specification_version: 3
|
93
|
+
summary: Real Estates engine for Refinery CMS
|
94
|
+
test_files: []
|
95
|
+
|