fix new ui member plugins and member frontend page

This commit is contained in:
Spen 2013-11-21 11:57:23 +08:00 committed by Manson Wang
parent 43dcec76a1
commit f702410c9f
84 changed files with 1207 additions and 383 deletions

View File

@ -45,7 +45,9 @@
</li> </li>
<% end %> <% end %>
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li> <li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
<% if !member.office_tel.blank? %>
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li> <li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
<% end %>
</ul> </ul>
</li> </li>
@ -84,7 +86,9 @@
<li><b class="o-members-label"><%= @job_title_field.title %></b><%= @job_title %></li> <li><b class="o-members-label"><%= @job_title_field.title %></b><%= @job_title %></li>
<% end %> <% end %>
<li><b class="o-members-label"><%= t("users.email")%></b> <%= member.email %></li> <li><b class="o-members-label"><%= t("users.email")%></b> <%= member.email %></li>
<% if !member.office_tel.blank? %>
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li> <li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
<% end %>
</ul> </ul>
</li> </li>

View File

@ -0,0 +1,125 @@
.default_member:after {
content: "";
clear: both;
display: block;
visibility: hidden;
}
.default_member .member-pic {
float: left;
width: 30%;
}
.default_member .member-pic img {
width: 100%;
height: auto;
}
.default_member .member-data {
float: right;
width: 68%;
}
.default_member .member-data table {
width: 100%;
background-color: #fff;
}
.default_member .member-data table td {
padding: 5px;
background-color: #ccc;
border: 1px solid #fff;
}
.default_member .member-data table td + td {
background-color: #ededed;
}
.default_member .member-module {
clear: both;
padding-top: 30px;
}
.default_member .member-module .module-nav ul {
margin: 0;
padding: 0;
list-style: none;
border-bottom: 1px solid #ccc;
}
.default_member .member-module .module-nav ul:after {
content: "";
clear: both;
display: block;
height: 0;
visibility: hidden;
}
.default_member .member-module .module-nav ul li {
float: left;
display: inline-block;
margin-right: 3px;
margin-bottom: 5px;
}
.default_member .member-module .module-nav ul li a {
padding: 5px 8px;
line-height: 30px;
height: 30px;
border-radius: 3px;
text-decoration: none;
background-color: #DDD;
}
.default_member .member-module .module-nav ul li.active a {
background-color: #0088CE;
color: #FFF;
}
.default_member .member-module .module-content {
position: relative;
margin-bottom: 20px;
}
.default_member .member-module .module-content .module-pane {
display: none;
top: 0;
left: 0;
}
.default_member .member-module .module-content .module-pane table {
width: 100%;
}
.default_member .member-module .module-content .module-pane.active {
display: block;
}
[class*="grid"] + [class*="grid"] {
margin-left: 2.12766%;
}
.grid12 {
width: 100%;
}
.grid11 {
width: 91.4894%;
}
.grid10 {
width: 82.9787%;
}
.grid9 {
width: 74.4681%;
}
.grid8 {
width: 65.9574%;
}
.grid7 {
width: 57.4468%;
}
.grid6 {
width: 48.9362%;
}
.grid5 {
width: 40.4255%;
}
.grid4 {
width: 31.9149%;
}
.grid3 {
width: 23.4043%;
}
.grid2 {
width: 14.8936%;
}
.grid1 {
width: 6.38298%;
}

View File

@ -51,7 +51,7 @@ class Panel::MemberStaff::FrontEnd::MemberStaffListsController < OrbitWidgetCont
end end
def show def show
@member_list = User.find(params[:id]) @member = User.find(params[:id])
# get_categorys # get_categorys
end end

View File

@ -0,0 +1,52 @@
<%
@status = @member.role_statuses.where(:role_id=>show_roles.id)
if !@status.blank?
%>
<tr>
<td><%= t('status')%></td>
<td><%= show_attribute_value(@member.role_statuses.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
</tr>
<% end -%>
<%
@category = @member.role_categorys.where(:role_id=>show_roles.id)
if !@category.blank?
%>
<tr>
<td><%= t('category')%></td>
<td><%= show_attribute_value(@member.role_categorys.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
</tr>
<% end -%>
<% show_roles.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %>
<%
if !@member.get_attribute_value(rf).blank?
if !@member.get_attribute_value(rf)['val'].blank?
@rodata = @member.get_attribute_value(rf)['val']
elsif !@member.get_attribute_value(rf)[I18n.locale].blank?
@rodata = @member.get_attribute_value(rf)[I18n.locale]
else
@rodata = nil
end
if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank?
%>
<tr>
<td><%= rf.title %></td>
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
</tr>
<% end -%>
<% end -%>
<% end -%>
<%= render :partial => 'show_sub_role',:collection=> @member.get_sub_roles_by_role(show_roles)%>

View File

@ -0,0 +1,28 @@
<% show_sub_role.attribute_fields.where(:disabled=>false).asc(:_id).each do |item| %>
<%
if !@member.get_attribute_value(item).blank?
if !@member.get_attribute_value(item)['val'].blank?
@rodata = @member.get_attribute_value(item)['val']
elsif !@member.get_attribute_value(item)[I18n.locale].blank?
@rodata = @member.get_attribute_value(item)[I18n.locale]
else
@rodata = nil
end
end
if !@rodata.blank? and !@member.get_attribute_value(item).get_value_by_locale(I18n.locale).blank?
%>
<tr>
<td><%= item.title %></td>
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(item).get_value_by_locale(I18n.locale))) rescue '' %></td>
</tr>
<% end -%>
<% end -%>

View File

@ -44,8 +44,10 @@
<%= @job_title %> <%= @job_title %>
</li> </li>
<% end %> <% end %>
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li> <li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_staff_front_end_member_staff_list_path(member.id), {:class => "o-members-link"} %></li>
<% if !member.office_tel.blank? %>
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li> <li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
<% end %>
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li> <li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
<% @job_business = @member_lists.get_member_list_attribute_value(member.id,@job_business_field.id).get_value_by_locale(I18n.locale) <% @job_business = @member_lists.get_member_list_attribute_value(member.id,@job_business_field.id).get_value_by_locale(I18n.locale)
@ -93,8 +95,10 @@
<%= @job_title %> <%= @job_title %>
</li> </li>
<% end %> <% end %>
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li> <li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_staff_front_end_member_staff_list_path(member.id), {:class => "o-members-link"} %></li>
<% if !member.office_tel.blank? %>
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li> <li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
<% end %>
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li> <li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
@ -165,7 +169,9 @@
</span> </span>
</td> </td>
<td><span class="name"><%= link_to member.name, "mailto:#{member.email}" %></span></td> <td><span class="name"><%= link_to member.name, "mailto:#{member.email}" %></span></td>
<% if !member.office_tel.blank? %>
<td><span class="tel"><%= member.office_tel %></span></td> <td><span class="tel"><%= member.office_tel %></span></td>
<% end %>
<td> <td>
<span class="business"> <span class="business">
<% @job_business = @member_lists.get_member_list_attribute_value(member.id,@job_business_field.id).get_value_by_locale(I18n.locale) <% @job_business = @member_lists.get_member_list_attribute_value(member.id,@job_business_field.id).get_value_by_locale(I18n.locale)

View File

@ -0,0 +1,44 @@
<div class="default_member">
<div class="member-data">
<table>
<tbody>
<tr>
<td><%= t('users.name')%></td>
<td><%= @member.name%></td>
</tr>
<tr>
<td><%= t('users.email')%></td>
<td><a href="mailto:<%= @member.email %>"><%= @member.email %></a></td>
</tr>
<% if !@member.sid.blank? %>
<tr>
<td><%= t('users.sid')%></td>
<td><%= @member.sid%></td>
</tr>
<% end %>
<% if !@member.office_tel.blank? %>
<tr>
<td><%= t('users.office_tel')%></td>
<td><%= @member.office_tel%></td>
</tr>
<% end %>
<tr>
<td><%= t('users.sex')%></td>
<td><%= t("users.#{@member.sex}") %></td>
</tr>
<%= render :partial=> "show_roles",:collection=>@member.roles.where(:disabled=>false).asc(:created_at) %>
</tbody>
</table>
</div>
<div class="member-pic">
<%= image_tag(@member.avatar) %>
</div>
</div>
<%= stylesheet_link_tag "member_staff/default_member" %>

View File

@ -10,7 +10,7 @@ Rails.application.routes.draw do
end end
namespace :front_end do namespace :front_end do
match "member_staff_lists" => "member_staff_lists#index" match "member_staff_lists" => "member_staff_lists#index"
resources :member_lists resources :member_staff_lists
end end
namespace :widget do namespace :widget do
match "index" => "member_staff_lists#index" match "index" => "member_staff_lists#index"

View File

@ -8,7 +8,7 @@ class Panel::PersonalBook::FrontEnd::WritingBooksController < OrbitWidgetControl
def index def index
@writing_books = WritingBook.desc(:year).page(params[:page]).per(10) @writing_books = WritingBook.where(:is_hidden => false).desc(:year,:publish_date).page(params[:page]).per(10)
end end

View File

@ -84,11 +84,17 @@ class WritingBook
def create_link def create_link
title = [] title = []
# title = ["#{self.extracted_chapters}"] if self.extracted_chapters.present? title << self.authors if self.authors.present?
title << self.paper_title if self.paper_title.present?
# title << self.paper_title if self.paper_title.present?
title << self.book_title if self.book_title.present? title << self.book_title if self.book_title.present?
title << self.publisher if self.publisher.present? title << self.publisher if self.publisher.present?
title << self.pages if self.pages.present? title << self.isbn if self.isbn.present?
pd = self.publish_date.strftime("%Y-%m-%d").split('-')
title << pd[0]+"/"+pd[1]
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" # title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
title.join(', ') title.join(', ')
end end

View File

@ -103,10 +103,9 @@
</div> </div>
</div> </div>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp; <!-- <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp;
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; -->
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 新增</a>&nbsp; <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_book_back_end_writing_book_path, :class => 'btn btn-primary pull-right' %>
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 設定</a> 
</div> </div>
<div id="author_type_qe"> <div id="author_type_qe">

View File

@ -1,7 +1,7 @@
<% <%
if @member if @member
@writing_books = WritingBook.where(is_hidden: false, :create_user_id => @member.id).desc(:year) @writing_books = WritingBook.where(is_hidden: false, :create_user_id => @member.id).desc(:year,:publish_date)
@writing_book_intro = !PersonalBookIntro.where(:user_id => @member.id).blank? ? PersonalBookIntro.where(:user_id => @member.id).first : PersonalBookIntro.new @writing_book_intro = !PersonalBookIntro.where(:user_id => @member.id).blank? ? PersonalBookIntro.where(:user_id => @member.id).first : PersonalBookIntro.new
%> %>
@ -35,7 +35,7 @@
<td> <td>
<%= link_to writing_book.create_link, panel_personal_book_front_end_writing_book_path(writing_book) %> <%= link_to writing_book.create_link, panel_personal_book_front_end_writing_book_path(writing_book) %>
</td> </td>
<td><%= writing_book.authors %></td> <td><%= User.find(writing_book.create_user_id).name rescue '' %></td>
</tr> </tr>
<% end %> <% end %>

