Frontend
This commit is contained in:
parent
33bd5ae164
commit
dd9bc683ba
|
@ -0,0 +1,96 @@
|
||||||
|
class PersonalConferencesController < ApplicationController
|
||||||
|
def index
|
||||||
|
writing_conferences = WritingConference.all
|
||||||
|
writing_conference_list = writing_conferences.collect do |writing_conference|
|
||||||
|
{
|
||||||
|
"year" => writing_conference.year,
|
||||||
|
"paper_title" => writing_conference.paper_title,
|
||||||
|
"author" => writing_conference.member_profile.name,
|
||||||
|
"link_to_show" => OrbitHelper.url_to_show(writing_conference.to_param)
|
||||||
|
}
|
||||||
|
end
|
||||||
|
{
|
||||||
|
"writing_conferences" => writing_conference_list,
|
||||||
|
"extras" => {
|
||||||
|
"widget-title" => t("module_name.personal_conference"),
|
||||||
|
"th_year" => t('personal_plugins.year'),
|
||||||
|
"th_title" => t("personal_conference.paper_title"),
|
||||||
|
"th_author" => t('personal_plugins.author')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
params = OrbitHelper.params
|
||||||
|
writing_conference = WritingConference.find_by(uid: params[:uid])
|
||||||
|
|
||||||
|
files = writing_conference.writing_conference_files.map do |file|
|
||||||
|
{
|
||||||
|
"file_url" => file.file.url,
|
||||||
|
"file_title" => (file.title.blank? ? File.basename(file.file.path) : file.title),
|
||||||
|
"file_ext" => File.extname(file.file.path).sub('.',''),
|
||||||
|
"file_description" => file.description
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
paper_types = writing_conference.conference_paper_types.map do |type|
|
||||||
|
{"paper_type"=>type.title}
|
||||||
|
end
|
||||||
|
|
||||||
|
author_types = writing_conference.conference_author_types.map do |type|
|
||||||
|
{"author_type"=>type.title}
|
||||||
|
end
|
||||||
|
|
||||||
|
paper_levels = writing_conference.conference_paper_levels.map do |level|
|
||||||
|
{"paper_level"=>level.title}
|
||||||
|
end
|
||||||
|
|
||||||
|
{
|
||||||
|
"files" => files,
|
||||||
|
"paper_types" => paper_types,
|
||||||
|
"author_types" => author_types,
|
||||||
|
"paper_levels" => paper_levels,
|
||||||
|
|
||||||
|
"data" => {
|
||||||
|
"paper_title" => writing_conference.paper_title,
|
||||||
|
"conference_title" => writing_conference.conference_title,
|
||||||
|
"authors" => writing_conference.authors,
|
||||||
|
"location" => writing_conference.location,
|
||||||
|
"sponsor" => writing_conference.sponsor,
|
||||||
|
"year" => writing_conference.year,
|
||||||
|
"language" => t(writing_conference.language),
|
||||||
|
"keywords" => writing_conference.keywords,
|
||||||
|
"abstract" => writing_conference.abstract,
|
||||||
|
"publication_date" => writing_conference.publication_date,
|
||||||
|
"period_start_date"=> writing_conference.period_start_date,
|
||||||
|
"period_end_date" => writing_conference.period_end_date,
|
||||||
|
"url" => writing_conference.url,
|
||||||
|
"note" => writing_conference.note,
|
||||||
|
"isbn" => writing_conference.isbn,
|
||||||
|
"isi_number" => writing_conference.isi_number,
|
||||||
|
|
||||||
|
"td_year" => t("personal_conference.year"),
|
||||||
|
"td_paper_title" => t("personal_conference.paper_title"),
|
||||||
|
"td_conference_title" => t("personal_conference.conference_title"),
|
||||||
|
"td_location" => t("personal_conference.location"),
|
||||||
|
"td_period_start_date" => t("personal_conference.period_start_date"),
|
||||||
|
"td_period_end_date" => t("personal_conference.period_end_date"),
|
||||||
|
"td_duration" => t("personal_conference.duration"),
|
||||||
|
"td_publication_date" => t("personal_conference.publication_date"),
|
||||||
|
"td_sponsor" => t("personal_conference.sponsor"),
|
||||||
|
"td_authors" => t("personal_conference.authors"),
|
||||||
|
"td_language" => t("personal_conference.language"),
|
||||||
|
"td_isbn" => t("personal_conference.isbn"),
|
||||||
|
"td_isi_number" => t("personal_conference.isi_number"),
|
||||||
|
"td_url" => t("personal_conference.url"),
|
||||||
|
"td_keywords" => t("personal_conference.keywords"),
|
||||||
|
"td_abstract" => t("personal_conference.abstract"),
|
||||||
|
"td_note" => t("personal_conference.note"),
|
||||||
|
"td_paper_type" => t("personal_conference.paper_type"),
|
||||||
|
"td_author_type" => t("personal_conference.author_type"),
|
||||||
|
"td_paper_level" => t("personal_conference.paper_level"),
|
||||||
|
"td_files" => t(:file_)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1 @@
|
||||||
|
<%= render_view %>
|
|
@ -0,0 +1 @@
|
||||||
|
<%= render_view %>
|
|
@ -13,6 +13,7 @@ en:
|
||||||
conference_time: "Conference Time"
|
conference_time: "Conference Time"
|
||||||
period_start_date : "Start Date"
|
period_start_date : "Start Date"
|
||||||
period_end_date : "End Date"
|
period_end_date : "End Date"
|
||||||
|
duration: "Duration"
|
||||||
location : "Location"
|
location : "Location"
|
||||||
sponsor : "Sponsor"
|
sponsor : "Sponsor"
|
||||||
authors : "Authors"
|
authors : "Authors"
|
||||||
|
|
|
@ -12,6 +12,7 @@ zh_tw:
|
||||||
conference_time: "會議時間"
|
conference_time: "會議時間"
|
||||||
period_start_date : "起"
|
period_start_date : "起"
|
||||||
period_end_date : "訖"
|
period_end_date : "訖"
|
||||||
|
duration: "期間"
|
||||||
location : "地點"
|
location : "地點"
|
||||||
sponsor : "主辦單位"
|
sponsor : "主辦單位"
|
||||||
authors : "全部作者"
|
authors : "全部作者"
|
||||||
|
|
|
@ -4,13 +4,16 @@ module PersonalConference
|
||||||
OrbitApp.registration "PersonalConference",:type=> 'ModuleApp' do
|
OrbitApp.registration "PersonalConference",:type=> 'ModuleApp' do
|
||||||
module_label 'module_name.personal_conference'
|
module_label 'module_name.personal_conference'
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
personal_plugin :enable => true, :sort_number => '6', :app_name=>"WritingConference", :intro_app_name=>"PersonalConferenceIntro",:path=>"/plugin/personal_conference/profile",:front_path=>"/profile",:admin_path=>"/admin/writing_conferences",:i18n=>'module_name.personal_conference'
|
personal_plugin :enable => true, :sort_number => '6', :app_name=>"WritingConference", :intro_app_name=>"PersonalConferenceIntro",:path=>"/plugin/personal_conference/profile",:front_path=>"/profile",:admin_path=>"/admin/writing_conferences",:i18n=>'module_name.personal_conference', :module_app_name=>'PersonalConference'
|
||||||
|
|
||||||
version "0.1"
|
version "0.1"
|
||||||
organization "Rulingcom"
|
organization "Rulingcom"
|
||||||
author "RD dep"
|
author "RD dep"
|
||||||
intro "I am intro"
|
intro "I am intro"
|
||||||
update_info 'some update_info'
|
update_info 'some update_info'
|
||||||
|
|
||||||
|
frontend_enabled
|
||||||
|
icon_class_no_sidebar "icons-user"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue