seo_unpakt 1.0.2

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.
Files changed (154) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +42 -0
  5. data/app/assets/fonts/FontAwesome.otf +0 -0
  6. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  7. data/app/assets/fonts/fontawesome-webfont.svg +414 -0
  8. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  9. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  10. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  11. data/app/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  12. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  13. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  14. data/app/assets/fonts/proximanova-bold-webfont.eot +0 -0
  15. data/app/assets/fonts/proximanova-bold-webfont.svg +235 -0
  16. data/app/assets/fonts/proximanova-bold-webfont.ttf +0 -0
  17. data/app/assets/fonts/proximanova-bold-webfont.woff +0 -0
  18. data/app/assets/fonts/proximanova-light-webfont.eot +0 -0
  19. data/app/assets/fonts/proximanova-light-webfont.svg +235 -0
  20. data/app/assets/fonts/proximanova-light-webfont.ttf +0 -0
  21. data/app/assets/fonts/proximanova-light-webfont.woff +0 -0
  22. data/app/assets/fonts/proximanova-regular-webfont.eot +0 -0
  23. data/app/assets/fonts/proximanova-regular-webfont.svg +235 -0
  24. data/app/assets/fonts/proximanova-regular-webfont.ttf +0 -0
  25. data/app/assets/fonts/proximanova-regular-webfont.woff +0 -0
  26. data/app/assets/fonts/proximanova-semibold-webfont.eot +0 -0
  27. data/app/assets/fonts/proximanova-semibold-webfont.svg +235 -0
  28. data/app/assets/fonts/proximanova-semibold-webfont.ttf +0 -0
  29. data/app/assets/fonts/proximanova-semibold-webfont.woff +0 -0
  30. data/app/assets/images/seo_unpakt/AjaxLoader.gif +0 -0
  31. data/app/assets/images/seo_unpakt/border-left-shadow.png +0 -0
  32. data/app/assets/images/seo_unpakt/border-right-shadow.png +0 -0
  33. data/app/assets/images/seo_unpakt/carousel-left.png +0 -0
  34. data/app/assets/images/seo_unpakt/carousel-right.png +0 -0
  35. data/app/assets/images/seo_unpakt/glyphicons-halflings-white.png +0 -0
  36. data/app/assets/images/seo_unpakt/glyphicons-halflings.png +0 -0
  37. data/app/assets/images/seo_unpakt/grabbing.png +0 -0
  38. data/app/assets/images/seo_unpakt/map-bg.jpg +0 -0
  39. data/app/assets/images/seo_unpakt/post-image.jpg +0 -0
  40. data/app/assets/images/seo_unpakt/puma-logo.png +0 -0
  41. data/app/assets/images/seo_unpakt/read-more-arrow.png +0 -0
  42. data/app/assets/images/seo_unpakt/sfl-logo.png +0 -0
  43. data/app/assets/images/seo_unpakt/sun-1.png +0 -0
  44. data/app/assets/images/seo_unpakt/sun-2.png +0 -0
  45. data/app/assets/images/seo_unpakt/sun-3.png +0 -0
  46. data/app/assets/images/seo_unpakt/unpakt-logo.png +0 -0
  47. data/app/assets/images/seo_unpakt/unpakt-logo1.png +0 -0
  48. data/app/assets/images/seo_unpakt/weather-widget.png +0 -0
  49. data/app/assets/javascripts/seo_unpakt/application.js +123 -0
  50. data/app/assets/javascripts/seo_unpakt/bootstrap.min.js +6 -0
  51. data/app/assets/javascripts/seo_unpakt/jquery.zweatherfeed.min.js +8 -0
  52. data/app/assets/javascripts/seo_unpakt/map.js.erb +50 -0
  53. data/app/assets/javascripts/seo_unpakt/overlapping_marker.js +23 -0
  54. data/app/assets/javascripts/seo_unpakt/owl.carousel.min.js +1 -0
  55. data/app/assets/stylesheets/seo_unpakt/application.css +17 -0
  56. data/app/assets/stylesheets/seo_unpakt/bootstrap.min.css +9 -0
  57. data/app/assets/stylesheets/seo_unpakt/custom.css +403 -0
  58. data/app/assets/stylesheets/seo_unpakt/font-awesome.min.css +4 -0
  59. data/app/assets/stylesheets/seo_unpakt/masada.css +12347 -0
  60. data/app/assets/stylesheets/seo_unpakt/owl.carousel.css +71 -0
  61. data/app/assets/stylesheets/seo_unpakt/server.css +6075 -0
  62. data/app/assets/stylesheets/seo_unpakt/zweatherfeed.css +50 -0
  63. data/app/controllers/seo_unpakt/admin/living_in_infos_controller.rb +58 -0
  64. data/app/controllers/seo_unpakt/admin/seo_configs_controller.rb +28 -0
  65. data/app/controllers/seo_unpakt/admin/seo_keywords_controller.rb +25 -0
  66. data/app/controllers/seo_unpakt/application_controller.rb +18 -0
  67. data/app/helpers/seo_unpakt/admin/seo_configs_helper.rb +4 -0
  68. data/app/helpers/seo_unpakt/application_helper.rb +44 -0
  69. data/app/helpers/seo_unpakt/seo_helper.rb +26 -0
  70. data/app/helpers/seo_unpakt/will_paginate_helper.rb +21 -0
  71. data/app/models/seo_unpakt/living_in_info.rb +18 -0
  72. data/app/models/seo_unpakt/seo_keyword.rb +11 -0
  73. data/app/views/layouts/seo_unpakt/_estimation_information_form.html.slim +1 -0
  74. data/app/views/layouts/seo_unpakt/_google_analytics.html.slim +14 -0
  75. data/app/views/layouts/seo_unpakt/_map_widgets.html.slim +18 -0
  76. data/app/views/layouts/seo_unpakt/application.html.slim +54 -0
  77. data/app/views/seo_unpakt/admin/_menu.html.slim +7 -0
  78. data/app/views/seo_unpakt/admin/living_in_infos/_city_list.html.slim +21 -0
  79. data/app/views/seo_unpakt/admin/living_in_infos/_tinymce_js.html.slim +14 -0
  80. data/app/views/seo_unpakt/admin/living_in_infos/edit.html.slim +15 -0
  81. data/app/views/seo_unpakt/admin/living_in_infos/edit_state_info.html.slim +16 -0
  82. data/app/views/seo_unpakt/admin/living_in_infos/index.html.slim +15 -0
  83. data/app/views/seo_unpakt/admin/living_in_infos/index.js.erb +1 -0
  84. data/app/views/seo_unpakt/admin/living_in_infos/state_index.html.slim +28 -0
  85. data/app/views/seo_unpakt/admin/seo_configs/_city_list.html.slim +21 -0
  86. data/app/views/seo_unpakt/admin/seo_configs/mover_cities.html.slim +16 -0
  87. data/app/views/seo_unpakt/admin/seo_configs/mover_cities.js.erb +1 -0
  88. data/app/views/seo_unpakt/admin/seo_configs/toggle_seo_city.js.erb +5 -0
  89. data/app/views/seo_unpakt/admin/seo_keywords/_keywords_list.html.slim +3 -0
  90. data/app/views/seo_unpakt/admin/seo_keywords/create.js.erb +2 -0
  91. data/app/views/seo_unpakt/admin/seo_keywords/index.html.slim +13 -0
  92. data/app/views/seo_unpakt/seo/_living_infos_by_city.html.slim +24 -0
  93. data/app/views/seo_unpakt/seo/_mover_locations.html.slim +1 -0
  94. data/app/views/seo_unpakt/seo/_movers_by_cities.html.slim +7 -0
  95. data/app/views/seo_unpakt/seo/_movers_carousel.html.slim +25 -0
  96. data/app/views/seo_unpakt/seo/_news.html.slim +9 -0
  97. data/app/views/seo_unpakt/seo/_page_infos.html.slim +17 -0
  98. data/app/views/seo_unpakt/seo/_weather_infos_by_city.html.slim +7 -0
  99. data/app/views/seo_unpakt/seo/city_movers.html.slim +4 -0
  100. data/app/views/seo_unpakt/seo/get_movers.js.erb +2 -0
  101. data/app/views/seo_unpakt/seo/index.html.slim +9 -0
  102. data/app/views/seo_unpakt/seo/moving_from_city.html.slim +4 -0
  103. data/app/views/seo_unpakt/seo/moving_from_to_city.html.slim +8 -0
  104. data/app/views/seo_unpakt/seo/moving_to_city.html.slim +4 -0
  105. data/app/views/seo_unpakt/seo/state_movers.html.slim +53 -0
  106. data/config/routes.rb +25 -0
  107. data/config/tinymce.yml +14 -0
  108. data/db/migrate/20140408070411_add_column_generate_seo_urls_to_mover_cities.rb +5 -0
  109. data/db/migrate/20140422102809_update_seo_urls_mover_cities.rb +11 -0
  110. data/db/migrate/20140429070426_create_seo_unpakt_seo_keywords.rb +8 -0
  111. data/db/migrate/20140430141506_seed_seo_keywords.rb +12 -0
  112. data/db/migrate/20140506075238_update_seo_urls_false.rb +7 -0
  113. data/db/migrate/20140515080832_create_seo_unpakt_living_in_infos.rb +11 -0
  114. data/db/seeders/UnpaktLocations.csv +61 -0
  115. data/lib/seo_unpakt/engine.rb +19 -0
  116. data/lib/seo_unpakt/version.rb +3 -0
  117. data/lib/seo_unpakt.rb +4 -0
  118. data/lib/tasks/seo_unpakt_tasks.rake +4 -0
  119. data/test/controllers/seo_unpakt/admin/seo_configs_controller_test.rb +9 -0
  120. data/test/controllers/seo_unpakt/seo_controller_test.rb +9 -0
  121. data/test/dummy/README.rdoc +261 -0
  122. data/test/dummy/Rakefile +7 -0
  123. data/test/dummy/app/assets/javascripts/application.js +15 -0
  124. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  125. data/test/dummy/app/controllers/application_controller.rb +3 -0
  126. data/test/dummy/app/helpers/application_helper.rb +2 -0
  127. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  128. data/test/dummy/config/application.rb +59 -0
  129. data/test/dummy/config/boot.rb +10 -0
  130. data/test/dummy/config/database.yml +25 -0
  131. data/test/dummy/config/environment.rb +5 -0
  132. data/test/dummy/config/environments/development.rb +37 -0
  133. data/test/dummy/config/environments/production.rb +67 -0
  134. data/test/dummy/config/environments/test.rb +37 -0
  135. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  136. data/test/dummy/config/initializers/inflections.rb +15 -0
  137. data/test/dummy/config/initializers/mime_types.rb +5 -0
  138. data/test/dummy/config/initializers/secret_token.rb +7 -0
  139. data/test/dummy/config/initializers/session_store.rb +8 -0
  140. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  141. data/test/dummy/config/locales/en.yml +5 -0
  142. data/test/dummy/config/routes.rb +4 -0
  143. data/test/dummy/config.ru +4 -0
  144. data/test/dummy/public/404.html +26 -0
  145. data/test/dummy/public/422.html +26 -0
  146. data/test/dummy/public/500.html +25 -0
  147. data/test/dummy/public/favicon.ico +0 -0
  148. data/test/dummy/script/rails +6 -0
  149. data/test/helpers/seo_unpakt/admin/seo_configs_helper_test.rb +6 -0
  150. data/test/helpers/seo_unpakt/seo_helper_test.rb +6 -0
  151. data/test/integration/navigation_test.rb +10 -0
  152. data/test/seo_unpakt_test.rb +7 -0
  153. data/test/test_helper.rb +15 -0
  154. metadata +286 -0