View File

@ -2,26 +2,37 @@
<%= flash_messages %> <%= flash_messages %>
<h1><%= t('writing_book.list_writing_book') %></h1> <h1><%= t('module_name.personal_book') %></h1>
<table>
<tr>
<th><%= t(:year) %></th>
<th><%= t(:title) %></th>
</tr>
<% @writing_books.each do |post| %>
<tr> <table class="table">
<td><%= post.year %></td> <thead>
<tr>
<th class="grid1"><%= t('personal_book.year') %></th>
<th class="grid1"><%= t('personal_book.book_paper_type') %></th>
<th class="grid8"><%= t('personal_book.book_title') %></th>
<th class="grid3"><%= t('personal_book.authors') %></th>
</tr>
</thead>
<tbody>
<% @writing_books.each do |writing_book| %>
<tr>
<td><%= writing_book.year %></td>
<td><%= writing_book.book_paper_type.title %></td>
<td> <td>
<%= link_to post.create_link , panel_personal_book_front_end_writing_book_path(post) %> <%= link_to writing_book.create_link, panel_personal_book_front_end_writing_book_path(writing_book) %>
</td> </td>
</tr> <td><%= User.find(writing_book.create_user_id).name rescue '' %></td>
</tr>
<% end %> <% end %>
</table> </tbody>
</table>
<%= paginate @writing_books, :params => {:inner => false}%> <%= paginate @writing_books, :params => {:inner => false}%>

View File

@ -1,37 +1,79 @@
<% # encoding: utf-8 %> <% # encoding: utf-8 %>
<table> <table>
<caption> <%= t("writing_book") %> </caption> <caption> <%= t("module_name.personal_book") %> </caption>
<tbody> <tbody>
<tr><th><%= t("writing_book.year")%></th><td><%= @writing_book.year %></td></tr> <% if !@writing_book.year.blank? %>
<tr><th><%= t("writing_book.language")%></th><td><%= @writing_book.language %></td></tr> <tr><th><%= t("personal_book.year")%></th><td><%= @writing_book.year %></td></tr>
<tr><th><%= t("writing_book.paper_title")%></th><td><%= @writing_book.paper_title %></td></tr> <% end %>
<tr><th><%= t("writing_book.book_title")%></th><td><%= @writing_book.book_title %></td></tr>
<tr><th><%= t("writing_book.book_paper_type")%></th><td><%= @writing_book.book_paper_type.title if !@writing_book.book_paper_type.blank? %></td></tr> <% if !@writing_book.language.blank? %>
<tr><th><%= t("writing_book.book_author_types")%></th><td><%= @book_author_types %></td></tr> <tr><th><%= t("personal_book.language")%></th><td><%= @writing_book.language %></td></tr>
<tr><th><%= t("writing_book.extracted_chapters")%></th><td><%= @writing_book.extracted_chapters %></td></tr> <% end %>
<tr><th><%= t("writing_book.publisher")%></th><td><%= @writing_book.publisher %></td></tr>
<tr><th><%= t("writing_book.editor")%></th><td><%= @writing_book.editor %></td></tr> <% if !@writing_book.paper_title.blank? %>
<tr><th><%= t("writing_book.publish_date")%></th><td><%= @writing_book.publish_date %></td></tr> <tr><th><%= t("personal_book.paper_title")%></th><td><%= @writing_book.paper_title %></td></tr>
<tr><th><%= t("writing_book.pages")%></th><td><%= @writing_book.pages %></td></tr> <% end %>
<tr><th><%= t("writing_book.isbn")%></th><td><%= @writing_book.isbn %></td></tr>
<tr><th><%= t("writing_book.publication_date")%></th><td><%= @writing_book.publication_date %></td></tr> <% if !@writing_book.book_title.blank? %>
<tr><th><%= t("writing_book.url")%></th><td><%= link_to t(:url), @writing_book.url, {:target => '_blank', :title => @writing_book.book_title} if !@writing_book.url.blank? %></td></tr> <tr><th><%= t("personal_book.book_title")%></th><td><%= @writing_book.book_title %></td></tr>
<tr><th><%= t("writing_book.note")%></th><td><%= @writing_book.note %></td></tr> <% end %>
<tr><th><%= t("writing_book.authors")%></th><td><%= "#{User.from_id(@writing_book.create_user_id).name rescue ''},#{@writing_book.authors rescue ''}"%></td></tr>
<tr><th><%= t("writing_book.files")%></th> <% if !@writing_book.book_paper_type.blank? %>
<td> <tr><th><%= t("personal_book.book_paper_type")%></th><td><%= @writing_book.book_paper_type.title if !@writing_book.book_paper_type.blank? %></td></tr>
<% if @writing_book.writing_book_files.size > 0 %> <% end %>
<div>
<i class="icons-paperclip"></i> <% if !@book_author_types.blank? %>
<div class="showFile"> <tr><th><%= t("personal_book.author_type")%></th><td><%= @book_author_types %></td></tr>
<% end %>
<% if !@writing_book.extracted_chapters.blank? %>
<tr><th><%= t("personal_book.extracted_chapters")%></th><td><%= @writing_book.extracted_chapters %></td></tr>
<% end %>
<% if !@writing_book.publisher.blank? %>
<tr><th><%= t("personal_book.publisher")%></th><td><%= @writing_book.publisher %></td></tr>
<% end %>
<% if !@writing_book.editor.blank? %>
<tr><th><%= t("personal_book.editor")%></th><td><%= @writing_book.editor %></td></tr>
<% end %>
<% if !@writing_book.publish_date.blank? %>
<tr><th><%= t("personal_book.publish_date")%></th><td><%= @writing_book.publish_date %></td></tr>
<% end %>
<% if !@writing_book.pages.blank? %>
<tr><th><%= t("personal_book.pages")%></th><td><%= @writing_book.pages %></td></tr>
<% end %>
<% if !@writing_book.isbn.blank? %>
<tr><th><%= t("personal_book.isbn")%></th><td><%= @writing_book.isbn %></td></tr>
<% end %>
<% if !@writing_book.publication_date.blank? %>
<tr><th><%= t("personal_book.publication_date")%></th><td><%= @writing_book.publication_date %></td></tr>
<% end %>
<% if !@writing_book.url.blank? %>
<tr><th><%= t("personal_book.url")%></th><td><%= link_to t(:url), @writing_book.url, {:target => '_blank', :title => @writing_book.url} if !@writing_book.url.blank? %></td></tr>
<% end %>
<tr><th><%= t("personal_book.authors")%></th><td><%= "#{User.from_id(@writing_book.create_user_id).name rescue ''},#{@writing_book.authors rescue ''}"%></td></tr>
<% if @writing_book.writing_book_files.size > 0 %>
<tr><th><%= t("personal_book.files")%></th>
<td>
<div>
<div class="showFile">
<i class="icons-paperclip"></i>
<% @writing_book.writing_book_files.each do | wjfile | %> <% @writing_book.writing_book_files.each do | wjfile | %>
<%= link_to wjfile.title, wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %> <%= link_to wjfile.title, wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %>
<% end %> <% end %>
</div>
</div> </div>
</div> </td>
<% end %> </tr>
</td> <% end %>
</tr> </tbody>
</tbody>
</table> </table>

View File

@ -30,6 +30,8 @@ en:
description : "File Description" description : "File Description"
pages : "Pages" pages : "Pages"
book_paper_type : "Book Paper Type" book_paper_type : "Book Paper Type"
frontend:
writing_books: "Book Frontend"
create_success : "Successfully Create" create_success : "Successfully Create"
update_success : "Successfully Update" update_success : "Successfully Update"

View File

@ -32,6 +32,8 @@ zh_tw:
book_paper_type : "專書類別" book_paper_type : "專書類別"
publish_date : "出版日期" publish_date : "出版日期"
editor : "主編" editor : "主編"
frontend:
writing_books: "專書前台"
create_success : "新增完成!!" create_success : "新增完成!!"
update_success : "更新完成!!" update_success : "更新完成!!"

View File

@ -8,7 +8,7 @@ class Panel::PersonalConference::FrontEnd::WritingConferencesController < OrbitW
def index def index
@writing_conferences = WritingConference.desc(:year).page(params[:page]).per(10) @writing_conferences = WritingConference.where(:is_hidden => false).desc(:year,:period_start_date).page(params[:page]).per(10)
end end

View File

@ -84,9 +84,15 @@ class WritingConference
end end
def create_link def create_link
title = ["#{self.paper_title}"] title = []
title << self.authors if self.authors.present?
pd = self.publication_date.strftime("%Y-%m-%d").split('-')
title << pd[0]
title << self.paper_title if self.paper_title.present?
title << self.conference_title if self.conference_title.present? title << self.conference_title if self.conference_title.present?
title << self.sponsor if self.sponsor.present?
title << self.location if self.location.present? title << self.location if self.location.present?
title << "#{period_start_date}-#{period_end_date}" if (self.period_start_date.present? && self.period_end_date.present?) title << "#{period_start_date}-#{period_end_date}" if (self.period_start_date.present? && self.period_end_date.present?)
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})" # title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"

View File

@ -103,10 +103,9 @@
</div> </div>
</div> </div>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp; <!-- <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp;
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; -->
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 新增</a>&nbsp; <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path, :class => 'btn btn-primary pull-right' %>
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 設定</a> 
</div> </div>

View File

@ -1,7 +1,7 @@
<% <%
if @member if @member
@writing_conferences = WritingConference.where(is_hidden: false, :create_user_id => @member.id).desc(:year) @writing_conferences = WritingConference.where(is_hidden: false, :create_user_id => @member.id).desc(:year,:period_start_date)
@writing_conference_intro = !PersonalConferenceIntro.where(:user_id => @member.id).blank? ? PersonalConferenceIntro.where(:user_id => @member.id).first : PersonalConferenceIntro.new @writing_conference_intro = !PersonalConferenceIntro.where(:user_id => @member.id).blank? ? PersonalConferenceIntro.where(:user_id => @member.id).first : PersonalConferenceIntro.new
%> %>
@ -35,7 +35,7 @@
<td> <td>
<%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %> <%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
</td> </td>
<td><%= writing_conference.authors %></td> <td><%= User.find(writing_conference.create_user_id).name rescue '' %></td>
</tr> </tr>
<% end %> <% end %>

View File

