diff --git a/app/assets/fonts/widget.css b/app/assets/fonts/widget.css deleted file mode 100644 index fe83b22d..00000000 --- a/app/assets/fonts/widget.css +++ /dev/null @@ -1,79 +0,0 @@ -.widget-size-300 { - width:298px; -} -.widget-box { - background-color: #FFF; - overflow: hidden; - min-width: 300px; - border: 1px solid #DDD; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - margin: 0 0 5px 5px; - position:relative; -} -.widget-box .widget-title { - background: #999; - color: #FFF; - padding-left: 5px; - border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - -webkit-border-radius: 5px 5px 0 0; -} -.widget-box .widget-content { - padding: 10px; -} -.widget-box .form-horizontal .control-group > label { - width: 50px; -} -.widget-box .form-horizontal .controls { - margin-left: 60px; -} -.widget-action { - position:absolute; - right:1px; - top:6px; -} -.action { - float: left; - display:inline-block; - margin-right: 5px; - opacity: 0.8; - filter: alpha(opacity=80); -} -.action:hover { - opacity: 1; - filter: alpha(opacity=100); - cursor: pointer; -} -.select-role { - display:none; - padding: 10px 0 0; -} -.file-upload { - position:relative; -} -.file-upload .file-name { - display: inline-block; - margin: 0 0 5px 5px; - white-space: nowrap; - width: 140px; -} -.file-upload .upload { - margin:0; - padding:0; - position:absolute; - top:0; - left:0; - opacity:.0; - filter: alpha(opacity=100); -} -.file-upload .upload:focus { - position:absolute; -} -.upload-picture { - margin-right: 5px; -} -#widget-link table { - margin-bottom:0 -} \ No newline at end of file diff --git a/app/assets/javascripts/jquery.tinyscrollbar.min.js b/app/assets/javascripts/jquery.tinyscrollbar.min.js index 98786a77..e385ff8e 100644 --- a/app/assets/javascripts/jquery.tinyscrollbar.min.js +++ b/app/assets/javascripts/jquery.tinyscrollbar.min.js @@ -1 +1,118 @@ -(function(a){function b(b,c){function w(a){if(!(g.ratio>=1)){o.now=Math.min(i[c.axis]-j[c.axis],Math.max(0,o.start+((k?a.pageX:a.pageY)-p.start)));n=o.now*h.ratio;g.obj.css(l,-n);j.obj.css(l,o.now)}return false}function v(b){a(document).unbind("mousemove",w);a(document).unbind("mouseup",v);j.obj.unbind("mouseup",v);document.ontouchmove=j.obj[0].ontouchend=document.ontouchend=null;return false}function u(b){if(!(g.ratio>=1)){var b=b||window.event;var d=b.wheelDelta?b.wheelDelta/120:-b.detail/3;n-=d*c.wheel;n=Math.min(g[c.axis]-f[c.axis],Math.max(0,n));j.obj.css(l,n/h.ratio);g.obj.css(l,-n);b=a.event.fix(b);b.preventDefault()}}function t(b){p.start=k?b.pageX:b.pageY;var c=parseInt(j.obj.css(l));o.start=c=="auto"?0:c;a(document).bind("mousemove",w);document.ontouchmove=function(b){a(document).unbind("mousemove");w(b.touches[0])};a(document).bind("mouseup",v);j.obj.bind("mouseup",v);j.obj[0].ontouchend=document.ontouchend=function(b){a(document).unbind("mouseup");j.obj.unbind("mouseup");v(b.touches[0])};return false}function s(){j.obj.bind("mousedown",t);j.obj[0].ontouchstart=function(a){a.preventDefault();j.obj.unbind("mousedown");t(a.touches[0]);return false};i.obj.bind("mouseup",w);if(c.scroll&&this.addEventListener){e[0].addEventListener("DOMMouseScroll",u,false);e[0].addEventListener("mousewheel",u,false)}else if(c.scroll){e[0].onmousewheel=u}}function r(){j.obj.css(l,n/h.ratio);g.obj.css(l,-n);p["start"]=j.obj.offset()[l];var a=m.toLowerCase();h.obj.css(a,i[c.axis]);i.obj.css(a,i[c.axis]);j.obj.css(a,j[c.axis])}function q(){d.update();s();return d}var d=this;var e=b;var f={obj:a(".viewport",b)};var g={obj:a(".overview",b)};var h={obj:a(".scrollbar",b)};var i={obj:a(".track",h.obj)};var j={obj:a(".thumb",h.obj)};var k=c.axis=="x",l=k?"left":"top",m=k?"Width":"Height";var n,o={start:0,now:0},p={};this.update=function(a){f[c.axis]=f.obj[0]["offset"+m];g[c.axis]=g.obj[0]["scroll"+m];g.ratio=f[c.axis]/g[c.axis];h.obj.toggleClass("disable",g.ratio>=1);i[c.axis]=c.size=="auto"?f[c.axis]:c.size;j[c.axis]=Math.min(i[c.axis],Math.max(0,c.sizethumb=="auto"?i[c.axis]*g.ratio:c.sizethumb));h.ratio=c.sizethumb=="auto"?g[c.axis]/i[c.axis]:(g[c.axis]-f[c.axis])/(i[c.axis]-j[c.axis]);n=a=="relative"&&g.ratio<=1?Math.min(g[c.axis]-f[c.axis],Math.max(0,n)):0;n=a=="bottom"&&g.ratio<=1?g[c.axis]-f[c.axis]:isNaN(parseInt(a))?n:parseInt(a);r()};return q()}a.tiny=a.tiny||{};a.tiny.scrollbar={options:{axis:"y",wheel:40,scroll:true,size:"auto",sizethumb:"auto"}};a.fn.tinyscrollbar=function(c){var c=a.extend({},a.tiny.scrollbar.options,c);this.each(function(){a(this).data("tsb",new b(a(this),c))});return this};a.fn.tinyscrollbar_update=function(b){return a(this).data("tsb").update(b)};})(jQuery) \ No newline at end of file +(function(a){ + function b(b,c){ + function w(a){ + if(!(g.ratio>=1)){ + o.now=Math.min(i[c.axis]-j[c.axis],Math.max(0,o.start+((k?a.pageX:a.pageY)-p.start))); + n=o.now*h.ratio;g.obj.css(l,-n); + j.obj.css(l,o.now) + } + return false + } + function v(b){ + a(document).unbind("mousemove",w); + a(document).unbind("mouseup",v); + j.obj.unbind("mouseup",v); + document.ontouchmove=j.obj[0].ontouchend=document.ontouchend=null; + return false + } + function u(b){ + if(!(g.ratio>=1)){ + var b=b||window.event; + var d=b.wheelDelta?b.wheelDelta/120:-b.detail/3; + n-=d*c.wheel; + n=Math.min(g[c.axis]-f[c.axis],Math.max(0,n)); + j.obj.css(l,n/h.ratio); + g.obj.css(l,-n); + b=a.event.fix(b); + b.preventDefault() + } + } + function t(b){ + p.start=k?b.pageX:b.pageY; + var c=parseInt(j.obj.css(l)); + o.start=c=="auto"?0:c; + a(document).bind("mousemove",w); + document.ontouchmove=function(b){ + a(document).unbind("mousemove"); + w(b.touches[0]) + }; + a(document).bind("mouseup",v); + j.obj.bind("mouseup",v); + j.obj[0].ontouchend=document.ontouchend=function(b){ + a(document).unbind("mouseup"); + j.obj.unbind("mouseup"); + v(b.touches[0]) + }; + return false + } + function s(){ + j.obj.bind("mousedown",t); + j.obj[0].ontouchstart=function(a){ + a.preventDefault(); + j.obj.unbind("mousedown"); + t(a.touches[0]); + return false + }; + i.obj.bind("mouseup",w); + if(c.scroll&&this.addEventListener){ + e[0].addEventListener("DOMMouseScroll",u,false); + e[0].addEventListener("mousewheel",u,false) + }else if(c.scroll){ + e[0].onmousewheel=u + } + } + function r(){ + j.obj.css(l,n/h.ratio); + g.obj.css(l,-n); + p["start"]=j.obj.offset()[l]; + var a=m.toLowerCase(); + h.obj.css(a,i[c.axis]); + i.obj.css(a,i[c.axis]); + j.obj.css(a,j[c.axis]) + } + function q(){ + d.update(); + s(); + return d + } + var d=this; + var e=b; + var f={obj:a(".viewport",b)}; + var g={obj:a(".overview",b)}; + var h={obj:a(".scrollbar",b)}; + var i={obj:a(".track",h.obj)}; + var j={obj:a(".thumb",h.obj)}; + var k=c.axis=="x", + l=k?"left":"top", + m=k?"Width":"Height"; + var n, + o={start:0,now:0}, + p={}; + this.update=function(a){ + f[c.axis]=f.obj[0]["offset"+m]; + g[c.axis]=g.obj[0]["scroll"+m]; + g.ratio=f[c.axis]/g[c.axis]; + h.obj.toggleClass("disable",g.ratio>=1); + i[c.axis]=c.size=="auto"?f[c.axis]:c.size; + j[c.axis]=Math.min(i[c.axis],Math.max(0,c.sizethumb=="auto"?i[c.axis]*g.ratio:c.sizethumb)); + h.ratio=c.sizethumb=="auto"?g[c.axis]/i[c.axis]:(g[c.axis]-f[c.axis])/(i[c.axis]-j[c.axis]); + n=a=="relative"&&g.ratio<=1?Math.min(g[c.axis]-f[c.axis],Math.max(0,n)):0; + n=a=="bottom"&&g.ratio<=1?g[c.axis]-f[c.axis]:isNaN(parseInt(a))?n:parseInt(a); + r() + }; + return q() + } + a.tiny=a.tiny||{}; + a.tiny.scrollbar={options:{axis:"y",wheel:40,scroll:true,size:"auto",sizethumb:"auto"}}; + a.fn.tinyscrollbar=function(c){ + var c=a.extend({},a.tiny.scrollbar.options,c); + this.each(function(){ + a(this).data("tsb",new b(a(this),c)) + }); + return this + }; + a.fn.tinyscrollbar_update=function(b){ + return a(this).data("tsb").update(b) + }; +}) +(jQuery) \ No newline at end of file diff --git a/app/assets/stylesheets/sidebar.css.erb b/app/assets/stylesheets/sidebar.css.erb index 5554b25a..4231d0bf 100644 --- a/app/assets/stylesheets/sidebar.css.erb +++ b/app/assets/stylesheets/sidebar.css.erb @@ -1,12 +1,23 @@ /*sidebar*/ -#back_sidebar { - left: 0; - position: fixed; - top: 0; - width: 160px; +.nav-list { + padding: 0px 0px 100px 5px; } - +.nav-list li { + position: relative; +} +.nav-list ul { + margin-left: 10px; +} +.nav-list ul li { + padding: 5px 0; +} +.nav-list ul li a { + font-size: 13px; + padding: 3px 0px; + display: block; +} +/* #back_sidebar h1 { background: url(<%= asset_path "h1_bg.png" %>) repeat-x scroll left top transparent; border-bottom: 1px solid #1B1B1B; @@ -106,36 +117,35 @@ } #main-sidebar ul ul li a{ padding: 10px 0 10px 20px; +}*/ +.with_action:hover .hide { + display: block; } -#main-sidebar li:hover .quick-edit{ - display:block; -} -#main-sidebar .quick-edit{ +#main-sidebar .quick-edit { background: none repeat scroll 0 0 #FFFFFF; border: 1px solid #DDDDDD; border-radius: 5px 5px 5px 5px; - display: none; - margin:-3px 0 0 3px; - padding: 3px; + margin: 0 0 0 3px; + padding: 0; z-index:1; + position: absolute; + left: -3px; + width: 70px; } -#main-sidebar .quick-edit:after{ - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; -} -#main-sidebar .quick-edit a{ +#main-sidebar .quick-edit a { + display: block; + line-height: 22px; border-bottom: medium none; - border-radius: 5px 5px 5px 5px; font-size:12px; - float: left; - margin: 0 3px 0 0; - padding: 3px; + margin: 0; + padding: 3px 5px; } - -#main-sidebar .quick-edit a:hover{ - background: none repeat scroll 0 0 #EEEEEE; - border-bottom:none; +#main-sidebar .quick-edit a:first-child { + border-radius: 5px 5px 0px 0px; +} +#main-sidebar .quick-edit a:last-child { + border-radius: 0px 0px 5px 5px; +} +#main-sidebar .quick-edit a:hover { + background-color: #DDDDDD; } \ No newline at end of file diff --git a/app/assets/stylesheets/style.css.erb b/app/assets/stylesheets/style.css.erb index e832fa8a..8fdc3923 100644 --- a/app/assets/stylesheets/style.css.erb +++ b/app/assets/stylesheets/style.css.erb @@ -632,12 +632,10 @@ margin-right: 20px; } .adbanner-action { - position: absolute; - top: -32px; - right: 0; -} -#bulletin_link_qe form { - margin: 0; + margin-bottom: 20px; +} +#bulletin_link_qe form { + margin: 0; } [class^="icons-"] { display: inline-block; diff --git a/app/assets/stylesheets/widgets.css b/app/assets/stylesheets/widgets.css index 04273d5b..86088fee 100644 --- a/app/assets/stylesheets/widgets.css +++ b/app/assets/stylesheets/widgets.css @@ -53,11 +53,11 @@ display:inline-block; margin-right: 5px; opacity: 0.8; - filter: alpha(opacity:80); + filter: alpha(opacity=80); } .action:hover { opacity: 1; - filter: alpha(opacity:100); + filter: alpha(opacity=100); cursor: pointer; } .select-role { @@ -95,23 +95,23 @@ opacity:.0; font-size: 60px; left: -595px/9; - filter: alpha(opacity: 0); + filter: alpha(opacity= 0); outline: none; } .file-upload .upload:focus { position:absolute; -} -.file-upload .input-medium { - border-radius: 3px 3px 3px 3px !important; - width: 267px; - position: relative; - z-index: 5; - display: block; - clear: both; -} -.file-upload .control-label { - margin-top: 0; - margin-bottom: 5px; +} +.file-upload .input-medium { + border-radius: 3px 3px 3px 3px !important; + width: 267px; + position: relative; + z-index: 5; + display: block; + clear: both; +} +.file-upload .control-label { + margin-top: 0; + margin-bottom: 5px; } .upload-picture { margin-bottom: 5px; diff --git a/app/helpers/admin/item_helper.rb b/app/helpers/admin/item_helper.rb index c9715a71..d1025c55 100644 --- a/app/helpers/admin/item_helper.rb +++ b/app/helpers/admin/item_helper.rb @@ -9,18 +9,20 @@ module Admin::ItemHelper when 'Link' dest = admin_link_path(node) end - ret << "" unless node.parent.nil? end ret.html_safe end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 52ad71c0..258000be 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -142,7 +142,6 @@ module ApplicationHelper javascripts = '' unless edit javascripts << "\n" - javascripts << "\n" javascripts << "\n" javascripts << "\n" javascripts << "\n" @@ -150,6 +149,7 @@ module ApplicationHelper javascripts << "\n" javascripts << "\n" end + javascripts << "\n" javascripts << "\n" javascripts << "\n" page.design.javascripts.each do |js| diff --git a/app/views/admin/ad_banners/_ad_banner_tab.html.erb b/app/views/admin/ad_banners/_ad_banner_tab.html.erb index d2149f81..ff27d914 100644 --- a/app/views/admin/ad_banners/_ad_banner_tab.html.erb +++ b/app/views/admin/ad_banners/_ad_banner_tab.html.erb @@ -13,7 +13,7 @@

圖片列表

-
+
<%= link_to t("admin.ad.new_image"),new_admin_ad_banner_ad_image_path(ad_banner_tab) ,:class => "btn btn-primary"%> <%= link_to t("modal.preview"), admin_realtime_preview_ad_banner_path(ad_banner_tab.title) , :class=>'preview_trigger btn btn-success'%>
diff --git a/app/views/admin/items/_site_map_left_bar.html.erb b/app/views/admin/items/_site_map_left_bar.html.erb index b2a48a19..e82b4988 100644 --- a/app/views/admin/items/_site_map_left_bar.html.erb +++ b/app/views/admin/items/_site_map_left_bar.html.erb @@ -1,3 +1 @@ -
- <%= render_node_and_children(Item.first(:conditions => {:parent_id => nil})) %> -
\ No newline at end of file +<%= render_node_and_children(Item.first(:conditions => {:parent_id => nil})) %> \ No newline at end of file diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index a6c9bc92..998400dd 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -5,8 +5,8 @@ <%= flash_messages %>
diff --git a/app/views/layouts/_orbit_bar.html.erb b/app/views/layouts/_orbit_bar.html.erb index 7e0c627e..f272832e 100644 --- a/app/views/layouts/_orbit_bar.html.erb +++ b/app/views/layouts/_orbit_bar.html.erb @@ -69,7 +69,7 @@ <%= t(:login) %> -
  • +
  • <%= link_to t(:forgot_password), new_user_password_path, :class => 'forgot' %>
  • @@ -94,10 +94,10 @@ <%= t(:remember_me) %>
  • -
  • <%= t(:or_lower) %>
  • +
  • <%= t(:or_lower) %>
  • <% end %> - <%= link_to t(:register), new_user_registration_path, :class => 'btn btn-danger register' %> + <%#= link_to t(:register), new_user_registration_path, :class => 'btn btn-danger register' %>
    <% end %> diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb index 51a35bf9..75aa6130 100644 --- a/app/views/layouts/_side_bar.html.erb +++ b/app/views/layouts/_side_bar.html.erb @@ -41,8 +41,8 @@ <%= content_tag :li, :class => active_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys') do -%> <%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.link'), panel_web_resource_back_end_web_links_path %> <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys')) do -%> - <%= content_tag :li, link_to(t('admin.all_articles'), panel_web_resource_back_end_web_links_path), :class => active_for_action('web_link', 'index') %> - <%= content_tag :li, link_to(t('announcement.add_new'), new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_link', 'new') %> + <%= content_tag :li, link_to(t('admin.all_articles'), panel_web_resource_back_end_web_links_path), :class => active_for_action('web_links', 'index') %> + <%= content_tag :li, link_to(t('announcement.add_new'), new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_links', 'new') %> <%= content_tag :li, link_to(t('announcement.categories'), panel_web_resource_back_end_web_link_categorys_path), :class => active_for_action('web_link_categorys', 'index') %> <%= content_tag :li, link_to(t('announcement.tags'), panel_web_resource_back_end_tags_path), :class => active_for_action('/panel/web_resource/back_end/tags', 'index') %> <% end -%> diff --git a/config/locales/en.yml b/config/locales/en.yml index def476a5..dc74d5df 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -41,6 +41,7 @@ en: submit: Submit sure?: Are you sure? update: Update + view: View yes_: "Yes" admin: diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 81de559c..a7bcc974 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -38,6 +38,7 @@ zh_tw: submit: 送出 sure?: 您肯定嗎? update: 更新 + view: 檢視 yes_: "Yes" admin: diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index f60c4a51..6e7fea47 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -29,6 +29,7 @@ module ParserCommon res << '' end end + res end def menu_li(page, current, menu, i, edit) diff --git a/public/static/Other.xml b/public/static/Other.xml index 22c41bbb..859cfafc 100644 --- a/public/static/Other.xml +++ b/public/static/Other.xml @@ -5,140 +5,636 @@ 其他類別-最新活動 zh-tw - 國立政治大學101學年度碩士班暨碩士在職專班招生考試 - + IEEE Computer Society與ACM資料庫教育訓練 + - + - 101/02/25-101/02/26 07:00-17:00 - - - 國立中正大學101學年度碩士班招生考試 - - - - - 101/03/10 07:00-17:00 - - - 「樂活飲食•健康之鑰」系列活動--膳食纖維的功用及食物來源 - - - - - 101/02/29 12:00-14:00 - - - 「樂活飲食•健康之鑰」系列活動-美味的代價與健康問題之探討 - - - - - 101/03/08 12:00-14:00 - - - 「樂活飲食•健康之鑰」系列活動--代謝症候群與檢康飲食 - - - - - 101/03/22 12:00-14:00 + 101/04/26 13:00-15:00 「學生健康體位控制班」 - + - + 101/03/01-101/05/03 18:00-20:30 - 學生大使志工團- 2012 Field Trip-Must Sea+ FUN舟趣 - + 傳播沙龍:從南加大電影藝術學院看美國電影創作教育 + - - - 101/03/17-101/03/18 08:00-20:00 + + + 101/04/26 12:30-14:00 - 職場勞資關係講座-你知道自己的權益嗎? - + 傳播沙龍:從南加大電影藝術學院看美國電影創作教育 + - + - 101/03/05 18:30-21:00 + 101/04/26 12:30-14:00 - 職場「面面」觀 - 談職場趨勢與面試 - + IEEE Computer Society與ACM資料庫教育訓練 + - + - 101/03/06 18:30-21:00 + 101/04/26 13:00-15:00 - 「自」銷不要「滯」銷~一窺自我行銷術的秘密 - + ScienceDirect Online資料庫教育訓練 + - + - 101/03/07 18:30-21:00 + 101/04/27 12:30-14:00 - 職涯經驗談-開創職涯的一片天 - + 傳播沙龍:心健的心劍--新媒體藝術創作與教學 + - + - 101/03/08 18:30-21:00 + 101/04/27 12:30-14:00 + + + 智財論壇:智財生態變革及研發創新經營 + + + + + 101/04/30 10:10-11:50 - 2012徵政好企業說明會--花旗銀行 - + EICP東方線上資料庫教育訓練 + - + - 101/03/05 12:15-14:00 + 101/04/30 13:00-15:00 - 2012徵政好企業說明會--日商野村總合研究所 - + 職場講座「數位文本實務課程」 + - + - 101/03/09 12:15-14:00 + 101/04/24-101/05/15 12:20-13:50 - 2012徵政好企業說明會--渣打銀行 - + EBSCO教育心理資料庫教育訓練 + - + - 101/03/06 12:15-14:00 + 101/05/02 12:30-14:00 - 2012徵政好企業說明會--台新金控 - + 傳播沙龍:建制內的多元解讀:諜戰劇迷群體、文化表徵與中國語境 + - + - 101/03/07 12:15-14:00 + 101/05/03 12:30-14:00 - 2012徵政好企業說明會--第一銀行 - + 職場講座「數位文本實務課程」 + - + - 101/03/08 12:15-14:00 + 101/04/24-101/05/15 12:20-13:50 - 101年生命教育師資培訓課程研習會 - + 教發中心五月份數位教材製作工作坊_錄影後製與剪輯 05/09 + - + - 101/03/24-101/03/25 07:30-17:40 + 101/05/09 12:00-14:00 + + 文獻蒐集與報告撰寫入門 + + + + + 101/05/11 13:00-15:00 + + + 「2012台北-莫斯科論壇:新政展望」國際學術研討會 + + + + + 101/05/12-101/05/13 08:30-17:30 + + + 「2012台北-莫斯科論壇:新政展望」國際學術研討會 + + + + + 101/05/12-101/05/13 08:30-17:30 + + + 職場講座「數位文本實務課程」 + + + + + 101/04/24-101/05/15 12:20-13:50 + + + 文化講座「破戒:關於『色•戒』的實與虛」 + + + + + 101/05/24 12:20-14:00 + + + John,我愛你-Suming彈唱會-跨國現場獨立音樂表演系列 + + + + + 101/04/27 19:00-21:00 + + + 藝文中心【電影】2012國際民族誌影展巡演-《牛糞》 + + + + + 101/04/30 19:00-20:20 + + + 波蘭前衛流行女聲-噶芭.庫爾卡(跨國現場獨立音樂表演系列) + + + + + 101/05/04 19:00-20:00 + + + Bleuel 雙重奏--薩克斯風與鋼琴 + + + + + 101/05/10 19:30-20:30 + + + 「東張西望」林語堂生活展,政大校園站開幕茶會 + + + + + 101/05/02 11:00-12:00 + + + 文化參訪「故宮特展:西方神話與傳說—羅浮宮珍藏展」 + + + + + 101/05/07 08:30-12:00 + + +「學生健康體位控制班」 + + + + +101/03/01-101/05/03 18:00-20:30 + + +心靈陪伴工作坊 + + + + +101/04/28 09:30-16:30 + + +2012年福祿貝爾恩物親子戲遊成長團體(下午) + + + + +101/04/07-101/06/09 14:00-16:00 + + +2012年福祿貝爾恩物親子戲遊成長團體(上午) + + + + +101/04/07-101/06/02 09:00-11:00 + + +2012年世界狂歡節-環友世界 + + + + +101/05/01-101/05/10 00:00-23:59 + + +2012年世界狂歡節-「框」住瞬間「框」住世界 + + + + +101/05/01-101/05/08 00:00-23:59 + + +2012年世界狂歡節-從政大看台灣 + + + + +101/05/01-101/05/10 08:00-22:00 + + +2012年世界狂歡節-環友世界 + + + + +101/05/01-101/05/10 00:00-23:59 + + +2012年世界狂歡節-「框」住瞬間「框」住世界 + + + + +101/05/01-101/05/08 00:00-23:59 + + +2012年世界狂歡節-從政大看台灣 + + + + +101/05/01-101/05/10 08:00-22:00 + + +2012年世界狂歡節-「框」住瞬間「框」住世界 + + + + +101/05/01-101/05/08 00:00-23:59 + + +2012年世界狂歡節-環友世界 + + + + +101/05/01-101/05/10 00:00-23:59 + + +2012年世界狂歡節-從政大看台灣 + + + + +101/05/01-101/05/10 08:00-22:00 + + +校外租屋法律座談會 + + + + +101/05/03 12:00-14:00 + + +紅紙廊期中工作坊-帶遊戲的言談藝術 + + + + +101/05/03 12:10-14:00 + + +「學生健康體位控制班」 + + + + +101/03/01-101/05/03 18:00-20:30 + + +2012年世界狂歡節-「框」住瞬間「框」住世界 + + + + +101/05/01-101/05/08 00:00-23:59 + + +2012年世界狂歡節-環友世界 + + + + +101/05/01-101/05/10 00:00-23:59 + + +2012年世界狂歡節-從政大看台灣 + + + + +101/05/01-101/05/10 08:00-22:00 + + +身心放輕鬆 (教職員工心靈SPA講座) + + + + +101/05/04 12:00-13:30 + + +2012年世界狂歡節- 五粵天粵語歌唱比賽『光輝歲月』 + + + + +101/05/04 18:00-22:00 + + +2012年世界狂歡節-環友世界 + + + + +101/05/01-101/05/10 00:00-23:59 + + +2012年世界狂歡節-「框」住瞬間「框」住世界 + + + + +101/05/01-101/05/08 00:00-23:59 + + +2012年世界狂歡節-從政大看台灣 + + + + +101/05/01-101/05/10 08:00-22:00 + + +2012年福祿貝爾恩物親子戲遊成長團體(上午) + + + + +101/04/07-101/06/02 09:00-11:00 + + +2012年福祿貝爾恩物親子戲遊成長團體(下午) + + + + +101/04/07-101/06/09 14:00-16:00 + + +2012年世界狂歡節-「框」住瞬間「框」住世界 + + + + +101/05/01-101/05/08 00:00-23:59 + + +2012年世界狂歡節-環友世界 + + + + +101/05/01-101/05/10 00:00-23:59 + + +2012年世界狂歡節-從政大看台灣 + + + + +101/05/01-101/05/10 08:00-22:00 + + +2012年世界狂歡節-「框」住瞬間「框」住世界 + + + + +101/05/01-101/05/08 00:00-23:59 + + +2012年世界狂歡節-環友世界 + + + + +101/05/01-101/05/10 00:00-23:59 + + +2012年世界狂歡節-從政大看台灣 + + + + +101/05/01-101/05/10 08:00-22:00 + + +2012年世界狂歡節-世界服裝大遊行 + + + + +101/05/07 12:00-13:00 + + +2012年世界狂歡節-環友世界 + + + + +101/05/01-101/05/10 00:00-23:59 + + +2012年世界狂歡節-「框」住瞬間「框」住世界 + + + + +101/05/01-101/05/08 00:00-23:59 + + +2012年世界狂歡節-從政大看台灣 + + + + +101/05/01-101/05/10 08:00-22:00 + + +2012年世界狂歡節-美食嘉年華 + + + + +101/05/08-101/05/10 12:00-14:00 + + +2012年世界狂歡節-開幕式 + + + + +101/05/08 12:10-13:30 + + +2012年世界狂歡節-「原,夜」晚會 + + + + +101/05/08 19:00-21:00 + + +2012年世界狂歡節-環友世界 + + + + +101/05/01-101/05/10 00:00-23:59 + + +2012年世界狂歡節-從政大看台灣 + + + + +101/05/01-101/05/10 08:00-22:00 + + +2012年世界狂歡節-美食嘉年華 + + + + +101/05/08-101/05/10 12:00-14:00 + + +2012年世界狂歡節-環友世界 + + + + +101/05/01-101/05/10 00:00-23:59 + + +2012年世界狂歡節-從政大看台灣 + + + + +101/05/01-101/05/10 08:00-22:00 + + +2012年世界狂歡節-美食嘉年華 + + + + +101/05/08-101/05/10 12:00-14:00 + + +2012年世界狂歡節-閉幕式 + + + + +101/05/10 12:00-13:20 + + +國立政治大學101學年度博士班招生考試 + + + + +101/05/12 07:00-17:00 + + +2012年福祿貝爾恩物親子戲遊成長團體(上午) + + + + +101/04/07-101/06/02 09:00-11:00 + + +2012年福祿貝爾恩物親子戲遊成長團體(下午) + + + + +101/04/07-101/06/09 14:00-16:00 + + +2012年福祿貝爾恩物親子戲遊成長團體(上午) + + + + +101/04/07-101/06/02 09:00-11:00 + + +2012年福祿貝爾恩物親子戲遊成長團體(下午) + + + + +101/04/07-101/06/09 14:00-16:00 + + +2012年福祿貝爾恩物親子戲遊成長團體(上午) + + + + +101/04/07-101/06/02 09:00-11:00 + + +TOEIC英語測驗校園考 + + + + +101/05/26 09:30-12:00 + + +2012年福祿貝爾恩物親子戲遊成長團體(下午) + + + + +101/04/07-101/06/09 14:00-16:00 + diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb index 7a096ad0..ad362323 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb @@ -1,24 +1,28 @@ <%= check_box_tag 'to_delete[]', bulletin.id, false, :class => "checkbox_in_list" %> - <% if bulletin.is_top? %> - <%= t(:top) %> - <% end %> - <% if bulletin.is_hot? %> - <%= t(:hot) %> - <% end %> - <% if bulletin.is_hidden? %> - <%= t(:hidden) %> - <% end %> - <% if bulletin.is_pending? %> - <%= t(:pending) %> - <% end %> - <% if bulletin.is_checked? %> - <%= t(:passed) %> - <% end %> - <% if bulletin.is_rejected? %> - <%= t(:rejected) %> - <% end %> +
    +
    + <% if bulletin.is_top? %> + <%= t(:top) %> + <% end %> + <% if bulletin.is_hot? %> + <%= t(:hot) %> + <% end %> + <% if bulletin.is_hidden? %> + <%= t(:hidden) %> + <% end %> + <% if bulletin.is_pending? %> + <%= t(:pending) %> + <% end %> + <% if bulletin.is_checked? %> + <%= t(:passed) %> + <% end %> + <% if bulletin.is_rejected? %> + <%= t(:rejected) %> + <% end %> +
    +
    <%= bulletin.bulletin_category.i18n_variable[I18n.locale] %> diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form_bulletin_file.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form_bulletin_file.html.erb index d391c80c..38ab1edb 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form_bulletin_file.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form_bulletin_file.html.erb @@ -4,7 +4,7 @@
    <%= f.file_field :file %> - <%= form_bulletin_file.file.file ? ( link_to t(:view), form_bulletin_file.file.url, {:target => '_blank', :title => t(:view)} ) : '' %> + <%= form_bulletin_file.file.file ? ( link_to t(:view), form_bulletin_file.file.url, {:class => 'btn', :target => '_blank', :title => t(:view)} ) : '' %>
    diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_quick_edit_tags.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_quick_edit_tags.html.erb index 0e302be3..3887a671 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_quick_edit_tags.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_quick_edit_tags.html.erb @@ -1,37 +1,3 @@ - -
    diff --git a/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/back_end/web_links_controller.rb b/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/back_end/web_links_controller.rb index c3fe0fbc..25c41606 100644 --- a/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/back_end/web_links_controller.rb +++ b/vendor/built_in_modules/web_resource/app/controllers/panel/web_resource/back_end/web_links_controller.rb @@ -7,14 +7,32 @@ class Panel::WebResource::BackEnd::WebLinksController < OrbitBackendController get_categorys(params[:web_link_category_id]) + @filter = params[:filter] + new_filter = params[:new_filter] + + if @filter && params[:clear] + @filter.delete(params[:type]) + elsif @filter && new_filter + if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s) + @filter[new_filter[:type]].delete(new_filter[:id].to_s) + elsif @filter.has_key?(new_filter[:type]) + @filter[new_filter[:type]] << new_filter[:id].to_s + else + @filter.merge!({new_filter[:type] => [new_filter[:id].to_s]}) + end + elsif new_filter + @filter = {new_filter[:type] => [new_filter[:id].to_s]} + end + # @web_links = WebLink.search(params[:category_id]) - @web_links = WebLink.all.page(params[:page]).per(10) + @web_links = (params[:sort] || @filter) ? get_sorted_and_filtered_web_links : WebLink.all.page(params[:page]).per(10) get_tags respond_to do |format| format.html # index.html.erb format.xml { render :xml => @web_links } + format.js end end @@ -115,5 +133,75 @@ class Panel::WebResource::BackEnd::WebLinksController < OrbitBackendController module_app = ModuleApp.first(:conditions => {:key => 'web_resource'}) @tags = Tag.all(:conditions => {:module_app_id => module_app.id}) end + + def get_sorted_and_filtered_web_links + web_links = WebLink.all + case params[:sort] + when 'category' + category_ids = web_links.distinct(:web_link_category_id) + categories = WebLinkCategory.find(category_ids) rescue nil + if categories + h = Hash.new + categories.each { |category| h[category.i18n_variable[I18n.locale]] = category.id } + sorted = params[:direction].eql?('asc') ? h.sort : h.sort.reverse! + sorted_categorys = sorted.collect {|a| web_links.where(:web_link_category_id => a[1]).entries } + web_links = sorted_categorys.flatten! + end + when 'name' + h = Array.new + web_links.each { |web_link| h << [web_link.name[I18n.locale].downcase, web_link] } + sorted = params[:direction].eql?('asc') ? h.sort : h.sort.reverse! + web_links = sorted.collect {|a| a[1] } + when 'status' + web_links = web_links.order_by(:is_top, params[:direction]).order_by(:is_hot, params[:direction]).order_by(:is_hidden, params[:direction]).order_by(:is_pending, params[:direction]).order_by(:is_checked, params[:direction]).order_by(:is_rejected, params[:direction]) + when 'tags' + a = Array.new + WebResourceTag.all.order_by(I18n.locale, params[:direction]).each { |tag| a << tag.web_links } + a.flatten! + a.uniq! + tmp = Array.new + web_links.where(:tag_ids => []).each { |web_link| tmp << [web_link.name[I18n.locale].downcase, web_link] } + sorted = params[:direction].eql?('asc') ? tmp.sort : tmp.sort.reverse! + sorted_names = sorted.collect {|a| a[1] } + a = params[:direction].eql?('asc') ? (sorted_names + a) : (a + sorted_names) + web_links = a.flatten + end + # if @filter + # @filter.each do |key, value| + # case key + # when 'status' + # a = Array.new + # web_links.each do |web_link| + # value.each do |v| + # case v + # when 'pending' + # a << web_link if web_link.is_checked.nil? + # when 'rejected' + # a << web_link if web_link.is_checked.eql?(false) + # else + # a << web_link if web_link[v] + # end + # end + # end + # web_links = a.uniq + # when 'categories' + # a = Array.new + # web_links.each do |web_link| + # a << web_link if value.include?(web_link.web_link_category.id.to_s) + # end + # web_links = a.uniq + # when 'tags' + # a = Array.new + # web_links.each do |web_link| + # web_link.tags.each do |tag| + # a << web_link if value.include?(tag.id.to_s) + # end + # end + # web_links = a.uniq + # end if value.size > 0 + # end + # end + Kaminari.paginate_array(web_links).page(params[:page]).per(10) + end end diff --git a/vendor/built_in_modules/web_resource/app/models/web_link.rb b/vendor/built_in_modules/web_resource/app/models/web_link.rb index e6753fea..9bd06f05 100644 --- a/vendor/built_in_modules/web_resource/app/models/web_link.rb +++ b/vendor/built_in_modules/web_resource/app/models/web_link.rb @@ -60,6 +60,10 @@ class WebLink def text @text ||= I18nVariable.first(:conditions => {:key => 'text', :language_value_id => self.id, :language_value_type => self.class}) rescue nil + end + + def sorted_tags + tags.order_by(I18n.locale, :asc) end protected diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_link_categorys/index.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_link_categorys/index.html.erb index 762da9e7..7cc5bd5e 100644 --- a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_link_categorys/index.html.erb +++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_link_categorys/index.html.erb @@ -1,13 +1,29 @@ <%= flash_messages %> + - + <% @site_valid_locales.each do |locale| %> - + <% end %> diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_filter.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_filter.html.erb new file mode 100644 index 00000000..831fee17 --- /dev/null +++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_filter.html.erb @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_sort_headers.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_sort_headers.html.erb new file mode 100644 index 00000000..a09af38c --- /dev/null +++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_sort_headers.html.erb @@ -0,0 +1,18 @@ + + + + + + + + + +
    + <%= link_to (t('web_link.status') + content_tag(:b, nil, :class => is_sort?('status'))).html_safe, panel_web_resource_back_end_web_links_path({:filter => @filter}.merge(sortable('status'))), :class => 'js_history' %> + + <%= link_to (t('web_link.category') + content_tag(:b, nil, :class => is_sort?('category'))).html_safe, panel_web_resource_back_end_web_links_path({:filter => @filter}.merge(sortable('category'))), :class => 'js_history' %> + + <%= link_to (t('web_link.name') + content_tag(:b, nil, :class => is_sort?('name'))).html_safe, panel_web_resource_back_end_web_links_path({:filter => @filter}.merge(sortable('name'))), :class => 'js_history' %> + + <%= link_to (t('web_link.tags') + content_tag(:b, nil, :class => is_sort?('tags'))).html_safe, panel_web_resource_back_end_web_links_path({:filter => @filter}.merge(sortable('tags'))), :class => 'js_history' %> +
    diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_web_link.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_web_link.html.erb new file mode 100644 index 00000000..ad8f5ade --- /dev/null +++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_web_link.html.erb @@ -0,0 +1,37 @@ + + +
    +
    + <% if web_link.is_top? %> + <%= t(:top) %> + <% end %> + <% if web_link.is_hot? %> + <%= t(:hot) %> + <% end %> + <% if web_link.is_hidden? %> + <%= t(:hidden) %> + <% end %> +
    +
    + + <%= web_link.web_link_category.i18n_variable[I18n.locale] %> + + <%= link_to web_link.name[I18n.locale], panel_web_resource_back_end_web_link_path(web_link) %> +
    + +
    + + +
    +
    + <% web_link.sorted_tags.each do |tag| %> + <%= tag[I18n.locale] %> + <% end %> +
    +
    + + + diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_web_links.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_web_links.html.erb deleted file mode 100644 index c58f15e4..00000000 --- a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/_web_links.html.erb +++ /dev/null @@ -1,30 +0,0 @@ - - - - <% if post.is_top? %> - <%= t(:top) %> - <% end %> - <% if post.is_hot? %> - <%= t(:hot) %> - <% end %> - <% if post.is_hidden? %> - <%= t(:hidden) %> - <% end %> -
    - -
    - - <%= post.web_link_category.i18n_variable[I18n.locale] %> - - <%= link_to post.name[I18n.locale], panel_web_resource_back_end_web_link_path(post) %> - - - <% post.tags.each do |tag| %> - <%= tag[I18n.locale] %> - <% end %> - - - diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.html.erb index 951fb4d9..632eb4a1 100644 --- a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.html.erb +++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.html.erb @@ -1,23 +1,18 @@ - -<%= flash_messages %> - +<%= render 'filter' %> - - - - + + + + - - - <% @web_links.each do |post| %> - <%= render :partial => 'web_links', :locals => {:post => post} %> - <% end %> - + + <%= render :partial => 'web_link', :collection => @web_links %>
    <%= t('web_link.status') %><%= t('web_link.category') %><%= t('web_link.name') %><%= t('web_link.tags') %>
    -<%= paginate @web_links %> - + diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.js.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.js.erb new file mode 100644 index 00000000..abf256eb --- /dev/null +++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.js.erb @@ -0,0 +1,3 @@ +$("#sort_headers").html("<%= j render 'sort_headers' %>"); +$("#tbody_web_links").html("<%= j render :partial => 'web_link', :collection => @web_links %>"); +$("#web_link_pagination").html("<%= j paginate @web_links, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>"); \ No newline at end of file