diff --git a/app/views/admin/e_paper_criterias/_index.html.erb b/app/views/admin/e_paper_criterias/_index.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/admin/e_paper_criterias/edit.html.erb b/app/views/admin/e_paper_criterias/edit.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/admin/e_paper_criterias/emailer.html.erb b/app/views/admin/e_paper_criterias/emailer.html.erb
old mode 100644
new mode 100755
index 2ff68ed..5bf35c8
--- a/app/views/admin/e_paper_criterias/emailer.html.erb
+++ b/app/views/admin/e_paper_criterias/emailer.html.erb
@@ -187,8 +187,9 @@
end
have_papaers = papers_data.present?
- if paper.image.present?
- img_src = siteurl + paper.image.url
+ if paper.banner_image.present?
+ img = EPaperImage.find(paper.banner_image)
+ img_src = siteurl + img.image.url
else
img_src = nil
end
diff --git a/app/views/admin/e_paper_criterias/index.html.erb b/app/views/admin/e_paper_criterias/index.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/admin/e_paper_criterias/new.html.erb b/app/views/admin/e_paper_criterias/new.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/admin/e_paper_images/_form.html.erb b/app/views/admin/e_paper_images/_form.html.erb
new file mode 100644
index 0000000..2393922
--- /dev/null
+++ b/app/views/admin/e_paper_images/_form.html.erb
@@ -0,0 +1,70 @@
+<% content_for :page_specific_css do %>
+ <%= stylesheet_link_tag "lib/main-forms" %>
+ <%= stylesheet_link_tag "lib/fileupload" %>
+ <%= stylesheet_link_tag "lib/main-list" %>
+<% end %>
+<% content_for :page_specific_javascript do %>
+ <%= javascript_include_tag "lib/bootstrap-fileupload" %>
+<% end %>
+<%#= f.error_messages %>
+
+
-
-
diff --git a/app/views/admin/e_papers/_index.html.erb b/app/views/admin/e_papers/_index.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/admin/e_papers/_subscriber_index.html.erb b/app/views/admin/e_papers/_subscriber_index.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/admin/e_papers/edit.html.erb b/app/views/admin/e_papers/edit.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/admin/e_papers/index.html.erb b/app/views/admin/e_papers/index.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/admin/e_papers/instructions.html.erb b/app/views/admin/e_papers/instructions.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/admin/e_papers/new.html.erb b/app/views/admin/e_papers/new.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/admin/e_papers/subscribers.html.erb b/app/views/admin/e_papers/subscribers.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/e_papers/custom_widget_data.html.erb b/app/views/e_papers/custom_widget_data.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/e_papers/index.html.erb b/app/views/e_papers/index.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/e_papers/papers.html.erb b/app/views/e_papers/papers.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/e_papers/show.html.erb b/app/views/e_papers/show.html.erb
old mode 100644
new mode 100755
diff --git a/app/views/e_papers/topics.html.erb b/app/views/e_papers/topics.html.erb
old mode 100644
new mode 100755
diff --git a/config/locales/en.yml b/config/locales/en.yml
old mode 100644
new mode 100755
index a2231ff..3e5b577
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -54,3 +54,5 @@ en:
email_sentdate: Email Time
newsletter_sent: "Newsletter sent."
newsletter_will_be_sent: "Newsletter will be sent at %{time}."
+ banner_images: Banner Images
+ banner_image: Banner Image
diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml
old mode 100644
new mode 100755
index e156e03..0998c57
--- a/config/locales/zh_tw.yml
+++ b/config/locales/zh_tw.yml
@@ -54,4 +54,6 @@ zh_tw:
language_to_send: 開放訂閱語系
email_sentdate: 寄送時間
newsletter_sent: "電子報已寄送!"
- newsletter_will_be_sent: "電子報會於%{time}寄送!"
\ No newline at end of file
+ newsletter_will_be_sent: "電子報會於%{time}寄送!"
+ banner_images: Banner Images
+ banner_image: Banner Image
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
old mode 100644
new mode 100755
index c0fbd0a..ac46e13
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -18,7 +18,7 @@ Rails.application.routes.draw do
end
end
locales = Site.first.in_use_locales rescue I18n.available_locales
-
+
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
namespace :admin do
resources :e_paper_criterias do
@@ -29,6 +29,7 @@ Rails.application.routes.draw do
get "get_invalid_emails"
end
end
+ resources :e_paper_images
get 'e_paper_subscribers/export_excel', to: 'e_paper_subscribers#export_excel'
get 'e_paper_subscribers/download_excel_format', to: 'e_paper_subscribers#download_excel_format'
post 'e_paper_subscribers/import_from_excel', to: 'e_paper_subscribers#import_from_excel'
@@ -37,7 +38,7 @@ Rails.application.routes.draw do
post 'e_paper_subscribers/delete_subscribers', to: 'e_paper_subscribers#delete_subscribers'
resources :e_paper_subscribers
resources :e_papers do
- member do
+ member do
get :send_email_to_subscribers
delete "delete_subscriber"
get "send_test_email"
@@ -45,7 +46,7 @@ Rails.application.routes.draw do
collection do
get "instructions"
get "subscribers"
- end
+ end
end
end
diff --git a/e_paper.gemspec b/e_paper.gemspec
old mode 100644
new mode 100755
diff --git a/lib/e_paper.rb b/lib/e_paper.rb
old mode 100644
new mode 100755
diff --git a/lib/e_paper/engine.rb b/lib/e_paper/engine.rb
old mode 100644
new mode 100755
index a8b0559..8578d3c
--- a/lib/e_paper/engine.rb
+++ b/lib/e_paper/engine.rb
@@ -37,7 +37,7 @@ module EPaper
:priority=>1,
:active_for_action=>{'admin/e_papers'=>'index'},
:available_for => 'users'
- context_link 'new_',
+ context_link 'new_',
:link_path=>"new_admin_e_paper_path" ,
:priority=>2,
:active_for_action=>{'admin/e_papers'=>'new'},
@@ -76,6 +76,11 @@ module EPaper
:priority=>8,
:active_for_action=>{'admin/e_paper'=>'instructions'},
:available_for => 'users'
+ context_link 'e_paper.banner_images',
+ :link_path=>"admin_e_paper_images_path" ,
+ :priority=>9,
+ :active_for_action=>{'admin/e_paper_images'=>'index'},
+ :available_for => 'managers'
end
end
end
diff --git a/lib/e_paper/version.rb b/lib/e_paper/version.rb
old mode 100644
new mode 100755
diff --git a/lib/tasks/e_paper_tasks.rake b/lib/tasks/e_paper_tasks.rake
old mode 100644
new mode 100755
diff --git a/modules/e_paper/_category_wise_articles.html.erb b/modules/e_paper/_category_wise_articles.html.erb
old mode 100644
new mode 100755
diff --git a/modules/e_paper/_criteria_list.html.erb b/modules/e_paper/_criteria_list.html.erb
old mode 100644
new mode 100755
diff --git a/modules/e_paper/_latest_criteria.html.erb b/modules/e_paper/_latest_criteria.html.erb
old mode 100644
new mode 100755
diff --git a/modules/e_paper/_latest_slider_aside.html.erb b/modules/e_paper/_latest_slider_aside.html.erb
old mode 100644
new mode 100755
diff --git a/modules/e_paper/_latest_slider_full_screen.html.erb b/modules/e_paper/_latest_slider_full_screen.html.erb
old mode 100644
new mode 100755
diff --git a/modules/e_paper/_subscriber.html.erb b/modules/e_paper/_subscriber.html.erb
old mode 100644
new mode 100755
diff --git a/modules/e_paper/_widget.html.erb b/modules/e_paper/_widget.html.erb
old mode 100644
new mode 100755
diff --git a/modules/e_paper/epaper_index1.html.erb b/modules/e_paper/epaper_index1.html.erb
old mode 100644
new mode 100755
diff --git a/modules/e_paper/epaper_index2.html.erb b/modules/e_paper/epaper_index2.html.erb
old mode 100644
new mode 100755
diff --git a/modules/e_paper/epaper_index2_latest.html.erb b/modules/e_paper/epaper_index2_latest.html.erb
old mode 100644
new mode 100755
diff --git a/modules/e_paper/info.json b/modules/e_paper/info.json
old mode 100644
new mode 100755
diff --git a/modules/e_paper/papers.html.erb b/modules/e_paper/papers.html.erb
old mode 100644
new mode 100755
diff --git a/modules/e_paper/show.html.erb b/modules/e_paper/show.html.erb
old mode 100644
new mode 100755
diff --git a/modules/e_paper/thumbs/category_wise_articles_thumb.png b/modules/e_paper/thumbs/category_wise_articles_thumb.png
old mode 100644
new mode 100755
diff --git a/modules/e_paper/thumbs/criteria_list_thumb.png b/modules/e_paper/thumbs/criteria_list_thumb.png
old mode 100644
new mode 100755
diff --git a/modules/e_paper/thumbs/latest_criteria_thumb.png b/modules/e_paper/thumbs/latest_criteria_thumb.png
old mode 100644
new mode 100755
diff --git a/modules/e_paper/thumbs/latest_slider_aside_thumb.png b/modules/e_paper/thumbs/latest_slider_aside_thumb.png
old mode 100644
new mode 100755
diff --git a/modules/e_paper/thumbs/latest_slider_full_screen_thumb.png b/modules/e_paper/thumbs/latest_slider_full_screen_thumb.png
old mode 100644
new mode 100755
diff --git a/modules/e_paper/thumbs/subscriber_thumb.png b/modules/e_paper/thumbs/subscriber_thumb.png
old mode 100644
new mode 100755
diff --git a/modules/e_paper/thumbs/thumb.png b/modules/e_paper/thumbs/thumb.png
old mode 100644
new mode 100755
diff --git a/modules/e_paper/topics.html.erb b/modules/e_paper/topics.html.erb
old mode 100644
new mode 100755
diff --git a/test/dummy/README.rdoc b/test/dummy/README.rdoc
old mode 100644
new mode 100755
diff --git a/test/dummy/Rakefile b/test/dummy/Rakefile
old mode 100644
new mode 100755
diff --git a/test/dummy/app/assets/images/.keep b/test/dummy/app/assets/images/.keep
old mode 100644
new mode 100755
diff --git a/test/dummy/app/assets/javascripts/application.js b/test/dummy/app/assets/javascripts/application.js
old mode 100644
new mode 100755
diff --git a/test/dummy/app/assets/stylesheets/application.css b/test/dummy/app/assets/stylesheets/application.css
old mode 100644
new mode 100755
diff --git a/test/dummy/app/controllers/application_controller.rb b/test/dummy/app/controllers/application_controller.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/app/controllers/concerns/.keep b/test/dummy/app/controllers/concerns/.keep
old mode 100644
new mode 100755
diff --git a/test/dummy/app/helpers/application_helper.rb b/test/dummy/app/helpers/application_helper.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/app/mailers/.keep b/test/dummy/app/mailers/.keep
old mode 100644
new mode 100755
diff --git a/test/dummy/app/models/.keep b/test/dummy/app/models/.keep
old mode 100644
new mode 100755
diff --git a/test/dummy/app/models/concerns/.keep b/test/dummy/app/models/concerns/.keep
old mode 100644
new mode 100755
diff --git a/test/dummy/app/views/layouts/application.html.erb b/test/dummy/app/views/layouts/application.html.erb
old mode 100644
new mode 100755
diff --git a/test/dummy/config.ru b/test/dummy/config.ru
old mode 100644
new mode 100755
diff --git a/test/dummy/config/application.rb b/test/dummy/config/application.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/boot.rb b/test/dummy/config/boot.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/database.yml b/test/dummy/config/database.yml
old mode 100644
new mode 100755
diff --git a/test/dummy/config/environment.rb b/test/dummy/config/environment.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/environments/development.rb b/test/dummy/config/environments/development.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/environments/production.rb b/test/dummy/config/environments/production.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/environments/test.rb b/test/dummy/config/environments/test.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/initializers/assets.rb b/test/dummy/config/initializers/assets.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/initializers/backtrace_silencers.rb b/test/dummy/config/initializers/backtrace_silencers.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/initializers/cookies_serializer.rb b/test/dummy/config/initializers/cookies_serializer.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/initializers/filter_parameter_logging.rb b/test/dummy/config/initializers/filter_parameter_logging.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/initializers/inflections.rb b/test/dummy/config/initializers/inflections.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/initializers/mime_types.rb b/test/dummy/config/initializers/mime_types.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/initializers/session_store.rb b/test/dummy/config/initializers/session_store.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/initializers/wrap_parameters.rb b/test/dummy/config/initializers/wrap_parameters.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/locales/en.yml b/test/dummy/config/locales/en.yml
old mode 100644
new mode 100755
diff --git a/test/dummy/config/routes.rb b/test/dummy/config/routes.rb
old mode 100644
new mode 100755
diff --git a/test/dummy/config/secrets.yml b/test/dummy/config/secrets.yml
old mode 100644
new mode 100755
diff --git a/test/dummy/lib/assets/.keep b/test/dummy/lib/assets/.keep
old mode 100644
new mode 100755
diff --git a/test/dummy/log/.keep b/test/dummy/log/.keep
old mode 100644
new mode 100755
diff --git a/test/dummy/public/404.html b/test/dummy/public/404.html
old mode 100644
new mode 100755
diff --git a/test/dummy/public/422.html b/test/dummy/public/422.html
old mode 100644
new mode 100755
diff --git a/test/dummy/public/500.html b/test/dummy/public/500.html
old mode 100644
new mode 100755
diff --git a/test/dummy/public/favicon.ico b/test/dummy/public/favicon.ico
old mode 100644
new mode 100755
diff --git a/test/e_paper_test.rb b/test/e_paper_test.rb
old mode 100644
new mode 100755
diff --git a/test/integration/navigation_test.rb b/test/integration/navigation_test.rb
old mode 100644
new mode 100755
diff --git a/test/test_helper.rb b/test/test_helper.rb
old mode 100644
new mode 100755