@ -2,25 +2,31 @@
<%= flash_messages %> <%= flash_messages %>
<h1><%= t('writing_conference.list_writing_conference') %></h1> <h1><%= t('module_name.personal_conference') %></h1>
<table class="table">
<thead>
<tr>
<th class="grid1"><%= t('personal_conference.year') %></th>
<th class="grid8"><%= t('module_name.personal_conference') %></th>
<th class="grid3"><%= t('personal_conference.authors') %></th>
</tr>
</thead>
<tbody>
<table> <% @writing_conferences.each do |writing_conference| %>
<tr>
<th><%= t(:year) %></th>
<th><%= t(:title) %></th>
</tr>
<% @writing_conferences.each do |post| %> <tr>
<tr> <td><%= writing_conference.year %></td>
<td><%= post.year %></td>
<td> <td>
<%= link_to post.create_link , panel_personal_conference_front_end_writing_conference_path(post) %> <%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
</td> </td>
</tr> <td><%= User.find(writing_conference.create_user_id).name rescue '' %></td>
</tr>
<% end %> <% end %>
</table> </tbody>
</table>
<%= paginate @writing_conferences, :params => {:inner => false}%> <%= paginate @writing_conferences, :params => {:inner => false}%>

View File

@ -1,36 +1,75 @@
<% # encoding: utf-8 %> <% # encoding: utf-8 %>
<table> <table>
<caption> <%= t("writing_conference") %> </caption> <caption> <%= t("module_name.personal_conference") %> </caption>
<tbody> <tbody>
<tr><th><%= t("writing_conference.year")%></th><td><%= @writing_conference.year %></td></tr> <% if !@writing_conference.year.blank? %>
<tr><th><%= t("writing_conference.language")%></th><td><%= @writing_conference.language %></td></tr> <tr><th><%= t("personal_conference.year")%></th><td><%= @writing_conference.year %></td></tr>
<tr><th><%= t("writing_conference.paper_title")%></th><td><%= @writing_conference.paper_title %></td></tr> <% end %>
<tr><th><%= t("writing_conference.conference_title")%></th><td><%= @writing_conference.conference_title %></td></tr>
<tr><th><%= t("writing_conference.conference_paper_types")%></th><td><%= @conference_paper_types %></td></tr> <% if !@writing_conference.language.blank? %>
<tr><th><%= t("writing_conference.conference_author_types")%></th><td><%= @conference_author_types %></td></tr> <tr><th><%= t("personal_conference.language")%></th><td><%= @writing_conference.language %></td></tr>
<tr><th><%= t("writing_conference.location")%></th><td><%= @writing_conference.location %></td></tr> <% end %>
<tr><th><%= t("writing_conference.sponsor")%></th><td><%= @writing_conference.sponsor %></td></tr>
<tr><th><%= t("writing_conference.period_start_date")%></th><td><%= @writing_conference.period_start_date %></td></tr> <% if !@writing_conference.paper_title.blank? %>
<tr><th><%= t("writing_conference.period_end_date")%></th><td><%= @writing_conference.period_end_date %></td></tr> <tr><th><%= t("personal_conference.paper_title")%></th><td><%= @writing_conference.paper_title %></td></tr>
<tr><th><%= t("writing_conference.abstract")%></th><td><%= @writing_conference.abstract %></td></tr> <% end %>
<tr><th><%= t("writing_conference.publication_date")%></th><td><%= @writing_conference.publication_date %></td></tr>
<tr><th><%= t("writing_conference.url")%></th><td><%= link_to t(:url), @writing_conference.url, {:target => '_blank', :title => @writing_conference.conference_title} if !@writing_conference.url.blank? %></td></tr> <% if !@writing_conference.conference_title.blank? %>
<tr><th><%= t("writing_conference.note")%></th><td><%= @writing_conference.note %></td></tr> <tr><th><%= t("personal_conference.conference_title")%></th><td><%= @writing_conference.conference_title %></td></tr>
<tr><th><%= t("writing_conference.authors")%></th><td><%= "#{User.from_id(@writing_conference.create_user_id).name rescue ''},#{@writing_conference.authors rescue ''}"%></td></tr> <% end %>
<tr><th><%= t("writing_conference.files")%></th>
<td> <% if !@conference_paper_types.blank? %>
<% if @writing_conference.writing_conference_files.size > 0 %> <tr><th><%= t("personal_conference.paper_type")%></th><td><%= @conference_paper_types %></td></tr>
<div> <% end %>
<i class="icons-paperclip"></i>
<div class="showFile"> <% if !@conference_author_types.blank? %>
<tr><th><%= t("personal_conference.author_type")%></th><td><%= @conference_author_types %></td></tr>
<% end %>
<% if !@writing_conference.location.blank? %>
<tr><th><%= t("personal_conference.location")%></th><td><%= @writing_conference.location %></td></tr>
<% end %>
<% if !@writing_conference.sponsor.blank? %>
<tr><th><%= t("personal_conference.sponsor")%></th><td><%= @writing_conference.sponsor %></td></tr>
<% end %>
<% if !@writing_conference.period_start_date.blank? %>
<tr><th><%= t("personal_conference.period_start_date")%></th><td><%= @writing_conference.period_start_date %></td></tr>
<% end %>
<% if !@writing_conference.period_end_date.blank? %>
<tr><th><%= t("personal_conference.period_end_date")%></th><td><%= @writing_conference.period_end_date %></td></tr>
<% end %>
<% if !@writing_conference.abstract.blank? %>
<tr><th><%= t("personal_conference.abstract")%></th><td><%= @writing_conference.abstract %></td></tr>
<% end %>
<% if !@writing_conference.publication_date.blank? %>
<tr><th><%= t("personal_conference.publication_date")%></th><td><%= @writing_conference.publication_date %></td></tr>
<% end %>
<% if !@writing_conference.url.blank? %>
<tr><th><%= t("personal_conference.url")%></th><td><%= link_to t(:url), @writing_conference.url, {:target => '_blank', :title => @writing_conference.url} if !@writing_conference.url.blank? %></td></tr>
<% end %>
<tr><th><%= t("personal_conference.authors")%></th><td><%= "#{User.from_id(@writing_conference.create_user_id).name rescue ''},#{@personal_conference.authors rescue ''}"%></td></tr>
<% if @writing_conference.writing_conference_files.size > 0 %>
<tr><th><%= t("personal_conference.file")%></th>
<td>
<div>
<div class="showFile">
<i class="icons-paperclip"></i>
<% @writing_conference.writing_conference_files.each do | wsfile | %> <% @writing_conference.writing_conference_files.each do | wsfile | %>
<%= link_to wsfile.title, wsfile.file.url, {:target => '_blank', :title => wsfile.title} if wsfile.file.file %> <%= link_to !wsfile.title.blank? ? wsfile.title : 'file', wsfile.file.url, {:target => '_blank', :title => wsfile.title} if wsfile.file.file %>
<% end %> <% end %>
</div>
</div> </div>
</div> </td>
<% end %> </tr>
</td> <% end %>
</tr> </tbody>
</tbody>
</table> </table>

View File

@ -30,6 +30,8 @@ en:
file : "File" file : "File"
file_name : "File Name" file_name : "File Name"
description : "File Description" description : "File Description"
frontend:
writing_conferences: "Conference Paper Frontend"
create_success : "Successfully Create" create_success : "Successfully Create"
update_success : "Successfully Update" update_success : "Successfully Update"

View File

@ -12,7 +12,7 @@ zh_tw:
period_start_date : "起" period_start_date : "起"
period_end_date : "訖" period_end_date : "訖"
location : "地點" location : "地點"
sponsor : "贊助" sponsor : "主辦單位"
authors : "作者" authors : "作者"
tags : "領域" tags : "領域"
keywords : "關鍵字" keywords : "關鍵字"
@ -29,6 +29,8 @@ zh_tw:
file : "檔案" file : "檔案"
file_name : "檔案名稱" file_name : "檔案名稱"
description : "描述" description : "描述"
frontend:
writing_conferences: "研討會論文前台"
create_success : "新增完成!!" create_success : "新增完成!!"
update_success : "更新完成!!" update_success : "更新完成!!"

View File

@ -0,0 +1,17 @@
class Panel::PersonalDiploma::FrontEnd::DiplomasController < OrbitWidgetController
def initialize
super
@app_title = 'personal_diploma'
end
def index
end
def show
@diploma = Diploma.find(params[:id])
end
end

View File

@ -1,7 +1,7 @@
<tr id="<%= dom_id diploma %>" class="with_action"> <tr id="<%= dom_id diploma %>" class="with_action">
<td class="span1"><%= diploma.start_date.strftime("%Y.%m") %> ~ <%= diploma.end_date.strftime("%Y.%m") %></td> <td class="span1"><%= diploma.start_date.strftime("%Y.%m") %> ~ <%= diploma.end_date.strftime("%Y.%m") %></td>
<td class="span1"> <td class="span1">
<%= diploma.school_name %> <%= link_to diploma.school_name, panel_personal_diploma_front_end_diploma_path(diploma) %>
<div class="quick-edit"> <div class="quick-edit">
<ul class="nav nav-pills hide"> <ul class="nav nav-pills hide">
<%if at_least_module_manager || diploma.diploma_category.cur_user_is_sub_manager_of(:edit)%> <%if at_least_module_manager || diploma.diploma_category.cur_user_is_sub_manager_of(:edit)%>

View File

@ -47,10 +47,9 @@
</div> </div>
</div> </div>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp; <!-- <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp;
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; -->
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 新增</a>&nbsp; <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_diploma_back_end_diploma_path, :class => 'btn btn-primary pull-right' %>&nbsp;
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 設定</a> 
</div> </div>
<div style="display:none;" class="modal" id="myModal4" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div style="display:none;" class="modal" id="myModal4" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

View File

@ -21,8 +21,11 @@
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th class="grid2"><%= t('personal_diploma.school_name') %></th>
<th class="grid2"><%= t('personal_diploma.country') %></th>
<th class="grid1"><%= t('personal_diploma.department') %></th>
<th class="grid1"><%= t('personal_diploma.degree') %></th>
<th class="grid3"><%= t('date_') %></th> <th class="grid3"><%= t('date_') %></th>
<th class="grid9"><%= t('personal_diploma.school_name') %></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -30,10 +33,13 @@
<% @diplomas.each do |diploma| %> <% @diplomas.each do |diploma| %>
<tr> <tr>
<td>
<%= link_to diploma.school_name, panel_personal_diploma_front_end_diploma_path(diploma) %>
</td>
<td><%= diploma.country %></td>
<td><%= diploma.department %></td>
<td><%= diploma.degree %></td>
<td><%= diploma.start_date.strftime("%Y.%m") %> ~ <%= diploma.end_date.strftime("%Y.%m") %></td> <td><%= diploma.start_date.strftime("%Y.%m") %> ~ <%= diploma.end_date.strftime("%Y.%m") %></td>
<td>
<%= link_to diploma.school_name, panel_personal_diploma_front_end_diploma_path(diploma) %>
</td>
</tr> </tr>
<% end %> <% end %>

View File

