Compare commits

...

28 Commits
master ... fgu

Author SHA1 Message Date
Manson Wang da874c582a Change annoucement share button position 2013-11-21 17:30:08 +08:00
Manson Wang 9837dd8f69 Fix FB share button link 2013-11-19 15:21:14 +08:00
Manson Wang b5d1809523 Revert "Fix FB share button link"
This reverts commit 91022f6010.
2013-11-19 11:49:40 +08:00
Manson Wang 5437848ac4 Revert "Fix FB share button link"
This reverts commit 320c6f6736.
2013-11-19 11:49:24 +08:00
Manson Wang 320c6f6736 Fix FB share button link 2013-11-14 14:58:46 +08:00
Manson Wang 91022f6010 Fix FB share button link 2013-11-14 13:57:46 +08:00
Manson Wang 70c3afed01 Fix annoucement FB share link 2013-11-14 11:40:28 +08:00
Manson Wang 946dc0621b Update Remote annoucement, annoucement will be deleted when remote site disabled or deleted it 2013-10-18 17:51:15 +08:00
Manson Wang 47894ab6f3 Fix Ad_Banner z-index 2013-10-18 15:54:50 +08:00
chris befb511492 Domain absolute url for tinymce files 2013-10-17 17:46:28 +08:00
Manson Wang 56ef57cdd8 Ad_Banner fix for FGU 2013-10-14 19:07:32 +08:00
Manson Wang 3b0dc9cd50 Fix Ad_Banner Image loading bug 2013-10-14 09:52:14 +08:00
Spen 35733da7ba FGU remote_annoucement url and files fix 2013-10-04 10:59:51 +08:00
Manson Wang 42decd3ff4 Ad_banner fixed 2013-10-02 15:55:52 +08:00
Manson Wang 8200baddbb Fix bugs for FGU remote_annoucement
Added Subtitle support
Handle when there is content in subtitle but no content in text field
2013-10-02 11:12:00 +08:00
Manson Wang f715924929 Fix bugs for FGU remote_annoucement
Handle exception when category is missing
2013-10-02 10:27:15 +08:00
Manson Wang f851ad0e27 Fix bugs for FGU remote_annoucement
Added english support
Skip data with blank title
2013-10-02 09:45:48 +08:00
Manson Wang e2d09c7379 Fix Ad_Banner Loading Problem (Not complete) 2013-10-01 09:25:38 +08:00
Harry Bomrah e5ea34d088 fixed external links opening in different window 2013-09-30 13:40:19 +08:00
Manson Wang 5944a7fcb6 FGU Logo 2013-09-30 13:39:58 +08:00
Manson Wang 341dc67a5f Fix path of jquery.cycle.all.latest.js 2013-09-26 15:58:06 +08:00
Manson Wang 25c1f191b2 Added read rss2 annoucement feature 2013-09-26 13:40:35 +08:00
Manson Wang 926102bf72 Fix module web_resource front_end display skip blank title 2013-09-25 19:21:42 +08:00
Harry Bomrah 1b5f6a79c7 widget link fixed on homepage 2013-09-25 17:50:37 +08:00
Harry Bomrah eb8495bcbd widget code rewritten for gallery master branch 2013-09-25 16:39:00 +08:00
Harry Bomrah 5899a0f0d9 ad_banner banner load fixed for test site 2013-09-25 16:38:48 +08:00
chris 042acadbdb Fix parser_front_end.rb for page content 2013-09-17 18:00:30 +08:00
Spen f6a1070b78 fgu login sso 2013-09-13 16:40:28 +08:00
22 changed files with 388 additions and 68 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -8,7 +8,9 @@ window.SocialShareButton =
title = encodeURIComponent($(el).parent().data('title'))
img = encodeURIComponent($(el).parent().data("img"))
fb_url = encodeURIComponent($(el).parent().data("fb_url"))
summary = encodeURIComponent($(el).parent().data("summary"))
url = encodeURIComponent(location.href)
console.log($(el).parent().data())
switch site
when "weibo"
SocialShareButton.openUrl("http://v.t.sina.com.cn/share/share.php?url=#{url}&pic=#{img}&title=#{title}&content=utf-8")
@ -17,7 +19,7 @@ window.SocialShareButton =
when "douban"
SocialShareButton.openUrl("http://www.douban.com/recommend/?url=#{url}&title=#{title}&image=#{img}")
when "facebook"
SocialShareButton.openUrl("http://www.facebook.com/sharer.php?t=#{title}&u=#{fb_url}")
SocialShareButton.openUrl("http://www.facebook.com/sharer.php?s=100&p[title]=#{title}&p[url]=#{fb_url}&p[images][0]=#{img}")
when "qq"
SocialShareButton.openUrl("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=#{url}&title=#{title}&pics=#{img}")
when "tqq"

