added brief intro

This commit is contained in:
Saurabh Bhatia 2014-06-25 21:43:04 +08:00
parent 32cc9ed6a3
commit d941e096ba
15 changed files with 58 additions and 6 deletions

View File

@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.

View File

@ -0,0 +1,4 @@
/*
Place all the styles related to the matching controller here.
They will automatically be included in application.css.
*/

View File

@ -0,0 +1,8 @@
class Admin::JournalPaperIntrosController < Admin::PersonalPluginIntrosController
def initialize
super
@app_type = 'journal_paper_intro'
@app_type_name = 'journal_paper'
@reback_name = 'JournalPaper'
end
end

View File

@ -0,0 +1,2 @@
module Admin::JournalPaperIntrosHelper
end

View File

@ -0,0 +1,3 @@
class JournalPaperIntro < PersonalPluginIntro
end

View File

@ -12,7 +12,7 @@
<thead>
<tr>
<th class="span1"><%= t('personal_journal.year') %></th>
<th class="span7"><%= t('module_name.personal_journal') %></th>
<th class="span7"><%= t('module_name.journal_paper') %></th>
<th class="span1"><%= t('personal_journal.authors') %></th>
</tr>
</thead>

View File

@ -47,7 +47,7 @@
<th><input type="checkbox" /></th>
<% end -%>
<th class="span1"><%= t('personal_journal.year') %></th>
<th><%= t('module_name.personal_journal') %></th>
<th><%= t('module_name.journal_paper') %></th>
<% if not @user%>
<th><%= t('personal_journal.authors') %></th>
<% end %>
@ -85,7 +85,10 @@
<% if current_user.is_admin? %>
<div class="bottomnav clearfix">
<div class="action pull-right">
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'),admin_journal_paper_intros_path(member_profile_id: @member.id), :class => 'btn btn-primary' %>
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_admin_journal_paper_path(member_profile_id: @member.id), :class => 'btn btn-primary' %>
</div>
<div class="pagination pagination-centered">

View File

@ -1,6 +1,6 @@
en:
module_name:
personal_journal: Journal Paper
journal_paper: Journal Paper
personal_journal:
paper_title : "Paper Title"
journal_title : "Journal Title"

View File

@ -1,6 +1,6 @@
zh_tw:
module_name:
personal_journal: 期刊論文
journal_paper: 期刊論文
personal_journal:
paper_title : "論文名稱"
journal_title : "期刊名稱"

View File

@ -19,6 +19,7 @@ Rails.application.routes.draw do
resources :journal_levels
resources :journal_paper_author_types
resources :journal_paper_types
resources :journal_paper_intros
end
end
end

View File

@ -2,9 +2,9 @@ module PersonalJournal
class Engine < ::Rails::Engine
initializer "personal_journal" do
OrbitApp.registration "PersonalJournal",:type=> 'ModuleApp' do
module_label 'module_name.personal_journal'
module_label 'module_name.journal_paper'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true, :sort_number => '5', :app_name=>"JournalPaper", :intro_app_name=>"PersonalJournalIntro",:path=>"/plugin/journal_paper/profile",:front_path=>"/profile",:admin_path=>"/admin/journal_papers/",:i18n=>'module_name.personal_journal'
personal_plugin :enable => true, :sort_number => '5', :app_name=>"JournalPaper", :intro_app_name=>"JournalPaperlIntro",:path=>"/plugin/journal_paper/profile",:front_path=>"/profile",:admin_path=>"/admin/journal_papers/",:i18n=>'module_name.journal_paper'
version "0.1"
organization "Rulingcom"

View File

@ -0,0 +1,7 @@
require 'test_helper'
class Admin::JournalPaperIntrosControllerTest < ActionController::TestCase
# test "the truth" do
# assert true
# end
end

11
test/fixtures/journal_paper_intros.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
# This model initially had no columns defined. If you add columns to the
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value

View File

@ -0,0 +1,4 @@
require 'test_helper'
class Admin::JournalPaperIntrosHelperTest < ActionView::TestCase
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class JournalPaperIntroTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end