@ -0,0 +1,45 @@
<% # encoding: utf-8 %>
<table>
<caption> <%= t("module_name.personal_diploma") %> </caption>
<tbody>
<% if !@diploma.year.blank? %>
<tr><th><%= t("personal_diploma.school_name")%></th><td><%= @diploma.year %></td></tr>
<% end %>
<% if !@diploma.language.blank? %>
<tr><th><%= t("personal_diploma.language")%></th><td><%= @diploma.language %></td></tr>
<% end %>
<% if !@diploma.school_name.blank? %>
<tr><th><%= t("personal_diploma.school_name")%></th><td><%= @diploma.school_name %></td></tr>
<% end %>
<% if !@diploma.country.blank? %>
<tr><th><%= t("personal_diploma.country")%></th><td><%= @diploma.country %></td></tr>
<% end %>
<% if !@diploma.department.blank? %>
<tr><th><%= t("personal_diploma.department")%></th><td><%= @diploma.department %></td></tr>
<% end %>
<% if !@diploma.degree.blank? %>
<tr><th><%= t("personal_diploma.degree")%></th><td><%= @diploma.degree %></td></tr>
<% end %>
<% if !@diploma.start_date.blank? %>
<tr><th><%= t("personal_diploma.start_date")%></th><td><%= @diploma.start_date %></td></tr>
<% end %>
<% if !@diploma.end_date.blank? %>
<tr><th><%= t("personal_diploma.end_date")%></th><td><%= @diploma.end_date %></td></tr>
<% end %>
<% if !@diploma.language.blank? %>
<tr><th><%= t("personal_diploma.url")%></th><td><%= link_to t(:url), @diploma.url, {:target => '_blank', :title => @diploma.url} if !@diploma.url.blank? %></td></tr>
<% end %>
<tr><th><%= t("personal_diploma.authors")%></th><td><%= User.from_id(@diploma.create_user_id).name rescue '' %></td></tr>
</tbody>
</table>

View File

@ -34,6 +34,8 @@ en:
country : "Country" country : "Country"
department : "Department" department : "Department"
degree : "Degree" degree : "Degree"
frontend:
diplomas: "Diploma Frontend"
create_success : "Successfully Create" create_success : "Successfully Create"
update_success : "Successfully Update" update_success : "Successfully Update"

View File

@ -35,6 +35,8 @@ zh_tw:
country : "國家" country : "國家"
department : "系所" department : "系所"
degree : "學位" degree : "學位"
frontend:
diplomas: "學歷前台"
create_success : "新增完成!!" create_success : "新增完成!!"
update_success : "更新完成!!" update_success : "更新完成!!"

View File

@ -13,11 +13,11 @@ module PersonalDiploma
intro "I am intro" intro "I am intro"
update_info 'some update_info' update_info 'some update_info'
# front_end do front_end do
# app_page 'diplomas' do app_page 'diplomas' do
# frontend_i18n "personal_diploma.frontend.diplomas" frontend_i18n "personal_diploma.frontend.diplomas"
# end end
# end end
end end
end end

View File

@ -0,0 +1,17 @@
class Panel::PersonalExperience::FrontEnd::ExperiencesController < OrbitWidgetController
def initialize
super
@app_title = 'personal_experience'
end
def index
end
def show
@experience = Experience.find(params[:id])
end
end

View File

@ -1,7 +1,7 @@
<tr id="<%= dom_id experience %>" class="with_action"> <tr id="<%= dom_id experience %>" class="with_action">
<td class="span1"><%= experience.start_date.strftime("%Y.%m") %> ~ <%= experience.end_date.strftime("%Y.%m") %></td> <td class="span1"><%= experience.start_date.strftime("%Y.%m") %> ~ <%= experience.end_date.strftime("%Y.%m") %></td>
<td class="span1"> <td class="span1">
<%= experience.organizationt_title %> <%= link_to experience.organizationt_title, panel_personal_experience_front_end_experience_path(experience) %>
<div class="quick-edit"> <div class="quick-edit">
<ul class="nav nav-pills hide"> <ul class="nav nav-pills hide">
<%if at_least_module_manager || experience.experience_category.cur_user_is_sub_manager_of(:edit)%> <%if at_least_module_manager || experience.experience_category.cur_user_is_sub_manager_of(:edit)%>

View File

@ -167,7 +167,7 @@
<label class="control-label muted"><%= t("personal_experience.organizationt_title") %></label> <label class="control-label muted"><%= t("personal_experience.organizationt_title") %></label>
<div class="controls"> <div class="controls">
<%= f.fields_for :organizationt_title_translations do |f| %> <%= f.fields_for :organizationt_title_translations do |f| %>
<%= f.text_field locale, class: "input-block-level", placeholder: t("personal_experience.organizationt_title"), value: (@experience.school_name_translations[locale] rescue nil) %> <%= f.text_field locale, class: "input-block-level", placeholder: t("personal_experience.organizationt_title"), value: (@experience.organizationt_title_translations[locale] rescue nil) %>
<% end %> <% end %>
</div> </div>
</div> </div>

View File

@ -77,10 +77,9 @@
</div> </div>
</div> </div>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp; <!-- <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp;
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; -->
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 新增</a>&nbsp; <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_experience_back_end_experience_path, :class => 'btn btn-primary pull-right' %>
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 設定</a> 
</div> </div>
<div id="paper_type_qe"> <div id="paper_type_qe">

View File

@ -21,8 +21,9 @@
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th class="grid3"><%= t('personal_experience.organizationt_title') %></th>
<th class="grid2"><%= t('personal_experience.job_title') %></th>
<th class="grid3"><%= t('date_') %></th> <th class="grid3"><%= t('date_') %></th>
<th class="grid9"><%= t('personal_experience.organizationt_title') %></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -30,10 +31,11 @@
<% @experiences.each do |experience| %> <% @experiences.each do |experience| %>
<tr> <tr>
<td>
<%= link_to experience.organizationt_title, panel_personal_experience_front_end_experience_path(experience) %>
</td>
<td><%= experience.job_title %></td>
<td><%= experience.start_date.strftime("%Y.%m") %> ~ <%= experience.end_date.strftime("%Y.%m") %></td> <td><%= experience.start_date.strftime("%Y.%m") %> ~ <%= experience.end_date.strftime("%Y.%m") %></td>
<td>
<%= link_to experience.organizationt_title, panel_personal_experience_front_end_experience_path(experience) %>
</td>
</tr> </tr>
<% end %> <% end %>

View File

@ -0,0 +1,42 @@
<% # encoding: utf-8 %>
<table>
<caption> <%= t("module_name.personal_experience") %> </caption>
<tbody>
<% if !@experience.experience_category.blank? %>
<tr><th><%= t("personal_experience.experience_category")%></th><td><%= @experience.experience_category.title %></td></tr>
<% end %>
<% if !@experience.language.blank? %>
<tr><th><%= t("personal_experience.language")%></th><td><%= @experience.language %></td></tr>
<% end %>
<% if !@experience.organizationt_title.blank? %>
<tr><th><%= t("personal_experience.organizationt_title")%></th><td><%= @experience.organizationt_title %></td></tr>
<% end %>
<% if !@experience.department.blank? %>
<tr><th><%= t("personal_experience.department")%></th><td><%= @experience.department %></td></tr>
<% end %>
<% if !@experience.job_title.blank? %>
<tr><th><%= t("personal_experience.job_title")%></th><td><%= @experience.job_title %></td></tr>
<% end %>
<% if !@experience.start_date.blank? %>
<tr><th><%= t("personal_experience.start_date")%></th><td><%= @experience.start_date %></td></tr>
<% end %>
<% if !@experience.end_date.blank? %>
<tr><th><%= t("personal_experience.end_date")%></th><td><%= @experience.end_date %></td></tr>
<% end %>
<% if !@experience.language.blank? %>
<tr><th><%= t("personal_experience.url")%></th><td><%= link_to t(:url), @experience.url, {:target => '_blank', :title => @experience.url} if !@experience.url.blank? %></td></tr>
<% end %>
<tr><th><%= t("personal_experience.authors")%></th><td><%= User.from_id(@experience.create_user_id).name rescue '' %></td></tr>
</tbody>
</table>

View File

@ -34,6 +34,8 @@ en:
description : "File Description" description : "File Description"
pages : "Pages" pages : "Pages"
book_paper_type : "Book Paper Type" book_paper_type : "Book Paper Type"
frontend:
experiences: "Experience Frontend"
create_success : "Successfully Create" create_success : "Successfully Create"
update_success : "Successfully Update" update_success : "Successfully Update"

View File

@ -32,6 +32,8 @@ zh_tw:
file : "檔案" file : "檔案"
file_name : "檔案名稱" file_name : "檔案名稱"
description : "描述" description : "描述"
frontend:
experiences: "經歷前台"
create_success : "新增完成!!" create_success : "新增完成!!"
update_success : "更新完成!!" update_success : "更新完成!!"

View File

@ -14,11 +14,11 @@ module PersonalExperience
intro "I am intro" intro "I am intro"
update_info 'some update_info' update_info 'some update_info'
# front_end do front_end do
# app_page 'experiences' do app_page 'experiences' do
# frontend_i18n "personal_experience.frontend.experiences" frontend_i18n "personal_experience.frontend.experiences"
# end end
# end end
end end

View File

@ -8,7 +8,7 @@ class Panel::PersonalHonor::FrontEnd::HonorsController < OrbitWidgetController
def index def index
@honors = Honor.desc(:year).page(params[:page]).per(10) @honors = Honor.where(:is_hidden => false).desc(:year).page(params[:page]).per(10)
end end

View File

@ -77,10 +77,9 @@
</div> </div>
</div> </div>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp; <!-- <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp;
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; -->
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 新增</a>&nbsp; <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_honor_back_end_honor_path, :class => 'btn btn-primary pull-right' %>
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 設定</a> 
</div> </div>
<div id="paper_type_qe"> <div id="paper_type_qe">

View File

@ -22,7 +22,8 @@
<thead> <thead>
<tr> <tr>
<th class="grid1"><%= t('personal_honor.year') %></th> <th class="grid1"><%= t('personal_honor.year') %></th>
<th class="grid10"><%= t('personal_honor.award_name') %></th> <th class="grid5"><%= t('personal_honor.award_name') %></th>
<th class="grid3"><%= t('personal_honor.awarding_unit') %></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -30,10 +31,11 @@
<% @honors.each do |honor| %> <% @honors.each do |honor| %>
<tr> <tr>
<td><%= honor.year %></td> <td><%= honor.year %></td>
<td> <td>
<%= link_to honor.award_name, panel_personal_honor_front_end_honor_path(honor) %> <%= link_to honor.award_name, panel_personal_honor_front_end_honor_path(honor) %>
</td> </td>
<td><%= honor.awarding_unit %></td>
</tr> </tr>
<% end %> <% end %>

View File