@@ -0,0 +1,50 @@
1
+ @charset "UTF-8";
2
+ /**
3
+ * Stylesheet: example.css
4
+ *
5
+ * (c) 2011-2012 Zazar Ltd
6
+ *
7
+ * Description: Stylesheet for examples
8
+ *
9
+ **/
10
+
11
+
12
+ form { margin-bottom: 1em; }
13
+
14
+ .weatherFeed {
15
+ font-family: Arial, Helvetica, sans-serif;
16
+ font-size: 90%;
17
+ width: 280px;
18
+ }
19
+ .weatherFeed a { color: #888; }
20
+ .weatherFeed a:hover {
21
+ color: #000;
22
+ text-decoration: none;
23
+ }
24
+ .weatherItem {
25
+ /*padding: 0.8em;*/
26
+ text-align: right;
27
+ }
28
+ .weatherCity { text-transform: uppercase; }
29
+ .weatherTemp {
30
+ font-size: 2.8em;
31
+ font-weight: bold;
32
+ }
33
+ .weatherDesc, .weatherCity, .weatherForecastDay { font-weight: bold; }
34
+ .weatherDesc { margin-bottom: 0.4em; }
35
+ .weatherRange, .weatherWind, .weatherLink, .weatherForecastItem { font-size: 0.8em; }
36
+ .weatherLink, .weatherForecastItem {
37
+ margin-top: 0.5em;
38
+ text-align: left;
39
+ }
40
+ .weatherForecastItem {
41
+ padding: 0.5em 0.5em 0.5em 80px;
42
+ background-color: #fff;
43
+ background-position: left center;
44
+ }
45
+ .weatherForecastDay { font-size: 1.1em; }
46
+
47
+ .weatherForecast {margin-top: 15px;}
48
+
49
+ /*.odd { background-color: #e8e8fc; }*/
50
+ /*.even { background-color: #d4d4e8; }*/
@@ -0,0 +1,58 @@
1
+ require_dependency "seo_unpakt/application_controller"
2
+
3
+ module SeoUnpakt
4
+ module Admin
5
+ class LivingInInfosController < ApplicationController
6
+ def index
7
+ @mover_cities = MoverCity.order("city")
8
+ @mover_states = @mover_cities.map(&:state).uniq.collect{|s| [MoversByState.states_hash[s], s]}.sort
9
+ @mover_cities = @mover_cities.where("state = ?", params[:state]) unless params[:state].blank?
10
+ @mover_cities = @mover_cities.paginate(page: params[:page] || 1)
11
+
12
+
13
+ @living_in_infos = LivingInInfo.where("city IS NOT ?", nil)
14
+ @living_in_infos_hash = {}
15
+ @living_in_infos.collect{|l| @living_in_infos_hash.merge!(l.city.underscore => {state: l.state, body: l.body})}
16
+ end
17
+
18
+ def state_index
19
+ @states = MoversByState.states_hash
20
+ @living_in_infos = LivingInInfo.where("city IS ?", nil)
21
+ @living_in_infos_hash = {}
22
+ @living_in_infos.collect{|l| @living_in_infos_hash.merge!(l.state.underscore => {state: l.state, body: l.body, info_type: l.info_type})}
23
+ end
24
+
25
+ def edit
26
+ param_split = params[:id].split("-")
27
+ state = param_split.pop.upcase
28
+ city = param_split.join(" ").titleize
29
+ @living_in_info = LivingInInfo.where(state: state, city: city).first_or_create(body: LivingInInfo.default_body([city, state].join(', ')), info_type: 'city')
30
+ end
31
+
32
+ def edit_state_info
33
+ state = params[:state]
34
+ city = params[:city]
35
+ state_fullname = MoversByState.states_hash["#{state}"]
36
+ @living_in_info = LivingInInfo.where(state: state, city: city).first_or_create(body: LivingInInfo.default_body(state_fullname), info_type: 'state')
37
+ end
38
+
39
+ def update
40
+ @living_in_info = LivingInInfo.find params[:id]
41
+ if @living_in_info.update_attributes(params[:living_in_info])
42
+ redirect_to admin_living_in_infos_url
43
+ else
44
+ render :edit
45
+ end
46
+ end
47
+
48
+ def update_state_info
49
+ @living_in_info = LivingInInfo.find params[:living_in_info_id]
50
+ if @living_in_info.update_attributes(params[:living_in_info])
51
+ redirect_to state_index_admin_living_in_infos_url
52
+ else
53
+ render :edit_state_info
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,28 @@
1
+ require_dependency "seo_unpakt/application_controller"
2
+
3
+ module SeoUnpakt
4
+ module Admin
5
+ class SeoConfigsController < ApplicationController
6
+ before_filter :check_admin
7
+
8
+ def mover_cities
9
+ breadcrumbs.add 'Admin', "#"
10
+ @mover_cities = MoverCity.order("city")
11
+ @mover_states = state_list_for_select
12
+ @mover_cities = @mover_cities.where("state = ?", params[:state]) unless params[:state].blank?
13
+ @mover_cities = @mover_cities.paginate(page: params[:page] || 1, per_page: params[:per_page])
14
+ end
15
+
16
+ def toggle_seo_city
17
+ @mover_city = MoverCity.find params[:mover_city_id]
18
+ @mover_city.update_attribute(:generate_seo_urls, params[:generate_seo_urls])
19
+ end
20
+
21
+ private
22
+
23
+ def state_list_for_select
24
+ return @mover_cities.map(&:state).uniq.collect{|s| [MoversByState.states_hash[s], s]}.sort
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,25 @@
1
+ require_dependency "seo_unpakt/application_controller"
2
+
3
+ module SeoUnpakt
4
+ module Admin
5
+ class SeoKeywordsController < ApplicationController
6
+ before_filter :check_admin
7
+ def index
8
+ @seo_keywords = SeoKeyword.order("word")
9
+ end
10
+
11
+ def create
12
+ seo_keyword = SeoKeyword.new params[:seo_keyword]
13
+ seo_keyword.save
14
+ @seo_keywords = SeoKeyword.order("word")
15
+ end
16
+
17
+ def destroy
18
+ seo_keyword = SeoKeyword.find params[:id]
19
+ seo_keyword.destroy
20
+ @seo_keywords = SeoKeyword.order("word")
21
+ render action: :create
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,18 @@
1
+ require "breadcrumbs"
2
+ module SeoUnpakt
3
+ class SeoUnpakt::ApplicationController < ApplicationController
4
+ before_filter :add_initial_breadcrumbs
5
+
6
+ private
7
+
8
+ def add_initial_breadcrumbs
9
+ breadcrumbs.add 'Unpakt', "/"
10
+ @breadcrumbs = breadcrumbs
11
+ end
12
+
13
+ def check_admin
14
+ redirect_to "/users/login" if !(current_user && current_user.is_admin?)
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,4 @@
1
+ module SeoUnpakt
2
+ module Admin::SeoConfigsHelper
3
+ end
4
+ end
@@ -0,0 +1,44 @@
1
+ module SeoUnpakt
2
+ module ApplicationHelper
3
+ def ajax_will_paginate(collection, options = {})
4
+ will_paginate(collection, options.merge(:renderer => WillPaginateHelper::WillPaginateAjaxLinkRenderer))
5
+ end
6
+
7
+ def living_in_info city, state
8
+ state_code = get_state_code_by_name(state)
9
+ lif = LivingInInfo.where(state: state_code)
10
+ if city.blank?
11
+ lif = lif.where(info_type: "state")
12
+ location = state
13
+ else
14
+ lif = lif.where(city: city)
15
+ location = [city, state_code].join(", ")
16
+ end
17
+ # raise lif.inspect
18
+ (lif.blank? or lif.first.body.blank?) ? LivingInInfo.default_body(location) : lif.first.body.html_safe
19
+ end
20
+
21
+ def get_state_code_by_name state_name
22
+ MoversByState.states_hash.to_a.select{|s| s[1] == "#{state_name}"}.first[0]
23
+ end
24
+
25
+ def set_selected_admin_link url_suffix
26
+ request.url.ends_with?(url_suffix) ? "selected" : ""
27
+ end
28
+
29
+ def news_heading city, state
30
+ (!city.blank? && !state.blank?) ? "#{city}, #{get_state_code_by_name(state)} News" : "#{state} News"
31
+ end
32
+
33
+ def widget_page_title city, state
34
+ if city.blank? and state.blank?
35
+ "<span>Movers by City Project</span>".html_safe
36
+ elsif !city.blank?
37
+ "#{city}, #{state} <span>Moving companies</span>".html_safe
38
+ else
39
+ "#{state} <span>Moving companies</span>".html_safe
40
+ end
41
+
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,26 @@
1
+ module SeoUnpakt
2
+ module SeoHelper
3
+ def breadcrumbs
4
+
5
+ end
6
+
7
+ def get_img_url_and_body_text(blog)
8
+ doc = Nokogiri::HTML(blog.try(:body))
9
+ img_url = doc.xpath('//p/a/img').first.attributes["src"].value.blank? ? "#" : doc.xpath('//p/a/img').first.attributes["src"].value rescue ''
10
+ content = doc.xpath('//p').text
11
+ [img_url, content]
12
+ end
13
+
14
+ def next_preve_image_display(movers_count, limit)
15
+ movers_count > limit ? "show" : "hide"
16
+ end
17
+
18
+ def get_grade_class(mover_grade)
19
+ mover_grade == "TOO LEGIT" ? 'grade-legit' : 'grade-value'
20
+ end
21
+ def blog_search_link tag
22
+ search_string = tag.gsub(" ","+")
23
+ "https://www.unpakt.com/blog/?s=#{search_string}"
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,21 @@
1
+ module SeoUnpakt
2
+ module WillPaginateHelper
3
+ class WillPaginateAjaxLinkRenderer < WillPaginate::ActionView::LinkRenderer
4
+ def prepare(collection, options, template)
5
+ options[:params] ||= {}
6
+ options[:params]["_"] = nil
7
+ super(collection, options, template)
8
+ end
9
+
10
+ protected
11
+ def link(text, target, attributes = {})
12
+ if target.is_a? Fixnum
13
+ attributes[:rel] = rel_value(target)
14
+ target = url(target)
15
+ end
16
+ ajax_call = "$.ajax({url: '#{target}', dataType: 'script'});"
17
+ @template.link_to_function(text.to_s.html_safe, ajax_call, attributes)
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,18 @@
1
+ module SeoUnpakt
2
+ class LivingInInfo < ActiveRecord::Base
3
+ @@info_types = ["city", "state"]
4
+
5
+ validates :state, presence: true
6
+ validates :city, presence: true, :if => :info_type_is_city?
7
+
8
+ validates :info_type, inclusion: { in: @@info_types}
9
+ # attr_accessible :title, :body
10
+ def info_type_is_city?
11
+ self.info_type == "city"
12
+ end
13
+
14
+ def self.default_body city=""
15
+ "At Unpakt, we know movers, and we can connect you with great moving companies in #{city}. Take a moment to browse a few of our featured #{city} movers so that you can begin comparing reviews and quotes instantly!"
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,11 @@
1
+ module SeoUnpakt
2
+ class SeoKeyword < ActiveRecord::Base
3
+ validates :word, presence: true, uniqueness: true
4
+
5
+ before_save :parameterize_word
6
+
7
+ def parameterize_word
8
+ self.word = self.word.parameterize.strip
9
+ end
10
+ end
11
+ end
@@ -0,0 +1 @@
1
+ #unpakt-move-form(data-url="#{Rails.configuration.affiliate_url}" data-uuid="#{Rails.configuration.affiliate_uuid}")
@@ -0,0 +1,14 @@
1
+ - if Rails.env.productiony?
2
+ #analytics
3
+ - if content_for? :analytics
4
+ = content_for :analytics
5
+
6
+ - if Rails.env.production?
7
+ javascript:
8
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
9
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
10
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
11
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
12
+
13
+ ga('create', 'UA-29104481-1', 'unpakt.com');
14
+ ga('send', 'pageview');
@@ -0,0 +1,18 @@
1
+ .container
2
+ .row
3
+ .span12
4
+ .mapped-city-page
5
+ .row
6
+ .span6
7
+ .row
8
+ .span6
9
+ .white-box-a
10
+ h2 Plan. Compare. Book.
11
+ p
12
+ strong Real prices, right now.
13
+ | Unpakt lets you find great movers, get exact prices and book online. Just tell us what you're moving and we'll figure out how much it'll cost. <strong>Instantly.</strong>
14
+
15
+ .span6
16
+ .white-box-b.pull-right
17
+ .moving-form-info
18
+ = render "/layouts/seo_unpakt/estimation_information_form"
@@ -0,0 +1,54 @@
1
+ doctype html
2
+ html lang="en"
3
+ head
4
+ meta charset="utf-8"
5
+ meta content="IE=edge" http-equiv="X-UA-Compatible"
6
+ meta content="" name="author"
7
+ meta name="description" content="#{@description_attribute || meta_description_builder}"
8
+ title=@title_attribute || title_builder
9
+ = stylesheet_link_tag "seo_unpakt/application"
10
+ = stylesheet_link_tag "new_flow", media: 'screen, projection'
11
+ = csrf_meta_tag
12
+
13
+ body
14
+ = render partial: "shared/new_flow_header"
15
+
16
+ .layout-content
17
+
18
+ - unless request.url.include?("admin")
19
+ section.breadcrumb-bar.unpakt
20
+ .container
21
+ .row
22
+ .span12
23
+ .ruby-crumb #{@breadcrumbs.render(:format => :inline)}
24
+
25
+ section.map-box.unpakt
26
+ #map-canvas
27
+
28
+
29
+ .light-back.unpakt.new-flow-container
30
+ .container
31
+ .row
32
+ .span12
33
+ .white-box-c
34
+ h1 = widget_page_title(@city, @state)
35
+ = yield
36
+
37
+ = render partial: "shared/new_flow_footer"
38
+
39
+ /! Placed at the end of the document so the pages load faster
40
+ script src='/tinymce/tinymce.min.js'
41
+ script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"
42
+ = javascript_include_tag "seo_unpakt/application"
43
+ #js_calls
44
+ = yield :js_calls
45
+
46
+ #scripts
47
+
48
+ = yield :scripts
49
+
50
+ - if Rails.configuration.document_domain
51
+ javascript:
52
+ $(document).ready(function() {
53
+ document.domain = "#{Rails.configuration.document_domain}";
54
+ });
@@ -0,0 +1,7 @@
1
+ #admin_menu
2
+ ul.pull-right
3
+ li
4
+ = link_to "Manage SEO Enabled Cities", admin_url, class: set_selected_admin_link("admin")
5
+ li &nbsp;|&nbsp;
6
+ li
7
+ = link_to "City Living Infos", admin_living_in_infos_url, class: set_selected_admin_link("admin/living_in_infos")
@@ -0,0 +1,21 @@
1
+ table width="100%"
2
+ thead
3
+ tr
4
+ th City
5
+ th State
6
+ th Living Info Text
7
+ th
8
+ tbody
9
+ - @mover_cities.each do |city|
10
+ tr
11
+ td
12
+ = city.city
13
+ td
14
+ = city.state
15
+ td
16
+ = @living_in_infos_hash[city.city.underscore].try(:[], :body).try(:html_safe)
17
+ th
18
+ = link_to "Edit", edit_admin_living_in_info_url("#{city.city}-#{city.state}".parameterize)
19
+
20
+
21
+ = ajax_will_paginate @mover_cities
@@ -0,0 +1,14 @@
1
+ = content_for :js_calls do
2
+ javascript:
3
+ (function() {
4
+ if (typeof tinyMCE != 'undefined') {
5
+ tinyMCE.init({
6
+ selector: "textarea.tinymce",
7
+ menubar: false,
8
+ plugins: "link image media code",
9
+ toolbar: "undo redo | styleselect | bold italic underline | alignleft aligncenter alignright justify | bullist numlist outdent indent | link image | media | code"
10
+ });
11
+ } else {
12
+ setTimeout(arguments.callee, 50);
13
+ }
14
+ })();
@@ -0,0 +1,15 @@
1
+ section
2
+ .row
3
+ .box-full
4
+ .span12
5
+ = render "seo_unpakt/admin/menu"
6
+ .span12
7
+ b
8
+ label = "Update 'Living in info' for #{@living_in_info.city}, #{@living_in_info.state}"
9
+ br
10
+ = form_for @living_in_info, url: admin_living_in_info_path(@living_in_info) do |f|
11
+ = f.text_area :body, :class => "tinymce", :rows => 5
12
+ br
13
+ = f.submit class: "btn"
14
+
15
+ = render('tinymce_js')
@@ -0,0 +1,16 @@
1
+ section
2
+ .row
3
+ .box-full
4
+ .span12
5
+ = render "seo_unpakt/admin/menu"
6
+ .span12
7
+ b
8
+ label = "Update 'Living in info' for #{@living_in_info.state}"
9
+ br
10
+ = form_for @living_in_info, url: admin_living_in_info_update_state_info_url(@living_in_info) do |f|
11
+ = f.text_area :body, :class => "tinymce", :rows => 5
12
+ br
13
+ = f.submit class: "btn"
14
+
15
+
16
+ = render('tinymce_js')
@@ -0,0 +1,15 @@
1
+ section
2
+ .row
3
+ .box-full
4
+ .span12
5
+ = render "seo_unpakt/admin/menu"
6
+
7
+ .span12
8
+ .span1
9
+ label.filter State
10
+ .span2
11
+ = select_tag :states, options_for_select(@mover_states), prompt: "--- ALL ---", id: "living_in_state_filter"
12
+
13
+ .span12
14
+ #city_list
15
+ = render "city_list"
@@ -0,0 +1 @@
1
+ $("#city_list").html("<%= j render('city_list') %>")
@@ -0,0 +1,28 @@
1
+ section
2
+ .row
3
+ .box-full
4
+ .span12
5
+ = render "seo_unpakt/admin/menu"
6
+ br
7
+ br
8
+ table width="100%"
9
+ thead
10
+ tr
11
+ th State
12
+ th State Id
13
+ th Living Info Text
14
+ th Info Type
15
+ th
16
+ tbody
17
+ - @states.each do |state|
18
+ tr
19
+ td
20
+ = state[1]
21
+ td
22
+ = state[0]
23
+ td
24
+ = @living_in_infos_hash[state[0].underscore].try(:[], :body).try(:html_safe)
25
+ td
26
+ = @living_in_infos_hash[state[0].underscore].try(:[], :info_type).try(:html_safe)
27
+ th
28
+ = link_to "Edit", edit_state_info_admin_living_in_infos_url(state: state[0])
@@ -0,0 +1,21 @@
1
+ table width="100%"
2
+ thead
3
+ tr
4
+ th City
5
+ th State
6
+ th Zip
7
+ th align="center" width="200px" SEO Enabled
8
+ tbody
9
+ - @mover_cities.each do |mover_city|
10
+ tr
11
+ td
12
+ = mover_city.city
13
+
14
+ td= mover_city.state
15
+
16
+ td= mover_city.default_zip_for_city.try(:zip)
17
+
18
+ td align="center"
19
+ = check_box_tag "generate_seo_urls_#{mover_city.id}", mover_city.id, mover_city.generate_seo_urls, :class => "enable_seo"
20
+
21
+ = ajax_will_paginate @mover_cities
@@ -0,0 +1,16 @@
1
+ section
2
+ .row
3
+ .box-full
4
+ .span12
5
+ #msg
6
+
7
+ = render "seo_unpakt/admin/menu"
8
+ .span12
9
+ .span1
10
+ label.filter State
11
+ .span2
12
+ = select_tag :states, options_for_select(@mover_states), prompt: "--- ALL ---", id: "state_filter"
13
+
14
+ .clear
15
+ #city_list
16
+ = render "city_list"
@@ -0,0 +1 @@
1
+ $("#city_list").html("<%= j render('city_list') %>")
@@ -0,0 +1,5 @@
1
+ <% if @mover_city.generate_seo_urls %>
2
+ $("#msg").html("<div class='alert alert-success'><a href='#' class='close' data-dismiss='alert'>×</a><%= @mover_city.city %> enabled for seo.</div>")
3
+ <% else %>
4
+ $("#msg").html("<div class='alert alert-success'><a href='#' class='close' data-dismiss='alert'>×</a><%= @mover_city.city %> disabled for seo.</div>")
5
+ <% end %>
@@ -0,0 +1,3 @@
1
+ - @seo_keywords.each do |seo_keyword|
2
+ span.label
3
+ = "#{seo_keyword.word} <span class='delete_keyword'>#{link_to 'x', admin_seo_keyword_url(seo_keyword), remote: true , method: 'delete', title: "Delete keyword", 'data-confirm' => "Are you sure to delete keyword?" }</span>".html_safe
@@ -0,0 +1,2 @@
1
+ $("#keywords_list").html("<%= j render('keywords_list') %>")
2
+ $("#seo_keyword_word").val('')
@@ -0,0 +1,13 @@
1
+ section
2
+ .row
3
+ .span12
4
+ .box-full
5
+ = render "seo_unpakt/admin/menu"
6
+ #keywords.span12
7
+ #keywords_list
8
+ = render "keywords_list"
9
+ .clear
10
+ #keywords_form
11
+ = form_for :seo_keyword, remote: true do |f|
12
+ = f.text_field :word, placeholder: 'Enter a keyword'
13
+ = f.submit "Add Keyword"
@@ -0,0 +1,24 @@
1
+ .living-info
2
+ h2.blue-text.header-light
3
+ | Living in #{city} #{state}
4
+ p = living_in_info(city, state)
5
+ .city-related
6
+ - blogs.each do | blog |
7
+ - contents = get_img_url_and_body_text(blog)
8
+ ul.posts-list
9
+ li.each-post
10
+ .post-pic
11
+ img alt="" src="#{contents.first}" align="center"
12
+ .post-data
13
+ ul.post-text
14
+ li.post-title
15
+ h3
16
+ a href="#{blog.link}" #{blog.title}
17
+ li.post-tags
18
+ - blog.tags.each do |tag|
19
+ span
20
+ a href="#{blog_search_link(tag)}" =tag
21
+
22
+ li.post-summary = truncate(contents.last, length: 200)
23
+ li.post-more
24
+ a href="#{blog.link}" Read More
@@ -0,0 +1 @@
1
+ input#mover-locations name="locations" type="hidden" value="#{mover_locations}"
@@ -0,0 +1,7 @@
1
+ .movers-by-city
2
+ - unless cities.blank?
3
+ h2.blue-text.header-light Movers by City
4
+ ul.home-cities
5
+ - cities.each do |city|
6
+ li.city
7
+ = link_to city.city, get_city_movers_url(@state_name.downcase, city.city.downcase.strip.gsub(' ', '-').gsub(/[^0-9a-z-]/,''))