View File

@ -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",

View File

@ -101,7 +101,7 @@ 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);
background-image: -webkit-linear-gradient(top, #A02C5E, #300E1D);
-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;
}
.header h1.ui-title {
@ -116,9 +116,9 @@ div[data-role="page"] {
margin-left: -15px;
font-size: 20px;
/*color: #727272;*/
color: #7CA6C5;
color: #C57CB3;
/*background-color: #252525;*/
background-color: #144366;
background-color: #421528;
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;
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 );
border: 1px solid #471334;
background-color: #600C64;
background-image: -webkit-gradient(linear, left top, left bottom, from( #910D86 ), to( #490E4B ));
background-image: -webkit-linear-gradient( #910D86 , #490E4B );
background-image: -moz-linear-gradient( #910D86 , #490E4B );
background-image: -ms-linear-gradient( #910D86 , #490E4B );
background-image: -o-linear-gradient( #910D86 , #490E4B );
background-image: linear-gradient( #910D86 , #490E4B );
}
.header h1 img {
height: 30px;

View File

@ -73,7 +73,7 @@ class FrontController < ApplicationController
res << " active" if (current_page.id.eql?(page.id) || current_page.descendant_of?(page))
res << "'>"
root = "/"
res << "<a href='#{(page.class.to_s.eql?('Page') ? root + page.path : page.url)}'><span>#{page.title}</span></a>"
res << "<a href='#{(page.class.to_s.eql?('Page') ? root + page.path : page.url)}' target=#{(page.class.to_s.eql?('Page') ? '_self' : '_blank')} ><span>#{page.title}</span></a>"
if page.visible_children.size > 0 && current < menu.levels
res << "<span class='dot'></span>"
res << menu_level(page, current_page, current + 1, menu)

View File

@ -0,0 +1,59 @@
# encoding: utf-8
class SessionsController < Devise::SessionsController
prepend_before_filter :require_no_authentication, :only => [ :new, :create ]
require 'net/http'
require 'uri'
def create
@user_id = params[:user][:user_id]
if @user_id == 'rulingcom'
resource = User.first(conditions:{user_id: @user_id})
if !resource.blank?
resource_name = resource.class.to_s.downcase
sign_in(resource_name, resource)
redirect_to after_sign_in_path_for(resource)
else
flash[:error] = "很抱歉,您無此權限或帳號登入本站,請洽本站管理員<br />Sorry, you don't have the account or authority to login. Please contact the website administrator."
redirect_to :root
end
else
uri = URI('http://www.fgu.edu.tw/cgi-bin/check_intrant.pl')
response = Net::HTTP.post_form(uri, 'username' => @user_id, 'password' => params[:user][:password])
@response = response.body
if @response.include?("username=#{@user_id}")
resource = User.first(conditions:{user_id: @user_id})
if !resource.blank?
resource_name = resource.class.to_s.downcase
sign_in(resource_name, resource)
redirect_to after_sign_in_path_for(resource)
else
flash[:error] = "很抱歉,您無此權限或帳號登入本站,請洽本站管理員<br />Sorry, you don't have the account or authority to login. Please contact the website administrator."
redirect_to :root
end
else
flash[:error] = "很抱歉,您無此權限或帳號登入本站,請洽本站管理員<br />Sorry, you don't have the account or authority to login. Please contact the website administrator."
redirect_to :root
end
end
end
end

View File

@ -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"

View File

@ -0,0 +1,7 @@
class GetRemoteAnnouncement
@queue = :high
def self.perform()
%x(ruby "#{Rails.root}/lib/remote_announcement.rb")
end
end

View File

@ -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,16 @@
<% 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_count":"<%= @ad_banner.ad_images.length %>",
"image_loaded":0,
"time_to_next":<%= @ad_banner.transition_msec %>,
"current":0,
"best_size": "<%= @ad_banner.best_size %>"
};
banners.push(banner);
</script>

View File

@ -11,7 +11,8 @@ backup_server:
description: BackupServer and remove old backups
update_tag_cloud:
cron: 0 0 [0,12] * * *
# cron: 0 0 [0,12] * * *
cron: 0 0 0 * * *
class: UpdateTagCloud
args:
description: UpdateTagCloud
@ -23,7 +24,14 @@ generate_system_summary:
description: Generate the system status such as disk free space,package version list for showing at site tab
email_cron:
cron: 0 0 [10,16,22] * * *
# cron: 0 0 [10,16,22] * * *
cron: 0 0 10 * * *
class: EmailCron
args:
description: EmailCron
get_remote_announcement:
cron: */5 * * * * *
class: GetRemoteAnnouncement
args:
description: GetRemoteAnnouncement

View File

@ -3,6 +3,8 @@ Orbit::Application.routes.draw do
devise_for :users,:controllers => {:sessions => 'sessions'}
devise_for :users do
match "/users_passwd" => "desktop/registrations#update", :as => :users_passwd, :via => :put
end

View File

@ -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)

150
lib/remote_announcement.rb Normal file
View File

@ -0,0 +1,150 @@
require 'mongo'
require 'open-uri'
require 'json'
require 'date'
@db = Mongo::Connection.new("localhost", 27017).db("fgu_orbit")
@coll_bulletin = @db["bulletins"]
@bulletin_links = @db["bulletin_links"]
@coll_cat = @db["bulletin_categories"]
@updated_bulletins = Array.new
@categories = @coll_cat.find().to_a.inject({}) do |categories, category|
categories[category['key']] = category['_id']
categories
end
def save_bulletin_links bulletin_id, title, url, c_time
title = "Link" if title == ''
bulletin_link = {
title: {"zh_tw" => title, "en" => title },
url: url,
bulletin_id: bulletin_id,
created_at: c_time,
updated_at: c_time
}
@bulletin_links.save(bulletin_link)
end
def get_remote_bulletins_json(url)
data = ""
open(url){|f| f.each_line {|line| data << line} }
bulletins = JSON.parse data
bulletins.each do |b|
lang = b[1]=='zh-tw' ? "zh_tw".to_sym : "en".to_sym
next if b[2]==""
next if @categories["#{b[7]}"].nil?
if b[5]=="" and b[4]!=""
b[5]=b[4]
b[4]=""
end
bulletin = { _type: "Bulletin",
postdate: Time.parse(b[8]),
created_at: Time.parse(b[8]),
updated_at: Time.parse(b[8]),
is_checked: true,
is_pending: false,
is_rejected: false,
bulletin_category_id: @categories["#{b[7]}"],
title: {lang => b[2]},
subtitle: {lang => b[4]},
text: {lang => b[5]},
available_for_zh_tw: true,
available_for_en: true,
create_user_id: "",
public: true,
sn: b[0],
site: b[9],
site_id: b[10],
is_top: false,
is_hot: false,
is_hidden: false }
this_bulletin = @coll_bulletin.find_one(:$and => [{ :sn => bulletin[:sn]},{ :site => bulletin[:site]}])
@updated_bulletins.push({:sn => bulletin[:sn],:site => bulletin[:site] })
# p bulletin
unless this_bulletin
@coll_bulletin.save(bulletin)
#files
(10..14).each do |i|
ta = i + 5
save_bulletin_links( bulletin[:_id], b[ta], b[i], bulletin[:created_at] ) if b[i] != ''
end
#url
save_bulletin_links( bulletin[:_id], '', b[20], bulletin[:created_at] ) if b[20] != ''
# puts "Inserted "+lang.to_s+" "+bulletin[:title][lang]
# p bulletin
else
@coll_bulletin.update(
{"_id"=>this_bulletin["_id"]},
{
:_type => "Bulletin",
:postdate => bulletin[:postdate],
:created_at => bulletin[:created_at],
:updated_at => bulletin[:updated_at],
:is_checked => this_bulletin["is_checked"],
:is_pending => this_bulletin["is_pending"],
:is_rejected => this_bulletin["is_rejected"],
:bulletin_category_id => bulletin[:bulletin_category_id],
:title => bulletin[:title],
:subtitle => bulletin[:subtitle],
:text => bulletin[:text],
:available_for_zh_tw => this_bulletin["available_for_zh_tw"],
:available_for_en => this_bulletin["available_for_en"],
:create_user_id => "",
:public => this_bulletin["public"],
:sn => bulletin[:sn],
:site => bulletin[:site],
:site_id => bulletin[:site_id],
:is_top => this_bulletin["is_top"],
:is_hot => this_bulletin["is_hot"],
:is_hidden => this_bulletin["is_hidden"]
})
@bulletin_links.remove(bulletin_id: BSON::ObjectId(this_bulletin["_id"].to_s) )
#files
(10..14).each do |i|
ta = i + 5
save_bulletin_links( this_bulletin["_id"], b[ta], b[i], this_bulletin["created_at"] ) if b[i] != ''
end
#url
save_bulletin_links( this_bulletin["_id"], '', b[20], bulletin[:created_at] ) if b[20] != ''
# puts "Updated "+lang.to_s+" "+bulletin[:title][lang]
# p this_bulletin["_id"]
end
end
end
get_remote_bulletins_json("http://president.fgu.edu.tw/remote_annoucement/get_news2.php")
get_remote_bulletins_json("http://car.fgu.edu.tw/remote_annoucement/get_news2.php")
# Delete bulletins that had been removed form remote sites
# Find all remote bulletins on server
local_bulletins = @coll_bulletin.find({ site: { :$exists => true } })
# Check if each remote bulletins on server exist in the updated bulletins
local_bulletins.each do |local_bulletin|
result = @updated_bulletins.select {|remote_bulletin| remote_bulletin[:sn] == local_bulletin["sn"] and remote_bulletin[:site] == local_bulletin["site"]}
if result.length == 0
@coll_bulletin.remove(:$and => [{ :sn => local_bulletin["sn"]},{ :site => local_bulletin["site"]}])
p "Delete: "+local_bulletin["site"]+"-"+local_bulletin["sn"]
end
end

View File

@ -1,26 +1,95 @@
var banners = [];
var banner_index = 0;
$q = jQuery;
$q.getScript('/static/jquery.cycle.all.latest.js');
$(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"));
}
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){
function ajax_load_proc(wapper,url,isBanner){
$.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>");
if (textSta == 'success') {
if(isBanner=="true"){
wapper.html(respText);
var banner = banners[banner_index];
$(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>");
});
}
function BannerCycle(banner_index){
var banner = banners[banner_index];
if (banner.image_loaded==$(banner.banner_name+" img").length){
if(banner.banner_name=="#slideshow-banner"){
$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{
var width = banner.best_size.split(" x ")[0];
var height = banner.best_size.split(" x ")[1];
$(banner.banner_name).css( "width", width);
$(banner.banner_name).css( "height", height);
$(banner.banner_name).css( "display", "block");
$(banner.banner_name).css( "overflow", "hidden");
$(banner.banner_name+" > img").each(function(){
$( this ).css( "position", "absolute" );
$( this ).css( "top", "0" );
$( this ).css( "left", "0" );
$( this ).css( "display", "block" );
});
if($(banner.banner_name+" > img").length>1) OrbitCycle(banner_index);
}
}else{
setTimeout("BannerCycle("+banner_index+")",500);
}
}
function OrbitCycle(banner_index){
var banner = banners[banner_index];
var index = 0;
$(banner.banner_name+" > img").each(function(){
if(index==banner.current){
$( this ).css( "z-index", $(banner.banner_name+" img").length+1);
$(this).fadeTo( "slow" , 1);
}else{
$( this ).css( "z-index", index);
$(this).fadeTo( "slow" , 0);
}
index++;
});
if((banner.current+1)<$(banner.banner_name+" img").length){
banner.current++;
}else{
banner.current=0;
}
// console.log("OrbitCycle: "+banner_index);
setTimeout("OrbitCycle("+banner_index+")",banner.time_to_next);
}
// Ad Banner FX code [start]
function getTimeout() {
return $(this).attr('time_to_next');
@ -42,4 +111,4 @@ $(document).ready(function() {
}
})
});
// Ad Banner FX code [end]
// Ad Banner FX code [end]

View File

@ -85,7 +85,7 @@ class Bulletin
end
def share_item
Item.first(conditions:{name: 'announcement'})
Item.first(conditions:{name: 'news'})
end
def proc_check(check,not_pass_info = "")

View File

@ -3,6 +3,7 @@
<div class="info">
<div class="info1">
<span class="pull-right"><%= dislpay_view_count(@bulletin) %></span>
<span class="pull-right"><%= share_links(@bulletin, 'announcement') %></span>
<span class="date"><%= display_date_time(@bulletin.postdate) %></span>
<% unit = @bulletin.cache_dept[I18n.locale.to_s] rescue nil %>
<span><%= link_to unit,panel_announcement_front_end_index_bulletins_by_unit_path(:name=>unit) unless unit.blank? %></span>
@ -38,4 +39,4 @@
<% end %>
</div>
<%= share_links(@bulletin, 'announcement') %>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -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

View File

@ -10,10 +10,12 @@
<div class="o-links-list">
<ul>
<% web_links.page(params[:page_main]).per(@page_num).each do |web_link| %>
<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>
<% if !web_link.title.empty? %>
<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>

View File

@ -8,10 +8,12 @@
<div class="o-links-list">
<ul>
<% web_links.page(params[:page_main]).per(@page_num).each do |web_link| %>
<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>
<% if !web_link.title.empty? %>
<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>

View File

@ -1,6 +1,6 @@
<ul>
<% @web_links.each do |widget| -%>
<li><%= link_to widget.title, widget.url, {:target => '_blank', :title => widget.title} %></li>
<li><%= link_to widget.title, widget.url, {:target => '_blank', :title => widget.title} %></li>
<% end -%>
</ul>