@ -2,26 +2,36 @@
<%= flash_messages %> <%= flash_messages %>
<h1><%= t('honor.list_honor') %></h1> <h1><%= t('module_name.personal_honor') %></h1>
<table class="table">
<table> <thead>
<tr> <tr>
<th><%= t(:year) %></th> <th class="grid1"><%= t('personal_honor.honor_category') %></th>
<th><%= t(:award_name) %></th> <th class="grid1"><%= t('personal_honor.year') %></th>
</tr> <th class="grid5"><%= t('personal_honor.award_name') %></th>
<th class="grid5"><%= t('personal_honor.award_winner') %></th>
<th class="grid3"><%= t('personal_honor.awarding_unit') %></th>
</tr>
</thead>
<tbody>
<% @honors.each do |post| %> <% @honors.each do |honor| %>
<tr>
<td><%= post.year %></td>
<td>
<%= link_to post.award_name , panel_personal_honor_front_end_honor_path(post) %>
</td>
</tr>
<% end %> <tr>
<td><%= honor.honor_category.title %></td>
<td><%= honor.year %></td>
<td>
<%= link_to honor.award_name, panel_personal_honor_front_end_honor_path(honor) %>
</td>
<td><%= User.from_id(honor.create_user_id).name rescue '' %></td>
<td><%= honor.awarding_unit %></td>
</tr>
</table> <% end %>
</tbody>
</table>
<%= paginate @honors, :params => {:inner => false}%> <%= paginate @honors, :params => {:inner => false}%>

View File

@ -1,15 +1,32 @@
<% # encoding: utf-8 %> <% # encoding: utf-8 %>
<table> <table>
<caption> <%= t("honor") %> </caption> <caption> <%= t("module_name.personal_honor") %> </caption>
<tbody> <tbody>
<tr><th><%= t("honor.category")%></th><td><%= @honor.honor_category.title if @honor.honor_category %></td></tr> <% if !@honor.honor_category.blank? %>
<tr><th><%= t("honor.year")%></th><td><%= @honor.year %></td></tr> <tr><th><%= t("personal_honor.honor_category")%></th><td><%= @honor.honor_category.title if @honor.honor_category %></td></tr>
<tr><th><%= t("honor.language")%></th><td><%= @honor.language %></td></tr> <% end %>
<tr><th><%= t("honor.award_name")%></th><td><%= @honor.award_name %></td></tr>
<tr><th><%= t("honor.awarding_unit")%></th><td><%= @honor.awarding_unit %></td></tr> <% if !@honor.year.blank? %>
<tr><th><%= t("honor.url")%></th><td><%= link_to t(:url), @honor.url, {:target => '_blank', :title => @honor.award_name} if !@honor.url.blank? %></td></tr> <tr><th><%= t("personal_honor.year")%></th><td><%= @honor.year %></td></tr>
<tr><th><%= t("honor.note")%></th><td><%= @honor.note %></td></tr> <% end %>
<tr><th><%= t("honor.authors")%></th><td><%= User.from_id(@honor.create_user_id).name rescue '' %></td></tr>
</tbody> <% if !@honor.language.blank? %>
<tr><th><%= t("personal_honor.language")%></th><td><%= @honor.language %></td></tr>
<% end %>
<% if !@honor.award_name.blank? %>
<tr><th><%= t("personal_honor.award_name")%></th><td><%= @honor.award_name %></td></tr>
<% end %>
<% if !@honor.awarding_unit.blank? %>
<tr><th><%= t("personal_honor.awarding_unit")%></th><td><%= @honor.awarding_unit %></td></tr>
<% end %>
<% if !@honor.url.blank? %>
<tr><th><%= t("personal_honor.url")%></th><td><%= link_to t(:url), @honor.url, {:target => '_blank', :title => @honor.url} if !@honor.url.blank? %></td></tr>
<% end %>
<tr><th><%= t("personal_honor.award_winner")%></th><td><%= User.from_id(@honor.create_user_id).name rescue '' %></td></tr>
</tbody>
</table> </table>

View File

@ -2,6 +2,7 @@ en:
module_name: module_name:
personal_honor: Honor personal_honor: Honor
personal_honor: personal_honor:
award_winner : "Award winner"
paper_title : "Paper Title" paper_title : "Paper Title"
book_title : "Book Title" book_title : "Book Title"
award_name : "Award Name" award_name : "Award Name"
@ -33,6 +34,8 @@ en:
description : "File Description" description : "File Description"
pages : "Pages" pages : "Pages"
book_paper_type : "Book Paper Type" book_paper_type : "Book Paper Type"
frontend:
honors: "Honor Frontend"
create_success : "Successfully Create" create_success : "Successfully Create"
update_success : "Successfully Update" update_success : "Successfully Update"

View File

@ -2,6 +2,7 @@ zh_tw:
module_name: module_name:
personal_honor: 榮譽 personal_honor: 榮譽
personal_honor: personal_honor:
award_winner : "得獎人"
paper_title : "論文名稱" paper_title : "論文名稱"
book_title : "期刊名稱" book_title : "期刊名稱"
award_name : "獎項名稱" award_name : "獎項名稱"
@ -29,6 +30,8 @@ zh_tw:
file : "檔案" file : "檔案"
file_name : "檔案名稱" file_name : "檔案名稱"
description : "描述" description : "描述"
frontend:
honors: "榮譽前台"
create_success : "新增完成!!" create_success : "新增完成!!"
update_success : "更新完成!!" update_success : "更新完成!!"

View File

@ -8,7 +8,7 @@ class Panel::PersonalJournal::FrontEnd::WritingJournalsController < OrbitWidgetC
def index def index
@writing_journals = WritingJournal.desc(:year).page(params[:page]).per(10) @writing_journals = WritingJournal.where(:is_hidden => false).desc(:year, :publication_date).page(params[:page]).per(10)
end end

View File

@ -90,12 +90,19 @@ class WritingJournal
end end
def create_link def create_link
title = ["#{self.paper_title}"] title = []
title << self.authors if self.authors.present?
pd = self.publication_date.strftime("%Y-%m-%d").split('-')
title << pd[0]
title << self.paper_title if self.paper_title.present?
title << self.journal_title if self.journal_title.present? title << self.journal_title if self.journal_title.present?
title << self.vol_no if (self.vol_no.present? && self.vol_no != "0")
title << self.issue_no if (self.issue_no.present? && self.issue_no != "0")
title << "pp"+self.form_to_start+"-"+self.form_to_end if (self.form_to_start.present? && self.form_to_start != "0")
title << ( !self.journal_level_types.blank? ? "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" : nil) title << ( !self.journal_level_types.blank? ? "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" : nil)
title << "Volume No: "+self.vol_no if (self.vol_no.present? && self.vol_no != "0")
title << "From Page: "+self.form_to_start if (self.form_to_start.present? && self.form_to_start != "0")
title << "To Page: "+self.form_to_end if (self.form_to_end.present? && self.form_to_end != "0")
title.join(', ') title.join(', ')
end end

View File

@ -128,10 +128,9 @@
</div> </div>
</div> </div>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp; <!-- <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp;
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; -->
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 新增</a>&nbsp; <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_journal_back_end_writing_journal_path, :class => 'btn btn-primary pull-right' %>
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 設定</a> 
</div> </div>

View File

@ -1,7 +1,7 @@
<% <%
if @member if @member
@writing_journals = WritingJournal.where(is_hidden: false, :create_user_id => @member.id).desc(:year) @writing_journals = WritingJournal.where(is_hidden: false, :create_user_id => @member.id).desc(:year, :publication_date)
@writing_journal_intro = !PersonalJournalIntro.where(:user_id => @member.id).blank? ? PersonalJournalIntro.where(:user_id => @member.id).first : PersonalJournalIntro.new @writing_journal_intro = !PersonalJournalIntro.where(:user_id => @member.id).blank? ? PersonalJournalIntro.where(:user_id => @member.id).first : PersonalJournalIntro.new
%> %>
@ -35,7 +35,7 @@
<td> <td>
<%= link_to writing_journal.create_link, panel_personal_journal_front_end_writing_journal_path(writing_journal) %> <%= link_to writing_journal.create_link, panel_personal_journal_front_end_writing_journal_path(writing_journal) %>
</td> </td>
<td><%= writing_journal.authors %></td> <td><%= User.find(writing_journal.create_user_id).name rescue '' %></td>
</tr> </tr>
<% end %> <% end %>

View File

@ -2,26 +2,33 @@
<%= flash_messages %> <%= flash_messages %>
<h1><%= t('writing_journal.list_writing_journal') %></h1> <h1><%= t('module_name.personal_journal') %></h1>
<table> <table class="table">
<tr> <thead>
<th><%= t(:year) %></th> <tr>
<th><%= t(:title) %></th> <th class="grid1"><%= t('personal_journal.year') %></th>
</tr> <th class="grid8"><%= t('module_name.personal_journal') %></th>
<th class="grid3"><%= t('personal_journal.authors') %></th>
</tr>
</thead>
<tbody>
<% @writing_journals.each do |post| %> <% @writing_journals.each do |writing_journal| %>
<tr>
<td><%= post.year %></td> <tr>
<td><%= writing_journal.year %></td>
<td> <td>
<%= link_to post.create_link , panel_personal_journal_front_end_writing_journal_path(post) %> <%= link_to writing_journal.create_link, panel_personal_journal_front_end_writing_journal_path(writing_journal) %>
</td> </td>
</tr> <td><%= User.find(writing_journal.create_user_id).name rescue '' %></td>
</tr>
<% end %> <% end %>
</table> </tbody>
</table>
<%= paginate @writing_journals, :params => {:inner => false}%> <%= paginate @writing_journals, :params => {:inner => false}%>

View File

