Changes for nccu
This commit is contained in:
parent
5223a7a3e9
commit
6b2aeadde6
2
Gemfile
2
Gemfile
|
@ -20,7 +20,7 @@ gem 'rubyzip'
|
|||
gem 'sinatra'
|
||||
gem 'sprockets'
|
||||
gem 'tinymce-rails'
|
||||
# gem 'therubyracer'
|
||||
gem 'therubyracer'
|
||||
|
||||
# Gems used only for assets and not required
|
||||
# in production environments by default.
|
||||
|
|
|
@ -84,6 +84,7 @@ GEM
|
|||
railties (~> 3.0)
|
||||
thor (~> 0.14)
|
||||
json (1.6.5)
|
||||
libv8 (3.3.10.4)
|
||||
linecache19 (0.5.12)
|
||||
ruby_core_source (>= 0.1.4)
|
||||
mail (2.3.0)
|
||||
|
@ -179,6 +180,8 @@ GEM
|
|||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
subexec (0.2.1)
|
||||
therubyracer (0.9.9)
|
||||
libv8 (~> 3.3.10)
|
||||
thor (0.14.6)
|
||||
tilt (1.3.3)
|
||||
tinymce-rails (3.4.8)
|
||||
|
@ -234,6 +237,7 @@ DEPENDENCIES
|
|||
sinatra
|
||||
spork
|
||||
sprockets
|
||||
therubyracer
|
||||
tinymce-rails
|
||||
uglifier
|
||||
watchr
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -9,13 +9,6 @@ function resize() {
|
|||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$(document).on('click', '.language-menu li', function(){
|
||||
$(this).each(function(i){
|
||||
$(this).siblings().removeClass('active')
|
||||
$(this).addClass('active')
|
||||
})
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '.orbit-bar-member', function(){
|
||||
$(this).hasClass('open') ? $(this).removeClass('open') : $(this).addClass('open');
|
||||
$('.bar-login .dropdown-menu').toggle();
|
||||
|
|
|
@ -2663,7 +2663,8 @@ button.btn.small, input[type="submit"].btn.small {
|
|||
.pagination li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination a {
|
||||
|
||||
.pagination .page{
|
||||
float: left;
|
||||
padding: 0 14px;
|
||||
line-height: 34px;
|
||||
|
@ -2671,6 +2672,28 @@ button.btn.small, input[type="submit"].btn.small {
|
|||
border: 1px solid #ddd;
|
||||
border-left-width: 0;
|
||||
}
|
||||
.pagination a {
|
||||
float: left;
|
||||
}
|
||||
.pagination .next{
|
||||
float: left;
|
||||
padding: 0 14px;
|
||||
line-height: 34px;
|
||||
text-decoration: none;
|
||||
border: 1px solid #ddd;
|
||||
border-left-width: 0;
|
||||
}
|
||||
.pagination .last{
|
||||
float: left;
|
||||
padding: 0 14px;
|
||||
line-height: 34px;
|
||||
text-decoration: none;
|
||||
border: 1px solid #ddd;
|
||||
border-left-width: 0;
|
||||
}
|
||||
.pagination .current{
|
||||
border-left-width: 1px;
|
||||
}
|
||||
.pagination a:hover, .pagination .active a {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
|
|
@ -30,6 +30,15 @@
|
|||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(127, 149, 165, 1), 0 -1px 0 rgba(31, 32, 36, 1) inset;
|
||||
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(127, 149, 165, 1), 0 -1px 0 rgba(31, 32, 36, 1) inset;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(127, 149, 165, 1), 0 -1px 0 rgba(31, 32, 36, 1) inset;
|
||||
|
||||
background-image: -moz-linear-gradient(top, #5282A6, #133757);
|
||||
background-image: -ms-linear-gradient(top, #5282A6, #133757);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5282A6), to(#133757));
|
||||
background-image: -webkit-linear-gradient(top, #5282A6, #133757);
|
||||
background-image: -o-linear-gradient(top, #5282A6, #133757);
|
||||
background-image: linear-gradient(top, #5282A6, #133757);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5282A6', endColorstr='#133757', GradientType=0);
|
||||
/*
|
||||
background-image: -moz-linear-gradient(top, #545b60, #191a1c);
|
||||
background-image: -ms-linear-gradient(top, #545b60, #191a1c);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545b60), to(#191a1c));
|
||||
|
@ -37,6 +46,7 @@
|
|||
background-image: -o-linear-gradient(top, #545b60, #191a1c);
|
||||
background-image: linear-gradient(top, #545b60, #191a1c);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#545b60', endColorstr='#191a1c', GradientType=0);
|
||||
*/
|
||||
}
|
||||
#orbit-bar .navbar-search {
|
||||
float: none;
|
||||
|
@ -65,7 +75,8 @@
|
|||
width:100%;
|
||||
}
|
||||
#orbit-bar .orbit-logo .brand {
|
||||
background: url(<%= asset_path 'orbit-bar.png' %>) no-repeat -162px -5px;
|
||||
/* background: url(<%= asset_path 'orbit-bar.png' %>) no-repeat -162px -5px; */
|
||||
background: url(<%= asset_path 'nccu_logo.png' %>) no-repeat 6px 0px;
|
||||
text-indent:-9999px;
|
||||
padding: 5px 20px 4px;
|
||||
}
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
</ul>
|
||||
</li>
|
||||
<% if user_signed_in? %>
|
||||
<li class="dropdown active clear">
|
||||
<li class="dropdown active">
|
||||
<a class="orbit-bar-account" href="#" data-toggle="dropdown">
|
||||
<!-- <img src="images/menber-pic.png" /> -->
|
||||
<%= image_tag current_user.avatar.thumb.url, :class => 'member-img' %>
|
||||
<img class="member-img" src="/assets/menber-pic.png" />
|
||||
<%#= image_tag current_user.avatar.thumb.url, :class => 'member-img' %>
|
||||
<span class="member-name"><%= current_user.name %></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu account-menu">
|
||||
|
@ -45,7 +45,7 @@
|
|||
<%= t(:desktop) %>
|
||||
</a>
|
||||
</li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-out') + t(:logout), destroy_user_session_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-out') + ' ' + t(:logout), destroy_user_session_path %></li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<form class="navbar-search span6" action="">
|
||||
<input class="search-query span4" type="text" placeholder="Search NCCU">
|
||||
<input class="search-query span4" type="text" placeholder="<%= t(:search_nccu) %>">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('users') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), panel_web_resource_back_end_web_links_path %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), admin_users_path %>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers(nil) do -%>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers(nil) do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.link'), nil %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.link'), panel_web_resource_back_end_web_links_path %>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers(nil) do -%>
|
||||
|
|
|
@ -47,7 +47,7 @@ module PrototypeR4
|
|||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
# config.i18n.default_locale = :de
|
||||
config.i18n.default_locale = :en
|
||||
config.i18n.default_locale = :zh_tw
|
||||
|
||||
# JavaScript files you want as :defaults (application.js is always included).
|
||||
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
||||
|
|
|
@ -24,21 +24,21 @@ PrototypeR4::Application.configure do
|
|||
config.action_dispatch.best_standards_support = :builtin
|
||||
|
||||
|
||||
config.middleware.use ExceptionNotifier,
|
||||
:email_prefix => "[R4_error]",
|
||||
:sender_address => %{"notifier" <redmine@rulingcom.com>},
|
||||
:exception_recipients => %w{chris@rulingcom.com}
|
||||
# config.middleware.use ExceptionNotifier,
|
||||
# :email_prefix => "[R4_error]",
|
||||
# :sender_address => %{"notifier" <redmine@rulingcom.com>},
|
||||
# :exception_recipients => %w{chris@rulingcom.com}
|
||||
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.smtp_settings = {
|
||||
:tls => true,
|
||||
:enable_starttls_auto => true,
|
||||
:address => "smtp.gmail.com",
|
||||
:port => '587',
|
||||
:domain => "smtp.gmail.com",
|
||||
:authentication => "plain",
|
||||
:user_name => "redmine@rulingcom.com",
|
||||
:password => "rulingredmine" }
|
||||
# config.action_mailer.delivery_method = :smtp
|
||||
# config.action_mailer.smtp_settings = {
|
||||
# :tls => true,
|
||||
# :enable_starttls_auto => true,
|
||||
# :address => "smtp.gmail.com",
|
||||
# :port => '587',
|
||||
# :domain => "smtp.gmail.com",
|
||||
# :authentication => "plain",
|
||||
# :user_name => "redmine@rulingcom.com",
|
||||
# :password => "rulingredmine" }
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ en:
|
|||
password: Password
|
||||
register: Register
|
||||
remember_me: Remember me
|
||||
search_nccu: Search NCCU
|
||||
show: Show
|
||||
submit: Submit
|
||||
sure?: Are you sure?
|
||||
|
|
|
@ -17,7 +17,7 @@ zh_tw:
|
|||
edit: 編輯
|
||||
email: 電子郵件
|
||||
enable: 啟用
|
||||
forget_password: 忘記密碼?
|
||||
forgot_password: 忘記密碼?
|
||||
help: 協助
|
||||
hide: 隱藏
|
||||
homepage: 首頁
|
||||
|
@ -25,10 +25,11 @@ zh_tw:
|
|||
logout: 登出
|
||||
no_: "No"
|
||||
nothing: 無
|
||||
or_lower: 或者
|
||||
or_lower: 或
|
||||
password: 密碼
|
||||
register: 註冊
|
||||
remember_me: 記住我
|
||||
search_nccu: 搜尋政大
|
||||
show: 顯示
|
||||
submit: 送出
|
||||
sure?: 您肯定嗎?
|
||||
|
|
|
@ -81,7 +81,7 @@ module ParserFrontEnd
|
|||
res << "<script type='text/javascript' src='/assets/orbit_bar.js'></script>"
|
||||
res << "<script type='text/javascript' src='/assets/event.js'></script>"
|
||||
page.design.javascripts.each do |js|
|
||||
res << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||
# res << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||
end
|
||||
res
|
||||
end
|
||||
|
|
|
@ -18,6 +18,8 @@ class Panel::Announcement::FrontEnd::BulletinsController < ObitWidgetController
|
|||
end
|
||||
|
||||
get_categorys
|
||||
|
||||
@current_category = BulletinCategory.from_id(params[:bulletin_category_id]) rescue nil
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
@ -14,4 +14,8 @@ class BulletinCategory
|
|||
|
||||
has_many :bulletins
|
||||
|
||||
def self.from_id(id)
|
||||
BulletinCategory.find(id) rescue nil
|
||||
end
|
||||
|
||||
end
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
<%= flash_messages %>
|
||||
|
||||
<h1 class="h1"><%= t('announcement.list_announcement') %></h1>
|
||||
<% if @current_category %>
|
||||
<h1 class="h1"><%= @current_category.i18n_variable[I18n.locale] + t('announcement.bulletin.list_lower') %></h1>
|
||||
<% else %>
|
||||
<h1 class="h1"><%= t('announcement.list_announcement') %></h1>
|
||||
<% end %>
|
||||
|
||||
|
||||
<table class="table table-bordered">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<li>
|
||||
<div class="news_img"><%= image_tag(post.image.url, :size => "290x130") if post.image.file %></div>
|
||||
<h3 class="h3 news_title"><%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %></h3>
|
||||
<p class="news_wrap"><%= post.subtitle[I18n.locale] %></p>
|
||||
<p class="news_wrap"><%= post.subtitle[I18n.locale].html_safe %></p>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -14,7 +14,7 @@ class Panel::WebResource::Widget::WebLinksController < ObitWidgetController
|
|||
|
||||
# @web_link = WebLink.where( :is_hidden => false ).desc(:is_top, :name).first
|
||||
|
||||
@web_links = WebLink.widget_datas.page(params[:page]).per(9)
|
||||
@web_links = WebLink.widget_datas.page(params[:page]).per(5)
|
||||
|
||||
# get_categorys
|
||||
|
||||
|
@ -24,7 +24,7 @@ class Panel::WebResource::Widget::WebLinksController < ObitWidgetController
|
|||
end
|
||||
|
||||
def reload_web_links
|
||||
@web_links = WebLink.widget_datas.page(params[:page]).per(9)
|
||||
@web_links = WebLink.widget_datas.page(params[:page]).per(5)
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue