Compare commits
58
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70673f19f0 | ||
|
|
9849b5c7dd | ||
|
|
3999308bb4 | ||
|
|
ee2adf2121 | ||
|
|
363ea53861 | ||
|
|
b7ea756789 | ||
|
|
839743779b | ||
|
|
f8c7e8f17a | ||
|
|
9f779f1f71 | ||
|
|
95310619c0 | ||
|
|
55207da76a | ||
|
|
795d881626 | ||
|
|
4cd455441f | ||
|
|
fea0540ec3 | ||
|
|
44f5a98a69 | ||
|
|
746bcbed96 | ||
|
|
ec6ef5a871 | ||
|
|
8aa1e2dae0 | ||
|
|
dd0d2368c8 | ||
|
|
9c41282fdb | ||
|
|
fac578f251 | ||
|
|
3b4e4e1098 | ||
|
|
8c68c54a57 | ||
|
|
2d8754f0aa | ||
|
|
19633a05d8 | ||
|
|
051adbf167 | ||
|
|
d386307745 | ||
|
|
5c0d16c22e | ||
|
|
93424e1972 | ||
|
|
3c49a6eeae | ||
|
|
f76ead6ea5 | ||
|
|
e8a8e92f5c | ||
|
|
5b60e389ec | ||
|
|
faabedad55 | ||
|
|
d95b050e57 | ||
|
|
afe6972dfa | ||
|
|
ce3842d3ad | ||
|
|
9fbf9e940e | ||
|
|
0f2c13e7ac | ||
|
|
f42d25c46b | ||
|
|
dda603c27c | ||
|
|
ecc3581106 | ||
|
|
e56e91cc93 | ||
|
|
4b7703f4af | ||
|
|
2ec3d77600 | ||
|
|
5e1d6663a1 | ||
|
|
19801eb10f | ||
|
|
4abe4f5c16 | ||
|
|
52356d3316 | ||
|
|
6d4d3ccfd4 | ||
|
|
663bb7776b | ||
|
|
dfcb383e0f | ||
|
|
c4ca7f450a | ||
|
|
e851395f79 | ||
|
|
f72697ae76 | ||
|
|
2040081679 | ||
|
|
03189092d3 | ||
|
|
141b708392 |
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -15,6 +15,11 @@ function load_tinymce() {
|
||||
theme_advanced_statusbar_location : "bottom",
|
||||
theme_advanced_resizing : true,
|
||||
|
||||
// Domain Absolute URLs
|
||||
relative_urls : false,
|
||||
remove_script_host : false,
|
||||
document_base_url: window.location.protocol + '//' + window.location.host,
|
||||
|
||||
// Skin options
|
||||
skin : "o2k7",
|
||||
skin_variant : "silver",
|
||||
|
||||
+11
-11
@@ -101,8 +101,8 @@ div[data-role="page"] {
|
||||
border: none;
|
||||
z-index: 50;
|
||||
/*background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545b60), to(#191a1c));*/
|
||||
background-image: -webkit-linear-gradient(top, #5282A6, #133757);
|
||||
-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;
|
||||
background-image: -webkit-linear-gradient(top, #6D35AF, #391C69);
|
||||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 #AE73F5, 0 -1px 0 rgba(31, 32, 36, 1) inset;
|
||||
}
|
||||
.header h1.ui-title {
|
||||
margin: 8px 30%;
|
||||
@@ -116,9 +116,9 @@ div[data-role="page"] {
|
||||
margin-left: -15px;
|
||||
font-size: 20px;
|
||||
/*color: #727272;*/
|
||||
color: #7CA6C5;
|
||||
color: #C5A7D3;
|
||||
/*background-color: #252525;*/
|
||||
background-color: #144366;
|
||||
background-color: #38177F;
|
||||
border-radius: 0 0 5px 5px;
|
||||
height: 15px;
|
||||
line-height: 16px;
|
||||
@@ -135,14 +135,14 @@ div[data-role="page"] {
|
||||
background-image: none;
|
||||
}
|
||||
.header .ui-btn-up-a {
|
||||
border: 1px solid #133547;
|
||||
background-color: #0C4C64;
|
||||
border: 1px solid #7220A0;
|
||||
background-color: #9B2DCF;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from( #0D6691 ), to( #0E3A4B ));
|
||||
background-image: -webkit-linear-gradient( #0D6691 , #0E3A4B );
|
||||
background-image: -moz-linear-gradient( #0D6691 , #0E3A4B );
|
||||
background-image: -ms-linear-gradient( #0D6691 , #0E3A4B );
|
||||
background-image: -o-linear-gradient( #0D6691 , #0E3A4B );
|
||||
background-image: linear-gradient( #0D6691 , #0E3A4B );
|
||||
background-image: -webkit-linear-gradient(#9B1DF0, #5F2879);
|
||||
background-image: -moz-linear-gradient(#9B1DF0, #5F2879);
|
||||
background-image: -ms-linear-gradient(#9B1DF0, #5F2879);
|
||||
background-image: -o-linear-gradient(#9B1DF0, #5F2879);
|
||||
background-image: linear-gradient(#9B1DF0, #5F2879);
|
||||
}
|
||||
.header h1 img {
|
||||
height: 30px;
|
||||
@@ -220,7 +220,7 @@ module ApplicationHelper
|
||||
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-search.js'></script>\n"
|
||||
end
|
||||
javascripts << "<script type='text/javascript' src='/assets/lib/jquery.preload-min.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/static/jquery.cycle.all.latest.js'></script>\n"
|
||||
# javascripts << "<script type='text/javascript' src='/static/jquery.cycle.all.latest.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/static/kernel.js'></script>\n"
|
||||
# javascripts << "<script type='text/javascript' src='/assets/social-share-button.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/lib/social-share-button.js'></script>\n"
|
||||
|
||||
@@ -7,7 +7,7 @@ class User
|
||||
|
||||
mount_uploader :avatar, AvatarUploader
|
||||
|
||||
field :admin, :type => Boolean, :default => true
|
||||
field :admin, :type => Boolean, :default => false
|
||||
field :active_role
|
||||
field :user_id
|
||||
field :sid
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
<script type='text/javascript' src='/static/jquery.cycle.all.latest.js'></script>
|
||||
<script type='text/javascript'>
|
||||
jQuery(function( $ ){
|
||||
|
||||
$('#slideshow-<%= @ad_banner.title.dehumanize %>').cycle({
|
||||
delay: -1000,
|
||||
fx: "<%= @ad_banner.ad_fx.nil? ? 'fade': @ad_banner.ad_fx %>",
|
||||
timeoutFn: getTimeout,
|
||||
pager: '.banner_nav-<%= @ad_banner.title.dehumanize %>',
|
||||
pagerAnchorBuilder: function(idx, slide) {
|
||||
return "<li><a href='#'></a></li>";
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div style='position:relative'>
|
||||
<ul id='banner_nav' class='clear banner_nav-<%= @ad_banner.title.dehumanize %>'></ul>
|
||||
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>
|
||||
@@ -23,4 +7,15 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type='text/javascript'>
|
||||
var banner = {"banner_name":"#slideshow-<%= @ad_banner.title.dehumanize %>",
|
||||
"banner_fx":"<%= @ad_banner.ad_fx.nil? ? 'fade': @ad_banner.ad_fx %>",
|
||||
"banner_pager":".banner_nav-<%= @ad_banner.title.dehumanize %>",
|
||||
"image_loaded":0,
|
||||
"time_to_next":<%= @ad_banner.transition_msec %>,
|
||||
"current":0,
|
||||
"best_size": "<%= @ad_banner.best_size %>"
|
||||
};
|
||||
banners.push(banner);
|
||||
</script>
|
||||
@@ -4,7 +4,7 @@
|
||||
<ul class='list'>
|
||||
<% @menu_page.visible_children.each do |child| %>
|
||||
<li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>">
|
||||
<a href="<%= (child.class.to_s.eql?('Page') ? '/' + child.path : child.url) %>"><%= child.title %></a>
|
||||
<a href="<%= (child.class.to_s.eql?('Page') ? '/' + child.path : child.url) %>" <%= "target=_blank" if child.class.to_s.eql?('Page').blank? %> ><%= child.title %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
@@ -3,9 +3,5 @@
|
||||
<% end %>
|
||||
|
||||
<ul>
|
||||
<li>總機電話:<a href="tel:+886229393091">02-29393091</a></li>
|
||||
<li>傳真:02-29379611</li>
|
||||
<li>緊急重大事件通聯窗口:校內分機 66119、66110</li>
|
||||
<li>總值日室:<a href="tel:+88229387132">02-29387132</a></li>
|
||||
<li>駐警衛室:<a href="tel:+88229387129">02-29387129</a></li>
|
||||
<li>電話:<a href="tel:+886227321104">+886-2-2732-1104</a> <a href="tel:+886266396688">+886-2-6639-6688</a></li>
|
||||
</ul>
|
||||
@@ -5,6 +5,6 @@
|
||||
<div id='map_canvas'></div>
|
||||
|
||||
<script type='text/javascript'>
|
||||
var $map_center = "24.987449, 121.576117"
|
||||
var $map_center = "25.024562,121.544611"
|
||||
var $map_zoom = 17
|
||||
</script>
|
||||
@@ -32,13 +32,7 @@ module ParserFrontEnd
|
||||
ret = ''
|
||||
part = PagePart.find(front['part_id']) if front['part_id']
|
||||
ret << eval("\"#{front['path']}\"") rescue ''
|
||||
args.each do |index,arg|
|
||||
if index=="tag_id" || index=="category_id"
|
||||
ret << (ret.include?("?") ? "&#{index}[]=#{arg}": "?#{index}[]=#{arg}" )
|
||||
else
|
||||
ret << (ret.include?("?") ? "&#{index}=#{arg}": "?#{index}=#{arg}" )
|
||||
end
|
||||
end if args
|
||||
ret << (ret.include?("?") ? "&#{args.to_param}" : "?#{args.to_param}") if args
|
||||
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>")
|
||||
end
|
||||
front.swap(fragment)
|
||||
|
||||
+66
-39
@@ -1,45 +1,72 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$.each($(".dymanic_load"),function(){
|
||||
if($(this).attr("path")==''){$(this).html("App setting Failed");}
|
||||
|
||||
if($(this).attr("path")!=''){
|
||||
ajax_load_proc($(this),$(this).attr("path"));
|
||||
}
|
||||
}
|
||||
);
|
||||
$("#main_content").addClass("module");
|
||||
});
|
||||
var banners = [];
|
||||
var banner_index = 0;
|
||||
$q = jQuery;
|
||||
$q.getScript('/static/jquery.cycle.all.latest.js');
|
||||
|
||||
function ajax_load_proc(wapper,url){
|
||||
$.get(encodeURI(url), {}, function(respText,textSta,XML){
|
||||
if (textSta == 'success') {
|
||||
wapper.html(respText);
|
||||
};
|
||||
if(textSta == 'error')
|
||||
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$.each($(".dymanic_load"),function(){
|
||||
if($(this).attr("path")==''){$(this).html("App setting Failed");}
|
||||
if($(this).attr("path")!=''){
|
||||
if($(this).attr("path").indexOf("show_banner")>0){
|
||||
ajax_load_proc($(this),$(this).attr("path"),"true");
|
||||
}else{
|
||||
ajax_load_proc($(this),$(this).attr("path"),$(this).attr("path"));
|
||||
}
|
||||
}});
|
||||
$("#main_content").addClass("module");
|
||||
});
|
||||
|
||||
function ajax_load_proc(wapper,url,isBanner){
|
||||
$.get(encodeURI(url), {}, function(respText,textSta,XML){
|
||||
if (textSta == 'success') {
|
||||
if(isBanner=="true"){
|
||||
wapper.html(respText);
|
||||
var banner = banners[banner_index];
|
||||
if($(banner.banner_name+" img").length>1){
|
||||
$(banner.banner_name+" > img").each(function(){
|
||||
$(this).load(function(){ banner.image_loaded++; });
|
||||
});
|
||||
BannerCycle(banner_index);
|
||||
}
|
||||
banner_index++;
|
||||
}else{
|
||||
wapper.html(respText);
|
||||
}
|
||||
};
|
||||
if(textSta == 'error')
|
||||
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
|
||||
});
|
||||
}
|
||||
|
||||
// Ad Banner FX code [start]
|
||||
function getTimeout() {
|
||||
return $(this).attr('time_to_next');
|
||||
}
|
||||
function BannerCycle(banner_index){
|
||||
var banner = banners[banner_index];
|
||||
if (banner.image_loaded==$(banner.banner_name+" img").length){
|
||||
$q(banner.banner_name).cycle({
|
||||
delay: -1000,
|
||||
fx: banner.banner_fx,
|
||||
timeout: banner.time_to_next,
|
||||
pager: banner.banner_pager,
|
||||
pagerAnchorBuilder: function(idx, slide) { return "<li><a href='#'></a></li>"; }
|
||||
});
|
||||
}else{
|
||||
setTimeout("BannerCycle("+banner_index+")",500);
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.slideshow img', function()
|
||||
{
|
||||
if($(this).attr('link_url')!='')
|
||||
{
|
||||
if($(this).attr('link_open')=='new_window')
|
||||
{
|
||||
window.open($(this).attr('link_url'));
|
||||
}
|
||||
else
|
||||
{
|
||||
document.location.href=$(this).attr('link_url')
|
||||
}
|
||||
}
|
||||
})
|
||||
$(document).on('click', '.slideshow img', function()
|
||||
{
|
||||
if($(this).attr('link_url')!='')
|
||||
{
|
||||
if($(this).attr('link_open')=='new_window')
|
||||
{
|
||||
window.open($(this).attr('link_url'));
|
||||
}
|
||||
else
|
||||
{
|
||||
document.location.href=$(this).attr('link_url')
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
// Ad Banner FX code [end]
|
||||
// Ad Banner FX code [end]
|
||||
+3
-2
@@ -61,8 +61,9 @@ class Panel::Announcement::BackEnd::BulletinCategorysController < OrbitBackendCo
|
||||
custom_categories = @categories.inject([]) do |data, category|
|
||||
data << {
|
||||
title: category.title,
|
||||
link: "#{request.protocol}#{request.host_with_port}#{panel_announcement_front_end_bulletins_path(bulletin_category_id: category.id, locale: I18n.locale)}",
|
||||
link_json: "#{request.protocol}#{request.host_with_port}#{get_bulletins_panel_announcement_back_end_bulletins_path(category_id: category.id, locale: I18n.locale)}"
|
||||
link_html: "#{request.protocol}#{request.host_with_port}#{panel_announcement_front_end_bulletins_path(category_id: category.id, locale: I18n.locale)}",
|
||||
link_json: "#{request.protocol}#{request.host_with_port}#{get_bulletins_panel_announcement_back_end_bulletins_path(category_id: category.id, locale: I18n.locale, format: 'json')}",
|
||||
link_rss: "#{request.protocol}#{request.host_with_port}#{get_bulletins_panel_announcement_back_end_bulletins_path(category_id: category.id, locale: I18n.locale, format: 'rss')}"
|
||||
}
|
||||
end
|
||||
render json: JSON.pretty_generate(custom_categories)
|
||||
|
||||
+10
-1
@@ -23,6 +23,9 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||
|
||||
|
||||
def index
|
||||
|
||||
email_group_data
|
||||
|
||||
# @bulletins = Bulletin.all
|
||||
# @bulletins = Bulletin.desc("postdate desc")
|
||||
get_categorys('BulletinCategory',params[:bulletin_category_id])
|
||||
@@ -116,6 +119,9 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||
# POST /bulletins
|
||||
# POST /bulletins.xml
|
||||
def create
|
||||
|
||||
email_group_data
|
||||
|
||||
@tags = get_tags
|
||||
if params[:bulletin_link]
|
||||
|
||||
@@ -221,6 +227,8 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||
|
||||
def update
|
||||
|
||||
email_group_data
|
||||
|
||||
@bulletin = Bulletin.find(params[:id])
|
||||
|
||||
# @bulletin.image.clear if params[:bulletin][:image_del] == '1'
|
||||
@@ -327,6 +335,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||
def get_bulletins
|
||||
I18n.locale = params[:locale] || :zh_tw
|
||||
bulletins = params[:category_id] ? Bulletin.where(bulletin_category_id: params[:category_id]).order_by(:created_at, :desc) : Bulletin.all.order_by(:created_at, :desc)
|
||||
bulletins = bulletins.reject{|b| b.title_translations[I18n.locale.to_s].blank?}
|
||||
@bulletins = Kaminari.paginate_array(bulletins).page(params[:page]).per(params[:per] || 10)
|
||||
|
||||
respond_to do |format|
|
||||
@@ -339,7 +348,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||
link: "#{request.protocol}#{request.host_with_port}#{panel_announcement_front_end_bulletin_path(bulletin, category_id: bulletin.bulletin_category.id, locale: I18n.locale)}",
|
||||
image: "#{request.protocol}#{request.host_with_port}#{image_url}",
|
||||
category: bulletin.bulletin_category.title,
|
||||
content: bulletin.text,
|
||||
description: bulletin.subtitle,
|
||||
postdate: display_date_time(bulletin.postdate),
|
||||
deadline: deadline,
|
||||
tag: bulletin.sorted_tags.map{|tag| tag.name}
|
||||
|
||||
@@ -11,4 +11,14 @@ class BulletinFile
|
||||
|
||||
belongs_to :bulletin
|
||||
|
||||
validate :check_file_title
|
||||
|
||||
private
|
||||
|
||||
def check_file_title
|
||||
if self.title.blank?
|
||||
errors.add( :file, I18n.t("announcement.file_name_not_null"))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
+2
-2
@@ -8,8 +8,8 @@ xml.rss :version => "2.0" do
|
||||
xml.item do
|
||||
xml.title category.title
|
||||
xml.pubDate category.created_at.to_s(:rfc822)
|
||||
xml.link "#{request.protocol}#{request.host_with_port}#{get_bulletins_panel_announcement_back_end_bulletins_path(bulletin_category_id: category.id, locale: I18n.locale, format: 'rss')}"
|
||||
xml.guid "#{request.protocol}#{request.host_with_port}#{panel_announcement_front_end_bulletins_path(bulletin_category_id: category.id)}"
|
||||
xml.link "#{request.protocol}#{request.host_with_port}#{get_bulletins_panel_announcement_back_end_bulletins_path(category_id: category.id, locale: I18n.locale, format: 'rss')}"
|
||||
xml.guid "#{request.protocol}#{request.host_with_port}#{panel_announcement_front_end_bulletins_path(category_id: category.id)}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Vendored
+17
-20
@@ -22,7 +22,7 @@
|
||||
<img class="pull-left upload-picture" src="/assets/default-img.png" />
|
||||
<% end %>
|
||||
</div>
|
||||
<span class="alert widgetInfo"><%= t("ad.widget_info_for_ad_image_size", :best_size=> "290px x 150px") %></span>
|
||||
<span class="alert widgetInfo"><%= t("ad.widget_info_for_ad_image_size", :best_size=> "290px x 230px") %></span>
|
||||
<div class="controls file-upload input-prepend">
|
||||
<%= t(:browse) %>
|
||||
<%= f.file_field :image, :id => "input-upload", :class => '', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>
|
||||
@@ -278,32 +278,29 @@
|
||||
<div id="content-box">
|
||||
<hr />
|
||||
|
||||
<%#= f.datetime_picker :email_sentdate, :picker_type => 'separated', :label => t("announcement.email_sentdate") %>
|
||||
|
||||
<br />
|
||||
|
||||
<br />
|
||||
|
||||
<%= f.label :email_group ,t("announcement.email_group")%>
|
||||
<div class="form-inline">
|
||||
<ul class="nav nav-pills">
|
||||
<% @email_group_data.collect do |k,v| %>
|
||||
<li class="pull-left">
|
||||
<%= check_box_tag 'bulletin[email_group][]', k, (@bulletin.email_group.nil? ? false : @bulletin.email_group.include?(k)), :id => "field-#{k}" %>
|
||||
<label for="field-<%= k %>"><%= v["name"] %></label>
|
||||
<%= hidden_field_tag 'bulletin[email_group][]', '' %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<%= f.label :email_group ,t("announcement.email_group")%>
|
||||
<div class="form-inline">
|
||||
<ul class="nav nav-pills">
|
||||
<% @email_group_data.collect do |k,v| %>
|
||||
<li class="pull-left">
|
||||
<%= check_box_tag 'bulletin[email_group][]', k, (@bulletin.email_group.nil? ? false : @bulletin.email_group.include?(k)), :id => "field-#{k}" %>
|
||||
<label for="field-<%= k %>"><%= v["name"] %></label>
|
||||
<%= hidden_field_tag 'bulletin[email_group][]', '' %>
|
||||
</li>
|
||||
<% end if !@email_group_data.blank? %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<%= f.label :other_mailaddress ,"#{t("announcement.other_mailaddress")}(#{t("announcement.other_mailaddress_note")})"%>
|
||||
<%= f.text_area :other_mailaddress, :class=>"span12", :cols=>"25", :rows=>"10" %>
|
||||
<%= f.label :other_mailaddress ,"#{t("announcement.other_mailaddress")}(#{t("announcement.other_mailaddress_note")})"%>
|
||||
<%= f.text_area :other_mailaddress, :class=>"span12", :cols=>"25", :rows=>"10" %>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
<% # encoding: utf-8 %>
|
||||
|
||||
<%= f.error_messages %>
|
||||
|
||||
<tr id="<%= "bulletin_file_#{form_bulletin_file.id}" if !form_bulletin_file.new_record? %>" class='list_item'>
|
||||
<td>
|
||||
<div class="control-group">
|
||||
|
||||
+2
-2
@@ -6,13 +6,13 @@ xml.rss :version => "2.0" do
|
||||
else
|
||||
xml.title t('announcement.announcement')
|
||||
end
|
||||
xml.link "#{request.protocol}#{request.host_with_port}#{get_bulletins_panel_announcement_back_end_bulletins_path(bulletin_category_id: @category.try(:id))}.rss"
|
||||
xml.link "#{request.protocol}#{request.host_with_port}#{get_bulletins_panel_announcement_back_end_bulletins_path(bulletin_category_id: @category.try(:id), format: 'rss')}"
|
||||
|
||||
@bulletins.each do |bulletin|
|
||||
xml.item do
|
||||
xml.title bulletin.title
|
||||
xml.pubDate bulletin.postdate.to_s(:rfc822)
|
||||
xml.description bulletin.text
|
||||
xml.description bulletin.subtitle
|
||||
xml.link "#{request.protocol}#{request.host_with_port}#{panel_announcement_front_end_bulletin_path(bulletin, category_id: bulletin.bulletin_category.id, locale: I18n.locale)}"
|
||||
xml.guid "#{request.protocol}#{request.host_with_port}#{panel_announcement_front_end_bulletin_path(bulletin)}"
|
||||
end
|
||||
|
||||
@@ -25,6 +25,7 @@ en:
|
||||
file: Attachment
|
||||
file_description: File Description
|
||||
file_name: File Name
|
||||
file_name_not_null: Name cannot be null
|
||||
frontend:
|
||||
bulletins: Announcement front-end
|
||||
search_result: Search result
|
||||
|
||||
@@ -25,6 +25,7 @@ zh_tw:
|
||||
file: 附加檔案
|
||||
file_description: 檔案描述
|
||||
file_name: 檔案名稱
|
||||
file_name_not_null: 名稱不得為空值
|
||||
frontend:
|
||||
bulletins: 公告前台
|
||||
search_result: 搜尋結果頁
|
||||
|
||||
+2
-2
@@ -30,13 +30,13 @@ module Announcement
|
||||
widgets do
|
||||
default_widget do
|
||||
sorting 'desc(:postdate)'
|
||||
query 'Bulletin.available_for_lang(I18n.locale).any_of( {deadline: nil,:postdate.lte => Time.now} , {:deadline.gte => Time.now,:postdate.lte => Time.now} )'
|
||||
query 'Bulletin.can_display.available_for_lang(I18n.locale).any_of( {deadline: nil,:postdate.lte => Time.now} , {:deadline.gte => Time.now,:postdate.lte => Time.now} )'
|
||||
enable ["typeA","typeB_style3","typeC"]
|
||||
image :image
|
||||
field :postdate
|
||||
link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self,:preview=>true}
|
||||
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:bulletin_category,:id]}}
|
||||
field :subtitle
|
||||
link_field :subtitle,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self,:preview=>true}
|
||||
field :bulletin_create_dept
|
||||
link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus'
|
||||
end
|
||||
|
||||
Vendored
+3
-3
@@ -126,9 +126,9 @@ class Panel::ErEmail::BackEnd::EmailErsController < OrbitBackendController
|
||||
respond_to do |format|
|
||||
if @email_er.save
|
||||
|
||||
# if @email_er.is_checked == true and !@email_er.is_rejected
|
||||
# send_email_data(@email_er)
|
||||
# end
|
||||
if @email_er.is_checked == true and !@email_er.is_rejected
|
||||
send_email_data(@email_er)
|
||||
end
|
||||
|
||||
format.html { redirect_to(panel_er_email_back_end_email_ers_url) }
|
||||
format.xml { render :xml => @email_er, :status => :created, :location => @email_er }
|
||||
|
||||
+3
-2
@@ -77,13 +77,14 @@ class EmailEr
|
||||
|
||||
if email_group_data.include?(egroup) and (egroup == '0' or egroup == '1' or egroup == '2' or egroup == '3')
|
||||
|
||||
group_mail << "#{email_group_data[egroup]["email"]}(#{email_group_data[egroup]["name"]})"
|
||||
#group_mail << "#{email_group_data[egroup]["email"]}(#{email_group_data[egroup]["name"]})"
|
||||
group_mail << "#{email_group_data[egroup]["name"]}"
|
||||
|
||||
elsif email_group_data.include?(egroup) and egroup == '4'
|
||||
|
||||
self.other_mailaddress.split(",").each do |otmail|
|
||||
|
||||
group_mail << "#{otmail}(#{email_group_data[egroup]["name"]})"
|
||||
group_mail << "#{otmail}(#{email_group_data[egroup]["name"]})"
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class EmailErFile
|
||||
private
|
||||
|
||||
def file_size
|
||||
if file.file.size > 1.megabytes
|
||||
if file.file.size > 10.megabytes
|
||||
errors.add( :file, I18n.t("er_email.email_file_limit"))
|
||||
end
|
||||
end
|
||||
|
||||
Vendored
+1
-1
@@ -105,7 +105,7 @@
|
||||
$(document).ready(function() {
|
||||
$('#add_plugin_file a.add').live('click', function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_add_plugin_files", "g");
|
||||
var old_id = new RegExp("new_email_er_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
$(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :email_er_files) %>").replace(old_id, new_id));
|
||||
});
|
||||
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Vendored
+1
-1
@@ -3,7 +3,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
||||
|
||||
# before_filter :force_order_for_user, :except => [:index,:get_album_json,:get_imgs_json]
|
||||
|
||||
before_filter :force_order_for_visitor,:only=>[:index,:show,:get_album_json,:get_imgs_json,:get_albums,:imgs]
|
||||
before_filter :force_order_for_visitor,:only=>[:index,:show,:get_albums,:imgs]
|
||||
before_filter :force_order_for_user,:except => [:index,:show,:get_album_json,:get_imgs_json,:get_albums,:imgs]
|
||||
before_filter :for_app_sub_manager,:except => [:index,:show,:get_album_json,:get_imgs_json,:get_albums,:imgs]
|
||||
# before_filter lambda
|
||||
|
||||
Vendored
+3
@@ -5,6 +5,9 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
||||
def show
|
||||
@album = GalleryAlbum.find(params[:id])
|
||||
@tags = Tag.find(@album.tagged_ids).map{|t| t.name}
|
||||
respond_to do |format|
|
||||
format.json { render json: @album }
|
||||
end
|
||||
end
|
||||
|
||||
def get_albums
|
||||
|
||||
+27
-4
@@ -9,15 +9,38 @@ class Panel::Gallery::Widget::AlbumsController < OrbitWidgetController
|
||||
@album = GalleryAlbum.find(@part.widget_options['album_id']) rescue nil
|
||||
@album_images = @album.gallery_images if @album
|
||||
|
||||
|
||||
@settings = {"vertical"=>vertical,"horizontal"=>horizontal} #[note] horizontal has it's limitation from 2 to 6
|
||||
@class = "c" + @settings["horizontal"].to_s
|
||||
@total = @settings["vertical"] * @settings["horizontal"]
|
||||
@rnd = Random.new
|
||||
@images = []
|
||||
for i in 0..@total-1
|
||||
image = @album_images[@rnd.rand(0...@album_images.count)]
|
||||
values = {"show_link"=>theater_panel_gallery_front_end_album_path(image),"thumb"=>image.file.thumb.url}
|
||||
@images << values
|
||||
|
||||
if @album_images.count > @total
|
||||
@randoms = []
|
||||
until @randoms.count == @total do
|
||||
r = @rnd.rand(0...@album_images.count)
|
||||
if !@randoms.include?r
|
||||
@randoms << r
|
||||
image = @album_images[r]
|
||||
values = {"show_link"=>theater_panel_gallery_front_end_album_path(image),"thumb"=>image.file.thumb.url}
|
||||
@images << values
|
||||
end
|
||||
end
|
||||
elsif @album_images.count == @total
|
||||
@album_images.each do |image|
|
||||
values = {"show_link"=>theater_panel_gallery_front_end_album_path(image),"thumb"=>image.file.thumb.url}
|
||||
@images << values
|
||||
end
|
||||
else
|
||||
@album_images.each do |image|
|
||||
values = {"show_link"=>theater_panel_gallery_front_end_album_path(image),"thumb"=>image.file.thumb.url}
|
||||
@images << values
|
||||
end
|
||||
until @images.count == @total do
|
||||
values = {"show_link"=>"javascript:void(0);","thumb"=>"assets/gallery/nodata.jpg"}
|
||||
@images << values
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+16
@@ -33,4 +33,20 @@ class Panel::Location::BackEnd::LocationCategoriesController < OrbitBackendContr
|
||||
render :json=>{"success"=>"true"}.to_json
|
||||
end
|
||||
|
||||
def get_location_categories
|
||||
location_categories = LocationCategory.all
|
||||
@data = Array.new
|
||||
|
||||
location_categories.each do |category|
|
||||
I18n.locale = :en
|
||||
name_en = category.name
|
||||
I18n.locale = :zh_tw
|
||||
name_zh_tw = category.name
|
||||
category_id = category.id.to_s
|
||||
@data << { name_en: name_en, name_zh_tw: name_zh_tw, category_id: category_id, location_link: "http://ntue.tp.rulingcom.com/panel/location/back_end/locations/get_categorywise_locations?category_id=#{category_id}"}
|
||||
end
|
||||
|
||||
render :json => JSON.pretty_generate(@data)
|
||||
end
|
||||
|
||||
end
|
||||
Vendored
+22
-1
@@ -2,7 +2,7 @@ class Panel::Location::BackEnd::LocationsController < OrbitBackendController
|
||||
include AdminHelper
|
||||
|
||||
before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :create, :update, :delete]
|
||||
before_filter :force_order_for_user,:except => [:get_locations,:index]
|
||||
before_filter :force_order_for_user,:except => [:get_locations,:index,:get_categorywise_locations]
|
||||
|
||||
def index
|
||||
@location_infos = LocationInfo.all
|
||||
@@ -73,4 +73,25 @@ class Panel::Location::BackEnd::LocationsController < OrbitBackendController
|
||||
|
||||
render :json => JSON.pretty_generate({location: @data})
|
||||
end
|
||||
|
||||
def get_categorywise_locations
|
||||
location_infos = LocationInfo.where(:location_category_id => params[:category_id])
|
||||
@data = Array.new
|
||||
|
||||
location_infos.each do |location|
|
||||
|
||||
picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}"
|
||||
thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}"
|
||||
|
||||
@data << { id: location.id.to_s,
|
||||
name: location.name,
|
||||
pic_url: picurl,
|
||||
thumb_url: thumburl,
|
||||
longitude: location.longitude,
|
||||
latitude: location.latitude,
|
||||
description: location.description }
|
||||
end
|
||||
|
||||
render :json => JSON.pretty_generate(@data)
|
||||
end
|
||||
end
|
||||
+4
-1
@@ -4,9 +4,12 @@ Rails.application.routes.draw do
|
||||
namespace :back_end do
|
||||
|
||||
match "locations/get_locations" => "locations#get_locations"
|
||||
match "locations/get_categorywise_locations" => "locations#get_categorywise_locations"
|
||||
|
||||
resources :locations
|
||||
resources :location_categories
|
||||
resources :location_categories, :except => [:show]
|
||||
match "location_categories/get_location_categories" => "location_categories#get_location_categories"
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Vendored
+45
-2
@@ -1,6 +1,6 @@
|
||||
class Panel::Video::BackEnd::ChannelVideosController < OrbitBackendController
|
||||
before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete]
|
||||
before_filter :force_order_for_user,:except => [:index]
|
||||
before_filter :force_order_for_user,:except => [:index, :get_channel_videos, :get_channels]
|
||||
|
||||
def index
|
||||
@channel_videos = ChannelVideo.all
|
||||
@@ -17,7 +17,7 @@ class Panel::Video::BackEnd::ChannelVideosController < OrbitBackendController
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render json: @location }
|
||||
format.json { render json: @channel_videos }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -55,4 +55,47 @@ class Panel::Video::BackEnd::ChannelVideosController < OrbitBackendController
|
||||
redirect_to panel_video_back_end_channel_videos_url
|
||||
|
||||
end
|
||||
|
||||
def get_channels
|
||||
@channels = ChannelVideo.all
|
||||
@data = Array.new
|
||||
|
||||
@channels.each do |channel|
|
||||
client = YouTubeIt::Client.new(:dev_key => "AI39si5KGPg8rhKLBfmeukit2tCSP_B9lT8igiNICbrbgUXQoAdYGvsyCGCmO1wGnr1OW4bDRv-ESolwk-rdBNIAgVTL9VYaEA")
|
||||
@client_videos = client.videos_by(:user => channel.channel_name)
|
||||
number_of_videos = @client_videos.videos.length
|
||||
name = channel.channel_name
|
||||
channel_id = channel.id.to_s
|
||||
@data << { channel_name: name, channel_link: "http://ntue.tp.rulingcom.com/panel/video/back_end/channel_videos/get_channel_videos?channel_id=#{channel_id}", number_of_videos: number_of_videos }
|
||||
end
|
||||
|
||||
render :json => JSON.pretty_generate(@data)
|
||||
end
|
||||
|
||||
def get_channel_videos
|
||||
@channel_video = ChannelVideo.where(:_id => params[:channel_id])
|
||||
@channel_video.each do |channel|
|
||||
client = YouTubeIt::Client.new(:dev_key => "AI39si5KGPg8rhKLBfmeukit2tCSP_B9lT8igiNICbrbgUXQoAdYGvsyCGCmO1wGnr1OW4bDRv-ESolwk-rdBNIAgVTL9VYaEA")
|
||||
@client_videos = client.videos_by(:user => channel.channel_name)
|
||||
@data = Array.new
|
||||
|
||||
|
||||
@client_videos.videos.each do |video|
|
||||
# url = video.player_url
|
||||
title = video.title
|
||||
description = video.description
|
||||
author = video.author.name
|
||||
channel_name = channel.channel_name
|
||||
video.media_content.each do |m|
|
||||
if m.mime_type == "video/3gpp"
|
||||
@url = m.url
|
||||
end
|
||||
end
|
||||
# category_id = category.id.to_s
|
||||
@data << { title: title, description: description, url: @url, author: author, channel_name: channel_name}
|
||||
end
|
||||
|
||||
render :json => JSON.pretty_generate(@data)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -4,6 +4,9 @@ Rails.application.routes.draw do
|
||||
namespace :back_end do
|
||||
match "videos/get_videos" => "videos#get_videos"
|
||||
resources :videos
|
||||
match "channel_videos/get_channels" => "channel_videos#get_channels"
|
||||
match "channel_videos/get_channel_videos" => "channel_videos#get_channel_videos"
|
||||
|
||||
resources :channel_videos
|
||||
end
|
||||
|
||||
|
||||
vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.html.erb
Vendored
+2
@@ -10,11 +10,13 @@
|
||||
<div class="o-links-list">
|
||||
<ul>
|
||||
<% web_links.page(params[:page_main]).per(@page_num).each do |web_link| %>
|
||||
<% if !web_link.title.blank? %>
|
||||
<li>
|
||||
<%= link_to web_link.title, web_link.url, {:target => '_blank', :title => web_link.title, :class=>"o-links-title"} %>
|
||||
<div class="o-links-description"><%= web_link.context %></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
Reference in new issue
Block a user