@ -1,38 +1,84 @@
<% # encoding: utf-8 %> <% # encoding: utf-8 %>
<table> <table>
<caption> <%= t("writing_journal") %> </caption> <caption> <%= t("module_name.personal_journal") %> </caption>
<tbody> <tbody>
<tr><th><%= t("writing_journal.year")%></th><td><%= @writing_journal.year %></td></tr> <% if !@writing_journal.year.blank? %>
<tr><th><%= t("writing_journal.language")%></th><td><%= @writing_journal.language %></td></tr> <tr><th><%= t("personal_journal.year")%></th><td><%= @writing_journal.year %></td></tr>
<tr><th><%= t("writing_journal.paper_title")%></th><td><%= @writing_journal.paper_title %></td></tr> <% end %>
<tr><th><%= t("writing_journal.journal_title")%></th><td><%= @writing_journal.journal_title %></td></tr>
<tr><th><%= t("writing_journal.journal_paper_type")%></th><td><%= @writing_journal.journal_paper_type.title if @writing_journal.journal_paper_type %></td></tr> <% if !@writing_journal.language.blank? %>
<tr><th><%= t("writing_journal.journal_level_types")%></th><td><%= @journal_level_types %></td></tr> <tr><th><%= t("personal_journal.language")%></th><td><%= @writing_journal.language %></td></tr>
<tr><th><%= t("writing_journal.journal_author_types")%></th><td><%= @journal_author_types %></td></tr> <% end %>
<tr><th><%= t("writing_journal.isbn")%></th><td><%= @writing_journal.isbn %></td></tr>
<tr><th><%= t("writing_journal.vol_no")%></th><td><%= @writing_journal.vol_no %></td></tr> <% if !@writing_journal.paper_title.blank? %>
<tr><th><%= t("writing_journal.issue_no")%></th><td><%= @writing_journal.issue_no %></td></tr> <tr><th><%= t("personal_journal.paper_title")%></th><td><%= @writing_journal.paper_title %></td></tr>
<tr><th><%= t("writing_journal.form_to")%></th><td><%= "#{@writing_journal.form_to_start} ~ #{@writing_journal.form_to_end}" %></td></tr> <% end %>
<tr><th><%= t("writing_journal.total_pages")%></th><td><%= @writing_journal.total_pages %></td></tr>
<tr><th><%= t("writing_journal.abstract")%></th><td><%= @writing_journal.abstract %></td></tr> <% if !@writing_journal.journal_title.blank? %>
<tr><th><%= t("writing_journal.publication_date")%></th><td><%= @writing_journal.publication_date %></td></tr> <tr><th><%= t("personal_journal.journal_title")%></th><td><%= @writing_journal.journal_title %></td></tr>
<tr><th><%= t("writing_journal.url")%></th><td><%= link_to t(:url), @writing_journal.url, {:target => '_blank', :title => @writing_journal.journal_title} if !@writing_journal.url.blank? %></td></tr> <% end %>
<tr><th><%= t("writing_journal.note")%></th><td><%= @writing_journal.note %></td></tr>
<tr><th><%= t("writing_journal.authors")%></th><td><%= "#{User.from_id(@writing_journal.create_user_id).name rescue ''},#{@writing_journal.authors rescue ''}"%></td></tr> <% if !@writing_journal.journal_paper_type.blank? %>
<tr><th><%= t("writing_journal.files")%></th> <tr><th><%= t("personal_journal.paper_type")%></th><td><%= @writing_journal.journal_paper_type.title if @writing_journal.journal_paper_type %></td></tr>
<td> <% end %>
<% if @writing_journal.writing_journal_files.size > 0 %>
<div> <% if !@journal_level_types.blank? %>
<i class="icons-paperclip"></i> <tr><th><%= t("personal_journal.level_type")%></th><td><%= @journal_level_types %></td></tr>
<div class="showFile"> <% end %>
<% if !@journal_author_types.blank? %>
<tr><th><%= t("personal_journal.author_type")%></th><td><%= @journal_author_types %></td></tr>
<% end %>
<% if !@writing_journal.isbn.blank? %>
<tr><th><%= t("personal_journal.isbn")%></th><td><%= @writing_journal.isbn %></td></tr>
<% end %>
<% if !@writing_journal.vol_no.blank? %>
<tr><th><%= t("personal_journal.vol_no")%></th><td><%= @writing_journal.vol_no %></td></tr>
<% end %>
<% if !@writing_journal.issue_no.blank? %>
<tr><th><%= t("personal_journal.issue_no")%></th><td><%= @writing_journal.issue_no %></td></tr>
<% end %>
<% if !@writing_journal.form_to_start.blank? %>
<tr><th><%= t("personal_journal.form_to")%></th><td><%= "#{@writing_journal.form_to_start} ~ #{@writing_journal.form_to_end}" %></td></tr>
<% end %>
<% if !@writing_journal.total_pages.blank? %>
<tr><th><%= t("personal_journal.total_pages")%></th><td><%= @writing_journal.total_pages %></td></tr>
<% end %>
<% if !@writing_journal.abstract.blank? %>
<tr><th><%= t("personal_journal.abstract")%></th><td><%= @writing_journal.abstract %></td></tr>
<% end %>
<% if !@writing_journal.publication_date.blank? %>
<tr><th><%= t("personal_journal.publication_date")%></th><td><%= @writing_journal.publication_date %></td></tr>
<% end %>
<% if !@writing_journal.url.blank? %>
<tr><th><%= t("personal_journal.url")%></th><td><%= link_to t(:url), @writing_journal.url, {:target => '_blank', :title => @writing_journal.url} if !@writing_journal.url.blank? %></td></tr>
<% end %>
<tr><th><%= t("personal_journal.authors")%></th><td><%= "#{User.from_id(@writing_journal.create_user_id).name rescue ''},#{@writing_journal.authors rescue ''}"%></td></tr>
<% if @writing_journal.writing_journal_files.size > 0 %>
<tr><th><%= t("personal_journal.file")%></th>
<td>
<div>
<div class="showFile">
<i class="icons-paperclip"></i>
<% @writing_journal.writing_journal_files.each do | wjfile | %> <% @writing_journal.writing_journal_files.each do | wjfile | %>
<%= link_to wjfile.title, wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %> <%= link_to !wjfile.title.blank? ? wjfile.title : 'file', wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %>
<% end %> <% end %>
</div>
</div> </div>
</div> </td>
<% end %> </tr>
</td> <% end %>
</tr>
</tbody> </tbody>
</table> </table>

View File

@ -26,6 +26,8 @@ en:
file : "File" file : "File"
file_name : "File name" file_name : "File name"
description : "File Description" description : "File Description"
frontend:
writing_journals: "Journal Paper Frontend"
create_success : "Successfully Create" create_success : "Successfully Create"
update_success : "Successfully Update" update_success : "Successfully Update"

View File

@ -19,13 +19,15 @@ zh_tw:
publication_date : "發表日期" publication_date : "發表日期"
url : "參考連結" url : "參考連結"
note : "記事" note : "記事"
level_type : "期刊類別" level_type : "期刊等級"
author_type : "作者類別" author_type : "作者類別"
from : "起" from : "起"
to : "訖" to : "訖"
file : "檔案" file : "檔案"
file_name : "檔案名稱" file_name : "檔案名稱"
description : "描述" description : "描述"
frontend:
writing_journals: "期刊論文前台"
create_success : "新增完成!!" create_success : "新增完成!!"
update_success : "更新完成!!" update_success : "更新完成!!"

View File

@ -0,0 +1,18 @@
class Panel::PersonalLab::FrontEnd::LabsController < OrbitWidgetController
def initialize
super
@app_title = 'personal_lab'
end
def index
end
def show
@lab = Lab.find(params[:id])
end
end

View File

@ -0,0 +1,63 @@
<% # encoding: utf-8 %>
<table>
<caption> <%= t("module_name.personal_lab") %> </caption>
<tbody>
<% if !@lab.year.blank? %>
<tr><th><%= t("personal_lab.year")%></th><td><%= @lab.year %></td></tr>
<% end %>
<% if !@lab.language.blank? %>
<tr><th><%= t("personal_lab.language")%></th><td><%= @lab.language %></td></tr>
<% end %>
<% if !@lab.lab_title.blank? %>
<tr><th><%= t("personal_lab.lab_title")%></th><td><%= @lab.lab_title %></td></tr>
<% end %>
<% if !@lab.location.blank? %>
<tr><th><%= t("personal_lab.location")%></th><td><%= @lab.location %></td></tr>
<% end %>
<% if !@lab.participating_professor.blank? %>
<tr><th><%= t("personal_lab.participating_professor")%></th><td><%= @lab.participating_professor %></td></tr>
<% end %>
<% if !@lab.participating_student.blank? %>
<tr><th><%= t("personal_lab.participating_student")%></th><td><%= @lab.participating_student %></td></tr>
<% end %>
<% if !@lab.extension_no.blank? %>
<tr><th><%= t("personal_lab.extension_no")%></th><td><%= @lab.extension_no %></td></tr>
<% end %>
<% if !@lab.research_direction.blank? %>
<tr><th><%= t("personal_lab.research_direction")%></th><td><%= @lab.research_direction %></td></tr>
<% end %>
<% if !@lab.facility.blank? %>
<tr><th><%= t("personal_lab.facility")%></th><td><%= @lab.facility %></td></tr>
<% end %>
<% if !@lab.language.blank? %>
<tr><th><%= t("personal_lab.url")%></th><td><%= link_to t(:url), @lab.url, {:target => '_blank', :title => @lab.url} if !@lab.url.blank? %></td></tr>
<% end %>
<tr><th><%= t("personal_lab.authors")%></th><td><%= User.from_id(@lab.create_user_id).name rescue '' %></td></tr>
<% if @lab.lab_files.size > 0 %>
<tr><th><%= t("personal_lab.file")%></th>
<td>
<div>
<div class="showFile">
<i class="icons-paperclip"></i>
<% @lab.lab_files.each do | lfile | %>
<%= link_to lfile.title, lfile.file.url, {:target => '_blank', :title => lfile.title} if lfile.file.file %>
<% end %>
</div>
</div>
</td>
</tr>
<% end %>
</tbody>
</table>

View File

@ -36,6 +36,8 @@ en:
description : "File Description" description : "File Description"
pages : "Pages" pages : "Pages"
book_paper_type : "Book Paper Type" book_paper_type : "Book Paper Type"
frontend:
labs: "Lab Frontend"
create_success : "Successfully Create" create_success : "Successfully Create"
update_success : "Successfully Update" update_success : "Successfully Update"

View File

@ -32,6 +32,8 @@ zh_tw:
file : "檔案" file : "檔案"
file_name : "檔案名稱" file_name : "檔案名稱"
description : "描述" description : "描述"
frontend:
labs: "實驗室前台"
create_success : "新增完成!!" create_success : "新增完成!!"
update_success : "更新完成!!" update_success : "更新完成!!"

View File

@ -5,6 +5,19 @@ module PersonalLab
personal_plugin :enable => true, :sort_number => '30', :app_name=>"Lab", :intro_app_name=>"PersonalLabIntro",:path=>"panel/personal_lab/plugin/profile",:front_path=>"panel/personal_lab/front_end/profile",:admin_path=>"/panel/personal_lab/back_end/labs",:i18n=>'module_name.personal_lab' personal_plugin :enable => true, :sort_number => '30', :app_name=>"Lab", :intro_app_name=>"PersonalLabIntro",:path=>"panel/personal_lab/plugin/profile",:front_path=>"panel/personal_lab/front_end/profile",:admin_path=>"/panel/personal_lab/back_end/labs",:i18n=>'module_name.personal_lab'
version "0.1"
organization "Rulingcom"
author "RD dep"
intro "I am intro"
update_info 'some update_info'
front_end do
app_page 'labs' do
frontend_i18n "personal_lab.frontend.labs"
end
end
end end
end end

View File

@ -8,7 +8,7 @@ class Panel::PersonalPatent::FrontEnd::WritingPatentsController < OrbitWidgetCon
def index def index
@writing_patents = WritingPatent.desc(:year).page(params[:page]).per(10) @writing_patents = WritingPatent.where(:is_hidden=>false).desc(:publish_date).page(params[:page]).per(10)
end end

View File

