Add mobile but remove news in it
This commit is contained in:
1 parent
9745bcf7f1
commit
37740adb24
66 files changed
+6946
-2
No files matched your search
@@ -0,0 +1,11 @@
|
||||
<%# Link to the "First" page
|
||||
- available local variables
|
||||
url: url to the first page
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
-%>
|
||||
<li class="first">
|
||||
<%= link_to_unless current_page.first?, "«", url, :remote => remote %>
|
||||
</li>
|
||||
@@ -0,0 +1,8 @@
|
||||
<%# Non-link tag that stands for skipped pages...
|
||||
- available local variables
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
-%>
|
||||
<!-- <li class="page gap"><%= raw(t 'views.pagination.truncate') %></li> -->
|
||||
@@ -0,0 +1,11 @@
|
||||
<%# Link to the "Last" page
|
||||
- available local variables
|
||||
url: url to the last page
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
-%>
|
||||
<li class="last">
|
||||
<%= link_to_unless current_page.last?, "»", url, {:remote => remote} %>
|
||||
</li>
|
||||
@@ -0,0 +1,11 @@
|
||||
<%# Link to the "Next" page
|
||||
- available local variables
|
||||
url: url to the next page
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
-%>
|
||||
<li class="next">
|
||||
<%= link_to_unless current_page.last?, '›', url, :rel => 'next', :remote => remote %>
|
||||
</li>
|
||||
@@ -0,0 +1,16 @@
|
||||
<%# Link showing page number
|
||||
- available local variables
|
||||
page: a page object for "this" page
|
||||
url: url to this page
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
-%>
|
||||
<li class="page<%= ' active' if page.current? %>">
|
||||
<% if page.current? %>
|
||||
<a><%= page %></a>
|
||||
<% else %>
|
||||
<%= link_to page, url, opts = {:remote => remote, :rel => page.next? ? '›' : page.prev? ? '‹' : nil} %>
|
||||
<% end %>
|
||||
</li>
|
||||
@@ -0,0 +1,25 @@
|
||||
<%# The container tag
|
||||
- available local variables
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
paginator: the paginator that renders the pagination tags inside
|
||||
-%>
|
||||
<%= paginator.render do -%>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<%= first_page_tag unless current_page.first? %>
|
||||
<%= prev_page_tag unless current_page.first? %>
|
||||
<% each_page do |page| -%>
|
||||
<% if page.left_outer? || page.right_outer? || page.inside_window? -%>
|
||||
<%= page_tag page %>
|
||||
<% elsif !page.was_truncated? -%>
|
||||
<%= gap_tag %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<%= next_page_tag unless current_page.last? %>
|
||||
<%= last_page_tag unless current_page.last? %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end -%>
|
||||
@@ -0,0 +1,11 @@
|
||||
<%# Link to the "Previous" page
|
||||
- available local variables
|
||||
url: url to the previous page
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
-%>
|
||||
<li class="prev">
|
||||
<%= link_to_unless current_page.first?, '‹', url, :rel => 'prev', :remote => remote %>
|
||||
</li>
|
||||
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<base href=<%= "#{request.protocol}#{request.host_with_port}/mobile/"%>>
|
||||
<title><%= @site.title %><%= (' - ' + @page_title) if @page_title %></title>
|
||||
<%= stylesheet_link_tag "mobile" %>
|
||||
<%= javascript_include_tag "mobile" %>
|
||||
<%= javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false&libraries=places" %>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<!-- <meta name="apple-itunes-app" content="app-id=342792525, app-argument=imdb:///?src=mdot"> -->
|
||||
<meta name="description" content="">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0">
|
||||
<!-- iPhone -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPhone.png' %>" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPhone (Retina) -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPhone-RETINA.png' %>" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPhone 5 -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPhone-Tall-RETINA.png' %>" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPad Portrait -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPad-Portrait.png' %>" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPad Landscape -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPad-Landscape.png' %>" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPad Portrait (Retina) -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPad-RETINA-Portrait.png' %>" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPad Landscape (Retina) -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPad-RETINA-Landscape.png' %>" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPhone icon -->
|
||||
<link rel="apple-touch-icon-precomposed" href="<%= asset_path 'mobile/apple-touch-icon.png' %>">
|
||||
|
||||
<!-- iPhone icon (Retina) -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="<%= asset_path 'mobile/apple-touch-icon@2x.png' %>">
|
||||
|
||||
<!-- iPad icon -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="<%= asset_path 'mobile/apple-touch-icon-ipad.png' %>">
|
||||
|
||||
<!-- iPad icon (Retina) -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="<%= asset_path 'mobile/apple-touch-icon-ipad@2x.png' %>">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div data-role="page" data-url="<%= request.fullpath %>" id="<%= params[:action] %>" data-add-back-btn="<%= params[:action].eql?('index')? nil : 'true' %>">
|
||||
<section class="global">
|
||||
<% if !(yield :header).blank? %>
|
||||
<%= yield :header %>
|
||||
<% else %>
|
||||
<%= render 'header' %>
|
||||
<% end unless @no_header %>
|
||||
<%= render 'menu' unless @no_menu %>
|
||||
<section class="content">
|
||||
<%= yield %>
|
||||
</section>
|
||||
<%= render 'footer' unless @no_footer %>
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,24 @@
|
||||
<footer class="footer" data-role="footer" data-position="fixed">
|
||||
<div data-role="navbar">
|
||||
<ul>
|
||||
<li>
|
||||
<%= link_to mobile_dialog_copyright_path, {"data-transition" => "flip", "data-rel" => "dialog", "data-inline" => "true"} do %>
|
||||
<i class="icons-information"></i>
|
||||
<%= t('mobile.copyright') %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to mobile_map_path, {"data-transition" => "flip"} do %>
|
||||
<i class="icons-location"></i>
|
||||
<%= t('mobile.location') %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to mobile_dialog_contact_path, {"data-rel" => "dialog"} do %>
|
||||
<i class="icons-phone"></i>
|
||||
<%= t('mobile.contact') %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -0,0 +1,9 @@
|
||||
<header class="header" data-role="header">
|
||||
<h1 class="openmenu">
|
||||
<%= image_tag asset_path('mobile/logo.png') %>
|
||||
</h1>
|
||||
<i class="openmenu icons-arrow-bottom-e"></i>
|
||||
<%= link_to mobile_dialog_language_path, {:class => "ui-btn-right language", "data-iconpos" => "notext", "data-icon" => "search", "data-rel" => "dialog"} do %>
|
||||
<i class="icons-earth"></i>
|
||||
<% end %>
|
||||
</header>
|
||||
@@ -0,0 +1,3 @@
|
||||
<header data-role="header" data-theme="d">
|
||||
<h1><%= t('mobile.contact') %></h1>
|
||||
</header>
|
||||
@@ -0,0 +1,3 @@
|
||||
<header data-role="header" data-theme="d">
|
||||
<h1><%= t('mobile.copyright') %></h1>
|
||||
</header>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div data-role="header" data-theme="c">
|
||||
<h3><%= t('mobile.language') %></h3>
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div data-role="header">
|
||||
<h1><%= t('mobile.location') %></h1>
|
||||
</div>
|
||||
@@ -0,0 +1,9 @@
|
||||
<div data-role="dialog" id="language_select">
|
||||
<div data-role="content" data-theme="c">
|
||||
<h3><%= t('mobile.language') %></h3>
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<%= link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale), {"data-role" => "button", "data-theme" => "b", "data-shadow" => "true"} %>
|
||||
<% end %>
|
||||
<a href="#" data-role="button" data-mini="true" data-rel="back" data-theme="a"><%= t('mobile.cancel') %></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,7 @@
|
||||
<section class="main-menu">
|
||||
<ul class="clear">
|
||||
<li><%= link_to content_tag(:i, nil, :class => "icons-house") + content_tag(:span, t('mobile.home')), mobile_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => "icons-megaphone") + content_tag(:span, t('mobile.bulletin')), mobile_announcement_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => "icons-page") + content_tag(:span, t('mobile.page')), mobile_page_path %></li>
|
||||
</ul>
|
||||
</section>
|
||||
@@ -0,0 +1,13 @@
|
||||
<ul data-role="listview" class="list">
|
||||
<% @bulletins.each do |bulletin| %>
|
||||
<li data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-icon="arrow-r" data-iconpos="right" data-theme="c">
|
||||
<%= link_to mobile_announcement_content_path(bulletin), :class => "ui-link-inherit" do %>
|
||||
<%= image_tag bulletin.image.url, :class => "ui-li-thumb" %>
|
||||
<h3><%= bulletin.title %></h3>
|
||||
<p class="ui-li-aside ui-li-desc"><%= display_date(bulletin.postdate) %></p>
|
||||
<div class="ui-li-desc"><%= bulletin.subtitle %></div>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= paginate @bulletins, :param_name => :page_main, :window => 2 %>
|
||||
@@ -0,0 +1,6 @@
|
||||
<div class="newpic">
|
||||
<%= image_tag @bulletin.image.url %>
|
||||
</div>
|
||||
<h3 class="newstitle"><%= @bulletin.title %></h3>
|
||||
<p class="newsDate"><%= display_date_time(@bulletin.postdate) %></p>
|
||||
<div class="newsummary"><%= @bulletin.text.html_safe rescue '' %></div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<%= content_for :header do %>
|
||||
<%= render 'header_dialog_contact' %>
|
||||
<% 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>
|
||||
</ul>
|
||||
@@ -0,0 +1,6 @@
|
||||
<%= content_for :header do %>
|
||||
<%= render 'header_dialog_copyright' %>
|
||||
<% end %>
|
||||
|
||||
<p>本網站著作權屬於國立政治大學。</p>
|
||||
<p>RulingDigital 銳綸數位建置</p>
|
||||
@@ -0,0 +1,7 @@
|
||||
<%= content_for :header do %>
|
||||
<%= render 'header_dialog_language' %>
|
||||
<% end %>
|
||||
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<%= link_to t(:_locale, :locale => locale), add_locale(remove_locale((request.referer rescue request.fullpath)), locale), {"data-role" => "button", "data-theme" => "b", "data-shadow" => "true"} %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,19 @@
|
||||
<div class="slideshow">
|
||||
<% @ad_banner.ad_images.each do |image| %>
|
||||
<div class="slidebanner"><%= image_tag image.file.url, :class => 'slideImg' %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="newlist clear">
|
||||
<% @bulletins.each do |bulletin| %>
|
||||
<div class="newitem">
|
||||
<div class="newpic">
|
||||
<%= image_tag bulletin.image.url %>
|
||||
</div>
|
||||
<h3 class="newstitle">
|
||||
<%= link_to bulletin.title, mobile_announcement_content_path(bulletin) %>
|
||||
</h3>
|
||||
<p class="newsDate"><%= display_date(bulletin.postdate) %></p>
|
||||
<div class="newsummary"><%= bulletin.subtitle %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -0,0 +1,5 @@
|
||||
<%= content_for :header do %>
|
||||
<%= render 'header_map' %>
|
||||
<% end %>
|
||||
|
||||
<div id='map_canvas'></div>
|
||||
@@ -0,0 +1,10 @@
|
||||
<ul data-role="listview" class="list">
|
||||
<% @page_contexts.each do |page_context| %>
|
||||
<li>
|
||||
<%= link_to mobile_page_content_path(page_context) do %>
|
||||
<h3><%= page_context.page.title %></h3>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= paginate @page_contexts, :param_name => :page_main, :window => 2 %>
|
||||
@@ -0,0 +1,2 @@
|
||||
<h3 class="newstitle"><%= @page_context.page.title %></h3>
|
||||
<div class="newsummary"><%= @page_context.context.html_safe rescue '' %></div>
|
||||
Reference in new issue
Block a user