diff --git a/app/controllers/e_papers_controller.rb b/app/controllers/e_papers_controller.rb
index 6e32eb2..07799d9 100644
--- a/app/controllers/e_papers_controller.rb
+++ b/app/controllers/e_papers_controller.rb
@@ -9,8 +9,8 @@ class EPapersController < ApplicationController
"description" => topic.description,
"img_url" => topic.image.url,
"img_url_thumb" => topic.image.thumb.url,
- "category" => topic.category.title,
- "category_title" => topic.category.title,
+ "category" => (topic.category.title rescue ""),
+ "category_title" => (topic.category.title rescue ""),
"publish_date" => topic.period
}
end
@@ -19,7 +19,7 @@ class EPapersController < ApplicationController
"extras" => {
},
- "total_pages" => topics.total_pages
+ "total_pages" => (topics.count * 1.0 / OrbitHelper.page_data_count).ceil
}
end
diff --git a/modules/e_paper/_category_wise_articles.html.erb b/modules/e_paper/_category_wise_articles.html.erb
new file mode 100644
index 0000000..80aa05f
--- /dev/null
+++ b/modules/e_paper/_category_wise_articles.html.erb
@@ -0,0 +1,7 @@
+
+
+
+
{{description}}
+
+
+
\ No newline at end of file
diff --git a/modules/e_paper/_criteria_list.html.erb b/modules/e_paper/_criteria_list.html.erb
new file mode 100644
index 0000000..2863591
--- /dev/null
+++ b/modules/e_paper/_criteria_list.html.erb
@@ -0,0 +1,20 @@
+
+
+
+ {{th_title}} |
+ {{th_description}} |
+
+
+
+
+
+
+
+ {{title}}
+ |
+ {{description}} |
+
+
+
+
+Read More
diff --git a/modules/e_paper/_latest_criteria.html.erb b/modules/e_paper/_latest_criteria.html.erb
new file mode 100644
index 0000000..73b3223
--- /dev/null
+++ b/modules/e_paper/_latest_criteria.html.erb
@@ -0,0 +1,10 @@
+
+
+
+
+
+
{{description}}
+
+
+
+
diff --git a/modules/e_paper/_latest_slider_aside.html.erb b/modules/e_paper/_latest_slider_aside.html.erb
new file mode 100644
index 0000000..6343052
--- /dev/null
+++ b/modules/e_paper/_latest_slider_aside.html.erb
@@ -0,0 +1,14 @@
+
diff --git a/modules/e_paper/_latest_slider_full_screen.html.erb b/modules/e_paper/_latest_slider_full_screen.html.erb
new file mode 100644
index 0000000..f1feab3
--- /dev/null
+++ b/modules/e_paper/_latest_slider_full_screen.html.erb
@@ -0,0 +1,40 @@
+
+
+
+
diff --git a/modules/e_paper/_subscriber.html.erb b/modules/e_paper/_subscriber.html.erb
new file mode 100644
index 0000000..899dfc6
--- /dev/null
+++ b/modules/e_paper/_subscriber.html.erb
@@ -0,0 +1,39 @@
+
+
diff --git a/modules/e_paper/_widget.html.erb b/modules/e_paper/_widget.html.erb
new file mode 100644
index 0000000..6cf1f24
--- /dev/null
+++ b/modules/e_paper/_widget.html.erb
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/modules/e_paper/epaper_index1.html.erb b/modules/e_paper/epaper_index1.html.erb
new file mode 100644
index 0000000..0c4d026
--- /dev/null
+++ b/modules/e_paper/epaper_index1.html.erb
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/e_paper/epaper_index2.html.erb b/modules/e_paper/epaper_index2.html.erb
new file mode 100644
index 0000000..960781e
--- /dev/null
+++ b/modules/e_paper/epaper_index2.html.erb
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/e_paper/info.json b/modules/e_paper/info.json
new file mode 100644
index 0000000..380b840
--- /dev/null
+++ b/modules/e_paper/info.json
@@ -0,0 +1,66 @@
+{
+ "frontend": [
+ {
+ "filename" : "epaper_index1",
+ "name" : {
+ "zh_tw" : "1. 電子報列表",
+ "en" : "1. Thumbnail ( widget-title, question )"
+ },
+ "thumbnail" : "thumb.png"
+ },
+ {
+ "filename" : "epaper_index2",
+ "name" : {
+ "zh_tw" : "2. 電子報列表-title",
+ "en" : "1. Thumbnail ( widget-title, question )"
+ },
+ "thumbnail" : "thumb.png"
+ }
+ ],
+ "widgets" : [
+ {
+ "filename" : "criteria_list",
+ "name" : {
+ "zh_tw" : "電子報目錄",
+ "en" : "Criteria List"
+ },
+ "thumbnail" : "criteria_list_thumb.png"
+ }, {
+ "filename": "category_wise_articles",
+ "name": {
+ "zh_tw": "電子報類別目錄",
+ "en": "Category wise articles"
+ },
+ "thumbnail": "category_wise_articles_thumb.png"
+ }, {
+ "filename": "latest_criteria",
+ "name": {
+ "zh_tw": "最新一期文章",
+ "en": "Latest articles"
+ },
+ "thumbnail": "latest_criteria_thumb.png"
+ }, {
+ "filename": "latest_slider_full_screen",
+ "name": {
+ "zh_tw": "最新一期文章輪撥(全幅)",
+ "en": "Latest articles slider full screen"
+ },
+ "thumbnail": "latest_slider_full_screen_thumb.png"
+ }, {
+ "filename": "latest_slider_aside",
+ "name": {
+ "zh_tw": "最新一期文章輪撥(邊欄)",
+ "en": "Latest articles slider aside"
+ },
+ "thumbnail": "latest_slider_aside_thumb.png"
+ },
+ {
+ "filename": "subscriber",
+ "name": {
+ "zh_tw": "訂閱",
+ "en": "Subscriber widget"
+ },
+ "thumbnail": "subscriber_thumb.png"
+ }
+ ]
+}
diff --git a/modules/e_paper/papers.html.erb b/modules/e_paper/papers.html.erb
new file mode 100644
index 0000000..b9fecf7
--- /dev/null
+++ b/modules/e_paper/papers.html.erb
@@ -0,0 +1,21 @@
+
+
+
+ {{th_title}} |
+ {{th_description}} |
+
+
+
+
+
+
+
+ {{title}}
+ |
+ {{description}} |
+
+
+
+
+
+{{pagination_goes_here}}
\ No newline at end of file
diff --git a/modules/e_paper/show.html.erb b/modules/e_paper/show.html.erb
new file mode 100644
index 0000000..6073534
--- /dev/null
+++ b/modules/e_paper/show.html.erb
@@ -0,0 +1,16 @@
+
+ {{member_name}}
+
+ {{member_autobiography}}
+
{{title}}
+
+ {{category_title}}
+ {{criteria_title}}
+
+
+ {{publish_date}}
+
+
+
+
{{content}}
+
diff --git a/modules/e_paper/thumbs/category_wise_articles_thumb.png b/modules/e_paper/thumbs/category_wise_articles_thumb.png
new file mode 100644
index 0000000..91af9c4
Binary files /dev/null and b/modules/e_paper/thumbs/category_wise_articles_thumb.png differ
diff --git a/modules/e_paper/thumbs/criteria_list_thumb.png b/modules/e_paper/thumbs/criteria_list_thumb.png
new file mode 100644
index 0000000..10b6755
Binary files /dev/null and b/modules/e_paper/thumbs/criteria_list_thumb.png differ
diff --git a/modules/e_paper/thumbs/latest_criteria_thumb.png b/modules/e_paper/thumbs/latest_criteria_thumb.png
new file mode 100644
index 0000000..91af9c4
Binary files /dev/null and b/modules/e_paper/thumbs/latest_criteria_thumb.png differ
diff --git a/modules/e_paper/thumbs/latest_slider_aside_thumb.png b/modules/e_paper/thumbs/latest_slider_aside_thumb.png
new file mode 100644
index 0000000..694dd72
Binary files /dev/null and b/modules/e_paper/thumbs/latest_slider_aside_thumb.png differ
diff --git a/modules/e_paper/thumbs/latest_slider_full_screen_thumb.png b/modules/e_paper/thumbs/latest_slider_full_screen_thumb.png
new file mode 100644
index 0000000..5111521
Binary files /dev/null and b/modules/e_paper/thumbs/latest_slider_full_screen_thumb.png differ
diff --git a/modules/e_paper/thumbs/subscriber_thumb.png b/modules/e_paper/thumbs/subscriber_thumb.png
new file mode 100644
index 0000000..61942b6
Binary files /dev/null and b/modules/e_paper/thumbs/subscriber_thumb.png differ
diff --git a/modules/e_paper/thumbs/thumb.png b/modules/e_paper/thumbs/thumb.png
new file mode 100644
index 0000000..266af56
Binary files /dev/null and b/modules/e_paper/thumbs/thumb.png differ
diff --git a/modules/e_paper/topics.html.erb b/modules/e_paper/topics.html.erb
new file mode 100644
index 0000000..1fd64b7
--- /dev/null
+++ b/modules/e_paper/topics.html.erb
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file