@ -26,10 +26,12 @@
</tbody> </tbody>
</table> </table>
<div class="form-actions form-fixed pagination-right"> <div class="bottomnav clearfix">
<div class="action pull-right">
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), panel_personal_patent_back_end_writing_patent_setting_path, :class => 'btn btn-primary pull-right' %> <%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), panel_personal_patent_back_end_writing_patent_setting_path, :class => 'btn btn-primary pull-right' %>
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_patent_back_end_writing_patent_path, :class => 'btn btn-primary pull-right' %> <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_patent_back_end_writing_patent_path, :class => 'btn btn-primary pull-right' %>
<div id="lab_pagination" class="paginationFixed"> </div>
<%= paginate @writing_patents, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %> <div class="pagination pagination-centered">
<%= paginate @writing_patents, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
</div> </div>
</div> </div>

View File

@ -77,10 +77,9 @@
</div> </div>
</div> </div>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp; <!-- <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp;
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; -->
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 新增</a>&nbsp; <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_patent_back_end_writing_patent_path, :class => 'btn btn-primary pull-right' %>
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 設定</a> 
</div> </div>
<div id="paper_type_qe"> <div id="paper_type_qe">

View File

@ -2,26 +2,36 @@
<%= flash_messages %> <%= flash_messages %>
<h1><%= t('writing_patent.list_writing_patent') %></h1> <h1><%= t('module_name.personal_patent') %></h1>
<table class="table">
<table> <thead>
<tr> <tr>
<th><%= t(:year) %></th> <th class="grid2"><%= t('personal_patent.year') %></th>
<th><%= t(:title) %></th> <th class="grid2"><%= t('personal_patent.patent_category') %></th>
<th class="grid2"><%= t('personal_patent.publication_date') %></th>
<th class="grid10"><%= t('personal_patent.patent_title') %></th>
<th class="grid10"><%= t('personal_patent.authors') %></th>
</tr> </tr>
</thead>
<tbody>
<% @writing_patents.each do |post| %> <% @writing_patents.each do |writing_patent| %>
<tr>
<td><%= post.year %></td> <tr>
<td><%= writing_patent.year %></td>
<td><%= writing_patent.writing_patent_category.title %></td>
<td> <td>
<%= link_to post.patent_title , panel_personal_patent_front_end_writing_patent_path(post) %> <%= link_to writing_patent.patent_title, panel_personal_patent_front_end_writing_patent_path(writing_patent) %>
</td> </td>
</tr> <td><%= writing_patent.publish_date.strftime("%Y.%m") %></td>
<td><%= "#{User.from_id(writing_patent.create_user_id).name rescue ''},#{writing_patent.authors rescue ''}"%></td>
</tr>
<% end %> <% end %>
</table> </tbody>
</table>
<%= paginate @writing_patents, :params => {:inner => false}%> <%= paginate @writing_patents, :params => {:inner => false}%>

View File

@ -1,31 +1,55 @@
<% # encoding: utf-8 %> <% # encoding: utf-8 %>
<table> <table>
<caption> <%= t("writing_patent") %> </caption> <caption> <%= t("module_name.personal_patent") %> </caption>
<tbody> <tbody>
<tr><th><%= t("writing_patent.year")%></th><td><%= @writing_patent.year %></td></tr> <% if !@writing_patent.year.blank? %>
<tr><th><%= t("writing_patent.language")%></th><td><%= @writing_patent.language %></td></tr> <tr><th><%= t("personal_patent.year")%></th><td><%= @writing_patent.year %></td></tr>
<tr><th><%= t("writing_patent.patent_title")%></th><td><%= @writing_patent.patent_title %></td></tr> <% end %>
<tr><th><%= t("writing_patent.category")%></th><td><%= @writing_patent.writing_patent_category.title if @writing_patent.writing_patent_category %></td></tr>
<tr><th><%= t("writing_patent.patent_no")%></th><td><%= @writing_patent.patent_no %></td></tr> <% if !@writing_patent.language.blank? %>
<tr><th><%= t("writing_patent.patent_country")%></th><td><%= @writing_patent.patent_country %></td></tr> <tr><th><%= t("personal_patent.language")%></th><td><%= @writing_patent.language %></td></tr>
<tr><th><%= t("writing_patent.publish_date")%></th><td><%= @writing_patent.publish_date %></td></tr> <% end %>
<tr><th><%= t("writing_patent.url")%></th><td><%= link_to t(:url), @writing_patent.url, {:target => '_blank', :title => @writing_patent.patent_title} if !@writing_patent.url.blank? %></td></tr>
<tr><th><%= t("writing_patent.note")%></th><td><%= @writing_patent.note %></td></tr> <% if !@writing_patent.patent_title.blank? %>
<tr><th><%= t("writing_patent.authors")%></th><td><%= "#{User.from_id(@writing_patent.create_user_id).name rescue ''},#{@writing_patent.authors rescue ''}"%></td></tr> <tr><th><%= t("personal_patent.patent_title")%></th><td><%= @writing_patent.patent_title %></td></tr>
<tr><th><%= t("writing_patent.files")%></th> <% end %>
<td>
<% if @writing_patent.writing_patent_files.size > 0 %> <% if !@writing_patent.writing_patent_category.blank? %>
<div> <tr><th><%= t("personal_patent.patent_category")%></th><td><%= @writing_patent.writing_patent_category.title if @writing_patent.writing_patent_category %></td></tr>
<i class="icons-paperclip"></i> <% end %>
<div class="showFile">
<% if !@writing_patent.patent_no.blank? %>
<tr><th><%= t("personal_patent.patent_no")%></th><td><%= @writing_patent.patent_no %></td></tr>
<% end %>
<% if !@writing_patent.patent_country.blank? %>
<tr><th><%= t("personal_patent.patent_country")%></th><td><%= @writing_patent.patent_country %></td></tr>
<% end %>
<% if !@writing_patent.publish_date.blank? %>
<tr><th><%= t("personal_patent.publication_date")%></th><td><%= @writing_patent.publish_date %></td></tr>
<% end %>
<% if !@writing_patent.url.blank? %>
<tr><th><%= t("personal_patent.url")%></th><td><%= link_to t(:url), @writing_patent.url, {:target => '_blank', :title => @writing_patent.url} if !@writing_patent.url.blank? %></td></tr>
<% end %>
<tr><th><%= t("personal_patent.authors")%></th><td><%= "#{User.from_id(@writing_patent.create_user_id).name rescue ''},#{@writing_patent.authors rescue ''}"%></td></tr>
<% if @writing_patent.writing_patent_files.size > 0 %>
<tr><th><%= t("personal_patent.file")%></th>
<td>
<div>
<div class="showFile">
<i class="icons-paperclip"></i>
<% @writing_patent.writing_patent_files.each do | wjfile | %> <% @writing_patent.writing_patent_files.each do | wjfile | %>
<%= link_to wjfile.title, wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %> <%= link_to wjfile.title, wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %>
<% end %> <% end %>
</div>
</div> </div>
</div> </td>
<% end %> </tr>
</td> <% end %>
</tr> </tbody>
</tbody>
</table> </table>

View File

@ -33,6 +33,8 @@ en:
description : "File Description" description : "File Description"
pages : "Pages" pages : "Pages"
book_paper_type : "Book Paper Type" book_paper_type : "Book Paper Type"
frontend:
writing_patents: "Patent Frontend"
create_success : "Successfully Create" create_success : "Successfully Create"
update_success : "Successfully Update" update_success : "Successfully Update"

View File

@ -31,6 +31,8 @@ zh_tw:
file : "檔案" file : "檔案"
file_name : "檔案名稱" file_name : "檔案名稱"
description : "描述" description : "描述"
frontend:
writing_patents: "專利前台"
create_success : "新增完成!!" create_success : "新增完成!!"
update_success : "更新完成!!" update_success : "更新完成!!"

View File

@ -8,12 +8,10 @@ class Panel::PersonalProject::FrontEnd::ProjectsController < OrbitWidgetControll
def index def index
@projects = Project.desc(:year).page(params[:page]).per(10) @projects = Project.where(:is_hidden=>false).desc(:period_start_date).page(params[:page]).per(10)
end end
# GET /writing_journals/1
# GET /writing_journals/1.xml
def show def show
@project = Project.find(params[:id]) @project = Project.find(params[:id])

View File

@ -26,10 +26,12 @@
</tbody> </tbody>
</table> </table>
<div class="form-actions form-fixed pagination-right"> <div class="bottomnav clearfix">
<div class="action pull-right">
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), panel_personal_project_back_end_project_setting_path, :class => 'btn btn-primary pull-right' %> <%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), panel_personal_project_back_end_project_setting_path, :class => 'btn btn-primary pull-right' %>
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_project_back_end_project_path, :class => 'btn btn-primary pull-right' %> <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_project_back_end_project_path, :class => 'btn btn-primary pull-right' %>
<div id="lab_pagination" class="paginationFixed"> </div>
<%= paginate @projects, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %> <div class="pagination pagination-centered">
<%= paginate @projects, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
</div> </div>
</div> </div>

View File

@ -77,10 +77,9 @@
</div> </div>
</div> </div>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp; <!-- <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯出</a>&nbsp;
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; <a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 匯入</a>&nbsp; -->
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 新增</a>&nbsp; <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_project_back_end_project_path, :class => 'btn btn-primary pull-right' %>
<a class="btn btn-primary pull-right" href><i class="icon-plus icon-white"></i> 設定</a> 
</div> </div>
<div id="project_type_qe"> <div id="project_type_qe">

View File

@ -2,26 +2,39 @@
<%= flash_messages %> <%= flash_messages %>
<h1><%= t('project.list_project') %></h1> <h1><%= t('module_name.personal_project') %></h1>
<table>
<tr>
<th><%= t(:year) %></th>
<th><%= t(:title) %></th>
</tr>
<% @projects.each do |post| %> <table class="table">
<tr> <thead>
<td><%= post.year %></td> <tr>
<th class="grid3"><%= t('personal_project.project_category') %></th>
<th class="grid3"><%= t('personal_project.year') %></th>
<th class="grid9"><%= t('personal_project.project_title') %></th>
<th class="grid3"><%= t('personal_project.participator') %></th>
<th class="grid3"><%= t('personal_project.period') %></th>
</tr>
</thead>
<tbody>
<% @projects.each do |project| %>
<tr>
<td><%= project.project_category.title %></td>
<td><%= project.year %></td>
<td> <td>
<%= link_to post.project_title , panel_personal_project_front_end_project_path(post) %> <%= link_to project.project_title, panel_personal_project_front_end_project_path(project) %>
<td><%= project.participator %></td>
</td> </td>
<td><%= project.period_start_date.strftime("%Y.%m") %> ~ <%= project.period_end_date.strftime("%Y.%m") %></td>
</tr> </tr>
<% end %> <% end %>
</tbody>
</table>
</table>
<%= paginate @projects, :params => {:inner => false}%> <%= paginate @projects, :params => {:inner => false}%>

View File

