diff --git a/vendor/built_in_modules/personal_conference/app/helpers/panel/.gitkeep b/vendor/built_in_modules/personal_conference/app/helpers/panel/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/.gitkeep b/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/.gitkeep b/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb b/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb new file mode 100644 index 00000000..cac790d3 --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb @@ -0,0 +1,65 @@ +module Panel::PersonalConference::Desktop::ConferencePagesHelper + def publication_record publication + content_tag :li, + :class => "list_t_item" do + marker + \ + content(publication) + \ + edit_or_delete(publication) + end + end + + def marker + content_tag :div, + :class => "list_item_action" + content_tag(:a, "", :class => "icon-check-empty") + \ + content_tag(:a, "", :class => "icon-star-empty") + end + + def content publication + content_tag(:div, "conference : " + publication.conference_title, + :class => "list_t_title") + \ + content_tag(:div, "title : " + publication.paper_title, + :class => "list_t_des") + \ + content_tag(:div, "keyword :" + publication.keywords, + :class => "list_t_des") + \ + content_tag(:div, "abstract : " + publication.abstract, + :class => "list_t_des") + \ + content_tag(:div, link_publication_file(publication), + :class => "list_t_des") + end + + def edit_or_delete publication + content_tag :div, + :class => "list_item_function" do + content_tag(:a, t("edit"), + :class => "journal_paper_edit admbg2 admtxt", + :href => edit_panel_personal_conference_desktop_conference_page_path(publication), + "ajax-remote" => "get") + \ + content_tag(:a, t("delete"), + "ajax-remote" => "delete", + "confirm-message" => t("sure?"), + "callback-method" => "paperDelete", + :class => "journal_paper_delete admbg2 admtxt", + :href => panel_personal_conference_desktop_conference_page_path(publication)) + end + end + + def link_publication_file publication + publication.writing_conference_files.map{|file| + link_to(image_tag(check_file_type(file.file.url)) + \ + content_tag(:span, file.title, :class => "filetitle"), + file.file.url, + :class => "file", + "target" => "_blank") + }.inject(:+) + end + + def check_file_type file + if not file.nil? + file_type = MIME::Types.type_for(file).first.to_s.split("/")[1] + file_type = "/assets/ft-icons/#{file_type}/#{file_type}-48_32.png" + else + file_type = "" + end + end +end diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb index e32e4d6c..7a3848df 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb @@ -1,75 +1,77 @@
-
-
-
- -
-
-
-
More
-
- -
-
-
-
Tag
-
- -
-
-
-
Status
-
- -
-
-
-
View
-
- -
-
-
-
Share
-
- -
-
-
-
-
+
+
+
+ +
+
+
+
More
+
+ +
+
+
+
Tag
+
+ +
+
+
+
Status
+
+ +
+
+
+
View
+ +
+
+
Share
+
+ +
+
+
+
+
-
-
-
- -
-
-
\ No newline at end of file +
+
+
+ <% @writing_conferences.each do |w| %> + <%= publication_record w%> + <% end %> +
+
+