Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17d40d3e08 | ||
|
|
048f67c6da | ||
|
|
9849b5c7dd | ||
|
|
3999308bb4 | ||
|
|
ee2adf2121 | ||
|
|
363ea53861 | ||
|
|
b7ea756789 | ||
|
|
839743779b | ||
|
|
f8c7e8f17a |
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 12 KiB |
+11
-11
@@ -101,8 +101,8 @@ div[data-role="page"] {
|
|||||||
border: none;
|
border: none;
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
/*background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545b60), to(#191a1c));*/
|
/*background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545b60), to(#191a1c));*/
|
||||||
background-image: -webkit-linear-gradient(top, #5282A6, #133757);
|
background-image: -webkit-linear-gradient(top, #6D35AF, #391C69);
|
||||||
-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;
|
-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 {
|
.header h1.ui-title {
|
||||||
margin: 8px 30%;
|
margin: 8px 30%;
|
||||||
@@ -116,9 +116,9 @@ div[data-role="page"] {
|
|||||||
margin-left: -15px;
|
margin-left: -15px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
/*color: #727272;*/
|
/*color: #727272;*/
|
||||||
color: #7CA6C5;
|
color: #C5A7D3;
|
||||||
/*background-color: #252525;*/
|
/*background-color: #252525;*/
|
||||||
background-color: #144366;
|
background-color: #38177F;
|
||||||
border-radius: 0 0 5px 5px;
|
border-radius: 0 0 5px 5px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
@@ -135,14 +135,14 @@ div[data-role="page"] {
|
|||||||
background-image: none;
|
background-image: none;
|
||||||
}
|
}
|
||||||
.header .ui-btn-up-a {
|
.header .ui-btn-up-a {
|
||||||
border: 1px solid #133547;
|
border: 1px solid #7220A0;
|
||||||
background-color: #0C4C64;
|
background-color: #9B2DCF;
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, from( #0D6691 ), to( #0E3A4B ));
|
background-image: -webkit-gradient(linear, left top, left bottom, from( #0D6691 ), to( #0E3A4B ));
|
||||||
background-image: -webkit-linear-gradient( #0D6691 , #0E3A4B );
|
background-image: -webkit-linear-gradient(#9B1DF0, #5F2879);
|
||||||
background-image: -moz-linear-gradient( #0D6691 , #0E3A4B );
|
background-image: -moz-linear-gradient(#9B1DF0, #5F2879);
|
||||||
background-image: -ms-linear-gradient( #0D6691 , #0E3A4B );
|
background-image: -ms-linear-gradient(#9B1DF0, #5F2879);
|
||||||
background-image: -o-linear-gradient( #0D6691 , #0E3A4B );
|
background-image: -o-linear-gradient(#9B1DF0, #5F2879);
|
||||||
background-image: linear-gradient( #0D6691 , #0E3A4B );
|
background-image: linear-gradient(#9B1DF0, #5F2879);
|
||||||
}
|
}
|
||||||
.header h1 img {
|
.header h1 img {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
@@ -220,7 +220,7 @@ module ApplicationHelper
|
|||||||
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-search.js'></script>\n"
|
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-search.js'></script>\n"
|
||||||
end
|
end
|
||||||
javascripts << "<script type='text/javascript' src='/assets/lib/jquery.preload-min.js'></script>\n"
|
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='/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/social-share-button.js'></script>\n"
|
||||||
javascripts << "<script type='text/javascript' src='/assets/lib/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
|
mount_uploader :avatar, AvatarUploader
|
||||||
|
|
||||||
field :admin, :type => Boolean, :default => true
|
field :admin, :type => Boolean, :default => false
|
||||||
field :active_role
|
field :active_role
|
||||||
field :user_id
|
field :user_id
|
||||||
field :sid
|
field :sid
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
<%= javascript_include_tag "lib/jquery.cycle.all.latest.js"%>
|
|
||||||
<div style='position:relative'>
|
<div style='position:relative'>
|
||||||
<ul id='banner_nav' class='clear banner_nav-<%= @ad_banner.title.dehumanize %>'></ul>
|
<ul id='banner_nav' class='clear banner_nav-<%= @ad_banner.title.dehumanize %>'></ul>
|
||||||
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>
|
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>
|
||||||
@@ -12,7 +11,11 @@
|
|||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
var banner = {"banner_name":"#slideshow-<%= @ad_banner.title.dehumanize %>",
|
var banner = {"banner_name":"#slideshow-<%= @ad_banner.title.dehumanize %>",
|
||||||
"banner_fx":"<%= @ad_banner.ad_fx.nil? ? 'fade': @ad_banner.ad_fx %>",
|
"banner_fx":"<%= @ad_banner.ad_fx.nil? ? 'fade': @ad_banner.ad_fx %>",
|
||||||
"banner_pager":".banner_nav-<%= @ad_banner.title.dehumanize %>"
|
"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);
|
banners.push(banner);
|
||||||
</script>
|
</script>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<ul class='list'>
|
<ul class='list'>
|
||||||
<% @menu_page.visible_children.each do |child| %>
|
<% @menu_page.visible_children.each do |child| %>
|
||||||
<li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>">
|
<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>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
+59
-54
@@ -1,67 +1,72 @@
|
|||||||
var banners = [];
|
var banners = [];
|
||||||
var banner_index = 0;
|
var banner_index = 0;
|
||||||
|
$q = jQuery;
|
||||||
|
$q.getScript('/static/jquery.cycle.all.latest.js');
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$.each($(".dymanic_load"),function(){
|
$.each($(".dymanic_load"),function(){
|
||||||
if($(this).attr("path")==''){$(this).html("App setting Failed");}
|
if($(this).attr("path")==''){$(this).html("App setting Failed");}
|
||||||
if($(this).attr("path")!=''){
|
if($(this).attr("path")!=''){
|
||||||
if($(this).attr("path").indexOf("show_banner")>0){
|
if($(this).attr("path").indexOf("show_banner")>0){
|
||||||
ajax_load_proc($(this),$(this).attr("path"),"true");
|
ajax_load_proc($(this),$(this).attr("path"),"true");
|
||||||
}else{
|
}else{
|
||||||
ajax_load_proc($(this),$(this).attr("path"),$(this).attr("path"));
|
ajax_load_proc($(this),$(this).attr("path"),$(this).attr("path"));
|
||||||
}
|
}
|
||||||
}});
|
}});
|
||||||
$("#main_content").addClass("module");
|
$("#main_content").addClass("module");
|
||||||
});
|
});
|
||||||
|
|
||||||
function ajax_load_proc(wapper,url,isBanner){
|
function ajax_load_proc(wapper,url,isBanner){
|
||||||
$.get(encodeURI(url), {}, function(respText,textSta,XML){
|
$.get(encodeURI(url), {}, function(respText,textSta,XML){
|
||||||
if (textSta == 'success') {
|
if (textSta == 'success') {
|
||||||
if(isBanner=="true"){
|
if(isBanner=="true"){
|
||||||
wapper.html(respText);
|
wapper.html(respText);
|
||||||
setTimeout("BannerCycle()", 2500);
|
var banner = banners[banner_index];
|
||||||
}else{
|
if($(banner.banner_name+" img").length>1){
|
||||||
wapper.html(respText);
|
$(banner.banner_name+" > img").each(function(){
|
||||||
}
|
$(this).load(function(){ banner.image_loaded++; });
|
||||||
};
|
});
|
||||||
if(textSta == 'error')
|
BannerCycle(banner_index);
|
||||||
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
|
}
|
||||||
});
|
banner_index++;
|
||||||
|
}else{
|
||||||
|
wapper.html(respText);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if(textSta == 'error')
|
||||||
|
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function BannerCycle(){
|
function BannerCycle(banner_index){
|
||||||
var banner = banners[banner_index];
|
var banner = banners[banner_index];
|
||||||
banner_index++;
|
if (banner.image_loaded==$(banner.banner_name+" img").length){
|
||||||
$(banner.banner_name).ready(function() {
|
$q(banner.banner_name).cycle({
|
||||||
$(banner.banner_name).cycle({
|
delay: -1000,
|
||||||
delay: -1000,
|
fx: banner.banner_fx,
|
||||||
fx: banner.banner_fx,
|
timeout: banner.time_to_next,
|
||||||
timeoutFn: getTimeout,
|
pager: banner.banner_pager,
|
||||||
pager: banner.banner_pager,
|
pagerAnchorBuilder: function(idx, slide) { return "<li><a href='#'></a></li>"; }
|
||||||
pagerAnchorBuilder: function(idx, slide) { return "<li><a href='#'></a></li>"; }
|
});
|
||||||
});
|
}else{
|
||||||
});
|
setTimeout("BannerCycle("+banner_index+")",500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ad Banner FX code [start]
|
|
||||||
function getTimeout() {
|
|
||||||
return $(this).attr('time_to_next');
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(document).on('click', '.slideshow img', function()
|
$(document).on('click', '.slideshow img', function()
|
||||||
{
|
{
|
||||||
if($(this).attr('link_url')!='')
|
if($(this).attr('link_url')!='')
|
||||||
{
|
{
|
||||||
if($(this).attr('link_open')=='new_window')
|
if($(this).attr('link_open')=='new_window')
|
||||||
{
|
{
|
||||||
window.open($(this).attr('link_url'));
|
window.open($(this).attr('link_url'));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
document.location.href=$(this).attr('link_url')
|
document.location.href=$(this).attr('link_url')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
// Ad Banner FX code [end]
|
// Ad Banner FX code [end]
|
||||||
+19
-10
@@ -23,6 +23,9 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||||||
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
||||||
|
email_group_data
|
||||||
|
|
||||||
# @bulletins = Bulletin.all
|
# @bulletins = Bulletin.all
|
||||||
# @bulletins = Bulletin.desc("postdate desc")
|
# @bulletins = Bulletin.desc("postdate desc")
|
||||||
get_categorys('BulletinCategory',params[:bulletin_category_id])
|
get_categorys('BulletinCategory',params[:bulletin_category_id])
|
||||||
@@ -116,6 +119,9 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||||||
# POST /bulletins
|
# POST /bulletins
|
||||||
# POST /bulletins.xml
|
# POST /bulletins.xml
|
||||||
def create
|
def create
|
||||||
|
|
||||||
|
email_group_data
|
||||||
|
|
||||||
@tags = get_tags
|
@tags = get_tags
|
||||||
if params[:bulletin_link]
|
if params[:bulletin_link]
|
||||||
|
|
||||||
@@ -153,12 +159,12 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @bulletin.save
|
if @bulletin.save
|
||||||
|
|
||||||
# if @bulletin.email_sent == true && @bulletin.is_checked == true && !@bulletin.is_rejected
|
if @bulletin.email_sent == true && @bulletin.is_checked == true && !@bulletin.is_rejected
|
||||||
# send_email_data(@bulletin)
|
send_email_data(@bulletin)
|
||||||
|
|
||||||
# @bulletin.email_sent = false
|
@bulletin.email_sent = false
|
||||||
# @bulletin.save
|
@bulletin.save
|
||||||
# end
|
end
|
||||||
|
|
||||||
format.html { redirect_to(panel_announcement_back_end_bulletins_url, :notice => t('announcement.create_bulletin_success')) }
|
format.html { redirect_to(panel_announcement_back_end_bulletins_url, :notice => t('announcement.create_bulletin_success')) }
|
||||||
format.xml { render :xml => @bulletin, :status => :created, :location => @bulletin }
|
format.xml { render :xml => @bulletin, :status => :created, :location => @bulletin }
|
||||||
@@ -221,6 +227,8 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
||||||
|
email_group_data
|
||||||
|
|
||||||
@bulletin = Bulletin.find(params[:id])
|
@bulletin = Bulletin.find(params[:id])
|
||||||
|
|
||||||
# @bulletin.image.clear if params[:bulletin][:image_del] == '1'
|
# @bulletin.image.clear if params[:bulletin][:image_del] == '1'
|
||||||
@@ -241,12 +249,12 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||||||
@bulletin.de_pending!
|
@bulletin.de_pending!
|
||||||
end
|
end
|
||||||
|
|
||||||
# if @bulletin.email_sent == true && @bulletin.is_checked == true && !@bulletin.is_rejected
|
if @bulletin.email_sent == true && @bulletin.is_checked == true && !@bulletin.is_rejected
|
||||||
# send_email_data(@bulletin)
|
send_email_data(@bulletin)
|
||||||
|
|
||||||
# @bulletin.email_sent = false
|
@bulletin.email_sent = false
|
||||||
# @bulletin.save
|
@bulletin.save
|
||||||
# end
|
end
|
||||||
|
|
||||||
# if (params[:bulletin][:is_checked] == "false")
|
# if (params[:bulletin][:is_checked] == "false")
|
||||||
# @bulletin.is_rejected = true
|
# @bulletin.is_rejected = true
|
||||||
@@ -395,6 +403,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||||||
:mail_from_app => 'announcement',
|
:mail_from_app => 'announcement',
|
||||||
:mail_from => @user.email,
|
:mail_from => @user.email,
|
||||||
:mail_reply_to => @user.email,
|
:mail_reply_to => @user.email,
|
||||||
|
:mail_subject => "#{t("announcement.mail_subject")}:",
|
||||||
:mail_subject => "#{t("announcement.mail_subject",:site_title => @site.title)}:#{bulletin.title}",
|
:mail_subject => "#{t("announcement.mail_subject",:site_title => @site.title)}:#{bulletin.title}",
|
||||||
:mail_to => @group_mail.join(','),
|
:mail_to => @group_mail.join(','),
|
||||||
:mail_content => @mail_content ,
|
:mail_content => @mail_content ,
|
||||||
|
|||||||
@@ -11,4 +11,14 @@ class BulletinFile
|
|||||||
|
|
||||||
belongs_to :bulletin
|
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
|
end
|
||||||
Vendored
+21
-20
@@ -22,7 +22,11 @@
|
|||||||
<img class="pull-left upload-picture" src="/assets/default-img.png" />
|
<img class="pull-left upload-picture" src="/assets/default-img.png" />
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</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(w) x 230px(h)") %>
|
||||||
|
<br />
|
||||||
|
<%= t("announcement.image_upload_size_note", :image_upload_size =>'900kb') %>
|
||||||
|
</span>
|
||||||
<div class="controls file-upload input-prepend">
|
<div class="controls file-upload input-prepend">
|
||||||
<%= t(:browse) %>
|
<%= t(:browse) %>
|
||||||
<%= f.file_field :image, :id => "input-upload", :class => '', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>
|
<%= f.file_field :image, :id => "input-upload", :class => '', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>
|
||||||
@@ -278,32 +282,29 @@
|
|||||||
<div id="content-box">
|
<div id="content-box">
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<%#= f.datetime_picker :email_sentdate, :picker_type => 'separated', :label => t("announcement.email_sentdate") %>
|
|
||||||
|
<br />
|
||||||
<br />
|
|
||||||
|
|
||||||
<%= f.label :email_group ,t("announcement.email_group")%>
|
<%= f.label :email_group ,t("announcement.email_group")%>
|
||||||
<div class="form-inline">
|
<div class="form-inline">
|
||||||
<ul class="nav nav-pills">
|
<ul class="nav nav-pills">
|
||||||
<% @email_group_data.collect do |k,v| %>
|
<% @email_group_data.collect do |k,v| %>
|
||||||
<li class="pull-left">
|
<li class="pull-left">
|
||||||
<%= check_box_tag 'bulletin[email_group][]', k, (@bulletin.email_group.nil? ? false : @bulletin.email_group.include?(k)), :id => "field-#{k}" %>
|
<%= 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>
|
<label for="field-<%= k %>"><%= v["name"] %></label>
|
||||||
<%= hidden_field_tag 'bulletin[email_group][]', '' %>
|
<%= hidden_field_tag 'bulletin[email_group][]', '' %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end if !@email_group_data.blank? %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<%= f.label :other_mailaddress ,"#{t("announcement.other_mailaddress")}(#{t("announcement.other_mailaddress_note")})"%>
|
<%= 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.text_area :other_mailaddress, :class=>"span12", :cols=>"25", :rows=>"10" %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+2
@@ -1,5 +1,7 @@
|
|||||||
<% # encoding: utf-8 %>
|
<% # encoding: utf-8 %>
|
||||||
|
|
||||||
|
<%= f.error_messages %>
|
||||||
|
|
||||||
<tr id="<%= "bulletin_file_#{form_bulletin_file.id}" if !form_bulletin_file.new_record? %>" class='list_item'>
|
<tr id="<%= "bulletin_file_#{form_bulletin_file.id}" if !form_bulletin_file.new_record? %>" class='list_item'>
|
||||||
<td>
|
<td>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ en:
|
|||||||
file: Attachment
|
file: Attachment
|
||||||
file_description: File Description
|
file_description: File Description
|
||||||
file_name: File Name
|
file_name: File Name
|
||||||
|
file_name_not_null: Name cannot be null
|
||||||
frontend:
|
frontend:
|
||||||
bulletins: Announcement front-end
|
bulletins: Announcement front-end
|
||||||
search_result: Search result
|
search_result: Search result
|
||||||
@@ -48,11 +49,13 @@ en:
|
|||||||
email_group_data_2: Postgraduates
|
email_group_data_2: Postgraduates
|
||||||
email_group_data_3: Continuing Ed. Postgraduates
|
email_group_data_3: Continuing Ed. Postgraduates
|
||||||
email_group_data_4: Other
|
email_group_data_4: Other
|
||||||
mail_subject: this is an announcement reminder from【%{site_title}】
|
# mail_subject: this is an announcement reminder from【%{site_title}】
|
||||||
|
mail_subject: 【北教大公告提醒】
|
||||||
other_mailaddress: Other Email
|
other_mailaddress: Other Email
|
||||||
other_mailaddress_note: Divide different email accounts with ","
|
other_mailaddress_note: Divide different email accounts with ","
|
||||||
mail_hi: Hi
|
mail_hi: Hi
|
||||||
mail_url_view: This email is the reminder of an announcement, please click the link for the details
|
mail_url_view: This email is the reminder of an announcement, please click the link for the details
|
||||||
mail_source: Source
|
mail_source: Source
|
||||||
mail_time: Time
|
mail_time: Time
|
||||||
|
image_upload_size_note: The following recommendations %{image_upload_size} upload size
|
||||||
|
|
||||||
@@ -25,6 +25,7 @@ zh_tw:
|
|||||||
file: 附加檔案
|
file: 附加檔案
|
||||||
file_description: 檔案描述
|
file_description: 檔案描述
|
||||||
file_name: 檔案名稱
|
file_name: 檔案名稱
|
||||||
|
file_name_not_null: 名稱不得為空值
|
||||||
frontend:
|
frontend:
|
||||||
bulletins: 公告前台
|
bulletins: 公告前台
|
||||||
search_result: 搜尋結果頁
|
search_result: 搜尋結果頁
|
||||||
@@ -50,10 +51,12 @@ zh_tw:
|
|||||||
email_group_data_2: 日間部研究生
|
email_group_data_2: 日間部研究生
|
||||||
email_group_data_3: 進修部研究生
|
email_group_data_3: 進修部研究生
|
||||||
email_group_data_4: 其他
|
email_group_data_4: 其他
|
||||||
mail_subject: 來自【%{site_title}】的公告事件提醒
|
# mail_subject: 來自【%{site_title}】的公告事件提醒
|
||||||
|
mail_subject: 【北教大公告提醒】
|
||||||
mail_hi: 您好
|
mail_hi: 您好
|
||||||
mail_url_view: 此封信件為公告事件提醒,請點選以下連結詳細觀看
|
mail_url_view: 此封信件為公告事件提醒,請點選以下連結詳細觀看
|
||||||
mail_source: 來源
|
mail_source: 來源
|
||||||
mail_time: 時間
|
mail_time: 時間
|
||||||
|
image_upload_size_note: 建議檔案小於%{image_upload_size}
|
||||||
|
|
||||||
|
|
||||||
Vendored
+2
-1
@@ -83,7 +83,8 @@ class Panel::Location::BackEnd::LocationsController < OrbitBackendController
|
|||||||
picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}"
|
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}"
|
thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}"
|
||||||
|
|
||||||
@data << { name: location.name,
|
@data << { id: location.id.to_s,
|
||||||
|
name: location.name,
|
||||||
pic_url: picurl,
|
pic_url: picurl,
|
||||||
thumb_url: thumburl,
|
thumb_url: thumburl,
|
||||||
longitude: location.longitude,
|
longitude: location.longitude,
|
||||||
|
|||||||
Vendored
+12
-4
@@ -61,9 +61,12 @@ class Panel::Video::BackEnd::ChannelVideosController < OrbitBackendController
|
|||||||
@data = Array.new
|
@data = Array.new
|
||||||
|
|
||||||
@channels.each do |channel|
|
@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
|
name = channel.channel_name
|
||||||
channel_id = channel.id.to_s
|
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}"}
|
@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
|
end
|
||||||
|
|
||||||
render :json => JSON.pretty_generate(@data)
|
render :json => JSON.pretty_generate(@data)
|
||||||
@@ -73,18 +76,23 @@ class Panel::Video::BackEnd::ChannelVideosController < OrbitBackendController
|
|||||||
@channel_video = ChannelVideo.where(:_id => params[:channel_id])
|
@channel_video = ChannelVideo.where(:_id => params[:channel_id])
|
||||||
@channel_video.each do |channel|
|
@channel_video.each do |channel|
|
||||||
client = YouTubeIt::Client.new(:dev_key => "AI39si5KGPg8rhKLBfmeukit2tCSP_B9lT8igiNICbrbgUXQoAdYGvsyCGCmO1wGnr1OW4bDRv-ESolwk-rdBNIAgVTL9VYaEA")
|
client = YouTubeIt::Client.new(:dev_key => "AI39si5KGPg8rhKLBfmeukit2tCSP_B9lT8igiNICbrbgUXQoAdYGvsyCGCmO1wGnr1OW4bDRv-ESolwk-rdBNIAgVTL9VYaEA")
|
||||||
@client_videos = client.videos_by(:user => channel.channel_name, :per_page => 5)
|
@client_videos = client.videos_by(:user => channel.channel_name)
|
||||||
@data = Array.new
|
@data = Array.new
|
||||||
|
|
||||||
|
|
||||||
@client_videos.videos.each do |video|
|
@client_videos.videos.each do |video|
|
||||||
url = video.player_url
|
# url = video.player_url
|
||||||
title = video.title
|
title = video.title
|
||||||
description = video.description
|
description = video.description
|
||||||
author = video.author.name
|
author = video.author.name
|
||||||
channel_name = channel.channel_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
|
# category_id = category.id.to_s
|
||||||
@data << { title: title, description: description, url: url, author: author, channel_name: channel_name}
|
@data << { title: title, description: description, url: @url, author: author, channel_name: channel_name}
|
||||||
end
|
end
|
||||||
|
|
||||||
render :json => JSON.pretty_generate(@data)
|
render :json => JSON.pretty_generate(@data)
|
||||||
|
|||||||
Reference in new issue
Block a user