@ -1,34 +1,67 @@
<% # encoding: utf-8 %> <% # encoding: utf-8 %>
<table> <table>
<caption> <%= t("project") %> </caption> <caption> <%= t("module_name.personal_project") %> </caption>
<tbody> <tbody>
<tr><th><%= t("project.year")%></th><td><%= @project.year %></td></tr> <% if !@project.year.blank? %>
<tr><th><%= t("project.language")%></th><td><%= @project.language %></td></tr> <tr><th><%= t("personal_project.year")%></th><td><%= @project.year %></td></tr>
<tr><th><%= t("project.project_title")%></th><td><%= @project.project_title %></td></tr> <% end %>
<tr><th><%= t("project.job_title")%></th><td><%= @project.job_title %></td></tr>
<tr><th><%= t("project.category")%></th><td><%= @project.project_category.title if @project.project_category %></td></tr> <% if !@project.language.blank? %>
<tr><th><%= t("project.participator")%></th><td><%= @project.participator %></td></tr> <tr><th><%= t("personal_project.language")%></th><td><%= @project.language %></td></tr>
<tr><th><%= t("project.unit")%></th><td><%= @project.unit %></td></tr> <% end %>
<tr><th><%= t("project.abstract")%></th><td><%= @project.abstract %></td></tr>
<tr><th><%= t("project.period_start_date")%></th><td><%= @project.period_start_date %></td></tr> <% if !@project.project_title.blank? %>
<tr><th><%= t("project.period_end_date")%></th><td><%= @project.period_end_date %></td></tr> <tr><th><%= t("personal_project.project_title")%></th><td><%= @project.project_title %></td></tr>
<tr><th><%= t("project.url")%></th><td><%= link_to t(:url), @project.url, {:target => '_blank', :title => @project.title} if !@project.url.blank? %></td></tr> <% end %>
<tr><th><%= t("project.note")%></th><td><%= @project.note %></td></tr>
<tr><th><%= t("project.authors")%></th><td><%= "#{User.from_id(@project.create_user_id).name rescue ''},#{@project.authors rescue ''}"%></td></tr> <% if !@project.job_title.blank? %>
<tr><th><%= t("project.files")%></th> <tr><th><%= t("personal_project.job_title")%></th><td><%= @project.job_title %></td></tr>
<td> <% end %>
<% if @project.project_files.size > 0 %>
<div> <% if !@project.project_category.blank? %>
<i class="icons-paperclip"></i> <tr><th><%= t("personal_project.project_category")%></th><td><%= @project.project_category.title if @project.project_category %></td></tr>
<div class="showFile"> <% end %>
<% if !@project.participator.blank? %>
<tr><th><%= t("personal_project.participator")%></th><td><%= @project.participator %></td></tr>
<% end %>
<% if !@project.unit.blank? %>
<tr><th><%= t("personal_project.unit")%></th><td><%= @project.unit %></td></tr>
<% end %>
<% if !@project.abstract.blank? %>
<tr><th><%= t("personal_project.abstract")%></th><td><%= @project.abstract %></td></tr>
<% end %>
<% if !@project.period_start_date.blank? %>
<tr><th><%= t("personal_project.start_date")%></th><td><%= @project.period_start_date %></td></tr>
<% end %>
<% if !@project.period_end_date.blank? %>
<tr><th><%= t("personal_project.end_date")%></th><td><%= @project.period_end_date %></td></tr>
<% end %>
<% if !@project.url.blank? %>
<tr><th><%= t("personal_project.url")%></th><td><%= link_to t(:url), @project.url, {:target => '_blank', :title => @project.url} if !@project.url.blank? %></td></tr>
<% end %>
<tr><th><%= t("personal_project.authors")%></th><td><%= "#{User.from_id(@project.create_user_id).name rescue ''},#{@project.authors rescue ''}"%></td></tr>
<% if @project.project_files.size > 0 %>
<tr><th><%= t("personal_project.file")%></th>
<td>
<div>
<div class="showFile">
<i class="icons-paperclip"></i>
<% @project.project_files.each do | wjfile | %> <% @project.project_files.each do | wjfile | %>
<%= link_to wjfile.title, wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %> <%= link_to wjfile.title, wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %>
<% end %> <% end %>
</div>
</div> </div>
</div> </td>
<% end %> </tr>
</td> <% end %>
</tr> </tbody>
</tbody>
</table> </table>

View File

@ -36,6 +36,8 @@ en:
description : "File Description" description : "File Description"
pages : "Pages" pages : "Pages"
book_paper_type : "Book Paper Type" book_paper_type : "Book Paper Type"
frontend:
projects: "Project Frontend"
create_success : "Successfully Create" create_success : "Successfully Create"
update_success : "Successfully Update" update_success : "Successfully Update"

View File

@ -36,6 +36,8 @@ zh_tw:
description : "描述" description : "描述"
pages : "Pages" pages : "Pages"
book_paper_type : "Book Paper Type" book_paper_type : "Book Paper Type"
frontend:
projects: "研究計畫前台"
create_success : "新增完成!!" create_success : "新增完成!!"
update_success : "更新完成!!" update_success : "更新完成!!"

View File

@ -8,7 +8,7 @@ class Panel::PersonalResearch::FrontEnd::ResearchsController < OrbitWidgetContro
def index def index
@researchs = Research.desc(:year).page(params[:page]).per(10) @researchs = Research.where(:is_hidden=>false).desc(:publish_date).page(params[:page]).per(10)
end end

View File

@ -24,9 +24,11 @@
</tbody> </tbody>
</table> </table>
<div class="form-actions form-fixed pagination-right"> <div class="bottomnav clearfix">
<div class="action pull-right">
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_research_back_end_research_path, :class => 'btn btn-primary pull-right' %> <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_research_back_end_research_path, :class => 'btn btn-primary pull-right' %>
<div id="lab_pagination" class="paginationFixed"> </div>
<%= paginate @researchs, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %> <div class="pagination pagination-centered">
<%= paginate @researchs, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
</div> </div>
</div> </div>

View File

@ -2,26 +2,33 @@
<%= flash_messages %> <%= flash_messages %>
<h1><%= t('research.list_research') %></h1> <h1><%= t('module_name.personal_research') %></h1>
<table> <table class="table">
<tr> <thead>
<th><%= t(:year) %></th> <tr>
<th><%= t(:title) %></th> <th class="grid2"><%= t('personal_research.publication_date') %></th>
</tr> <th class="grid10"><%= t('personal_research.research_title') %></th>
<th class="grid10"><%= t('personal_research.authors') %></th>
</tr>
</thead>
<tbody>
<% @researchs.each do |post| %> <% @researchs.each do |research| %>
<tr>
<td><%= post.year %></td>
<td>
<%= link_to post.research_title , panel_personal_research_front_end_research_path(post) %>
</td>
</tr>
<% end %> <tr>
<td><%= research.publish_date.strftime("%Y.%m") %></td>
<td>
<%= link_to research.research_title, panel_personal_research_front_end_research_path(research) %>
</td>
<td><%= "#{User.from_id(research.create_user_id).name rescue ''},#{research.authors rescue ''}"%></td>
</tr>
</table> <% end %>
</tbody>
</table>
<%= paginate @researchs, :params => {:inner => false}%> <%= paginate @researchs, :params => {:inner => false}%>

View File

@ -1,29 +1,47 @@
<% # encoding: utf-8 %> <% # encoding: utf-8 %>
<table> <table>
<caption> <%= t("research") %> </caption> <caption> <%= t("module_name.personal_research") %> </caption>
<tbody> <tbody>
<tr><th><%= t("research.year")%></th><td><%= @research.year %></td></tr> <% if !@research.year.blank? %>
<tr><th><%= t("research.language")%></th><td><%= @research.language %></td></tr> <tr><th><%= t("personal_research.year")%></th><td><%= @research.year %></td></tr>
<tr><th><%= t("research.research_title")%></th><td><%= @research.research_title %></td></tr> <% end %>
<tr><th><%= t("research.extracted_chapters")%></th><td><%= @research.extracted_chapters %></td></tr>
<tr><th><%= t("research.publish_date")%></th><td><%= @research.publish_date %></td></tr> <% if !@research.language.blank? %>
<tr><th><%= t("research.url")%></th><td><%= link_to t(:url), @research.url, {:target => '_blank', :title => @research.journal_title} if !@research.url.blank? %></td></tr> <tr><th><%= t("personal_research.language")%></th><td><%= @research.language %></td></tr>
<tr><th><%= t("research.note")%></th><td><%= @research.note %></td></tr> <% end %>
<tr><th><%= t("research.authors")%></th><td><%= "#{User.from_id(@research.create_user_id).name rescue ''},#{@research.authors rescue ''}"%></td></tr>
<tr><th><%= t("research.files")%></th> <% if !@research.research_title.blank? %>
<td> <tr><th><%= t("personal_research.research_title")%></th><td><%= @research.research_title %></td></tr>
<% if @research.research_files.size > 0 %> <% end %>
<div>
<i class="icons-paperclip"></i> <% if !@research.extracted_chapters.blank? %>
<div class="showFile"> <tr><th><%= t("personal_research.extracted_chapters")%></th><td><%= @research.extracted_chapters %></td></tr>
<% @research.research_files.each do | wjfile | %> <% end %>
<%= link_to wjfile.title, wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %>
<% end %> <% if !@research.publish_date.blank? %>
</div> <tr><th><%= t("personal_research.publication_date")%></th><td><%= @research.publish_date %></td></tr>
</div> <% end %>
<% end %>
</td> <% if !@research.url.blank? %>
</tr> <tr><th><%= t("personal_research.url")%></th><td><%= link_to t(:url), @research.url, {:target => '_blank', :title => @research.url} if !@research.url.blank? %></td></tr>
</tbody> <% end %>
<tr><th><%= t("personal_research.authors")%></th><td><%= "#{User.from_id(@research.create_user_id).name rescue ''},#{@research.authors rescue ''}"%></td></tr>
<% if @research.research_files.size > 0 %>
<tr><th><%= t("personal_research.file")%></th>
<td>
<div>
<div class="showFile">
<i class="icons-paperclip"></i>
<% @research.research_files.each do | wjfile | %>
<%= link_to wjfile.title, wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %>
<% end %>
</div>
</div>
</td>
</tr>
<% end %>
</tbody>
</table> </table>

View File

@ -30,6 +30,8 @@ en:
description : "File Description" description : "File Description"
pages : "Pages" pages : "Pages"
book_paper_type : "Book Paper Type" book_paper_type : "Book Paper Type"
frontend:
researchs: "Research Frontend"
create_success : "Successfully Create" create_success : "Successfully Create"
update_success : "Successfully Update" update_success : "Successfully Update"

View File

@ -30,6 +30,8 @@ zh_tw:
description : "描述" description : "描述"
pages : "Pages" pages : "Pages"
book_paper_type : "Book Paper Type" book_paper_type : "Book Paper Type"
frontend:
researchs: "研究前台"
create_success : "新增完成!!" create_success : "新增完成!!"
update_success : "更新完成!!" update_success : "更新完成!!"