Initial changes in announcement for sorting and filtering
This commit is contained in:
parent
22d9741ac8
commit
53ed4b0404
|
@ -55,5 +55,33 @@ module ApplicationHelper
|
||||||
render :partial => partial, :object => new_object, :locals => {:f => f}
|
render :partial => partial, :object => new_object, :locals => {:f => f}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def active_for_controllers(*controller_names)
|
||||||
|
controller_names.include?(controller.controller_name) ? 'active' : nil
|
||||||
|
end
|
||||||
|
|
||||||
|
def visible_for_controllers(*controller_names)
|
||||||
|
controller_names.include?(controller.controller_name) ? '' : 'hide'
|
||||||
|
end
|
||||||
|
|
||||||
|
def active_for_action(controller_name, action_name)
|
||||||
|
(controller.controller_name.eql?(controller_name) && controller.action_name.eql?(action_name)) ? 'active' : nil
|
||||||
|
end
|
||||||
|
|
||||||
|
def sortable(column)
|
||||||
|
direction = (column == params[:sort] && params[:direction] == "asc") ? "desc" : "asc"
|
||||||
|
{:sort => column, :direction => direction}
|
||||||
|
end
|
||||||
|
|
||||||
|
def add_filter(param_name, value)
|
||||||
|
filter = params[:filter] rescue nil
|
||||||
|
if filter && filter.has_key(param_name)
|
||||||
|
filter[param_name] << value
|
||||||
|
elsif filter
|
||||||
|
filter.merge({param_name => [value]})
|
||||||
|
else
|
||||||
|
{param_name => [value]}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
<li><%= link_to t(:homepage), root_path, :class => 'orbit-bar-home' %></li>
|
<li><%= link_to t(:homepage), root_path, :class => 'orbit-bar-home' %></li>
|
||||||
<li><a class="orbit-bar-desktop" href="#">Desktop</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav pull-right">
|
<ul class="nav pull-right">
|
||||||
<% if user_signed_in? %>
|
<% if user_signed_in? %>
|
||||||
|
@ -26,6 +25,7 @@
|
||||||
<span class="member-name"><%= current_user.name %></span>
|
<span class="member-name"><%= current_user.name %></span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu account-menu">
|
<ul class="dropdown-menu account-menu">
|
||||||
|
<li><a class="orbit-bar-desktop" href="#">Desktop</a></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<i class="icons-wrench"></i>
|
<i class="icons-wrench"></i>
|
||||||
|
|
|
@ -1,15 +1,37 @@
|
||||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-purchase') + t('admin.purchase'), admin_purchases_path %></li>
|
<%= content_tag :li, :class => active_for_controllers('purchases') do -%>
|
||||||
<li class="active">
|
<%= link_to content_tag(:i, nil, :class => 'icons-purchase') + t('admin.purchase'), admin_purchases_path %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
<%= content_tag :li, :class => active_for_controllers('bulletins', 'tags', 'bulletin_categorys') do -%>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.announcement'), panel_announcement_back_end_bulletins_path %>
|
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.announcement'), panel_announcement_back_end_bulletins_path %>
|
||||||
<ul class="nav nav-list">
|
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('bulletins', 'tags', 'bulletin_categorys')) do -%>
|
||||||
<li class="active"><%= link_to t('admin.all_articles'), panel_announcement_back_end_bulletins_path %></li>
|
<%= content_tag :li, link_to(t('admin.all_articles'), panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index') %>
|
||||||
<li><%= link_to t('admin.add_new'), new_panel_announcement_back_end_bulletin_path %></li>
|
<%= content_tag :li, link_to(t('admin.add_new'), new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') %>
|
||||||
<li><%= link_to t('admin.categories'), panel_announcement_back_end_bulletin_categorys_path %></li>
|
<%= content_tag :li, link_to(t('admin.categories'), panel_announcement_back_end_bulletin_categorys_path), :class => active_for_action('bulletin_categorys', 'index') %>
|
||||||
<li><%= link_to t('admin.tags'), panel_announcement_back_end_tags_path %></li>
|
<%= content_tag :li, link_to(t('admin.tags'), panel_announcement_back_end_tags_path), :class => active_for_action('tags', 'index') %>
|
||||||
</ul>
|
<% end -%>
|
||||||
</li>
|
<% end -%>
|
||||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), admin_users_path %></li>
|
|
||||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-page') + t('admin.page'), admin_items_path %></li>
|
<%= content_tag :li, :class => active_for_controllers('users') do -%>
|
||||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-window-block') + t('admin.design'), admin_designs_path %></li>
|
<%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), admin_users_path %>
|
||||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.link'), nil %></li>
|
<% end -%>
|
||||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-cog') + t('admin.site_settings'), nil %></li>
|
|
||||||
|
<%= content_tag :li, :class => active_for_controllers(nil) do -%>
|
||||||
|
<%= link_to content_tag(:i, nil, :class => 'icons-page') + t('admin.page'), admin_pages_path %>
|
||||||
|
<%#= content_tag :ul, :class => "nav nav-list" do -%>
|
||||||
|
<%#= content_tag :li, link_to(t('admin.all_pages'), panel_page_content_back_end_bulletins_path), :class => active_for_action('bulletins', 'index') %>
|
||||||
|
<%#= content_tag :li, link_to(t('admin.add_new'), new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') %>
|
||||||
|
<%# end -%>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
<%= content_tag :li, :class => active_for_controllers('designs') do -%>
|
||||||
|
<%= link_to content_tag(:i, nil, :class => 'icons-window-block') + t('admin.design'), admin_designs_path %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
<%= content_tag :li, :class => active_for_controllers(nil) do -%>
|
||||||
|
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.link'), nil %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
<%= content_tag :li, :class => active_for_controllers(nil) do -%>
|
||||||
|
<%= link_to content_tag(:i, nil, :class => 'icons-cog') + t('admin.site_settings'), nil %>
|
||||||
|
<% end -%>
|
|
@ -126,6 +126,7 @@ en:
|
||||||
non_multilingual: Non multilingual
|
non_multilingual: Non multilingual
|
||||||
options: Options
|
options: Options
|
||||||
orig_upload_file: Original filename
|
orig_upload_file: Original filename
|
||||||
|
page: Page
|
||||||
position: Position
|
position: Position
|
||||||
published?: Published?
|
published?: Published?
|
||||||
purchase: Purchase
|
purchase: Purchase
|
||||||
|
|
|
@ -12,7 +12,7 @@ class Panel::Announcement::BackEnd::BulletinsController < ApplicationController
|
||||||
|
|
||||||
# @bulletins = Bulletin.where("bulletin_category_id" => params[:bulletin_category_id]).desc("postdate") if params[:bulletin_category_id]
|
# @bulletins = Bulletin.where("bulletin_category_id" => params[:bulletin_category_id]).desc("postdate") if params[:bulletin_category_id]
|
||||||
|
|
||||||
@bulletins = Bulletin.search(params[:search],params[:category_id])
|
@bulletins = Bulletin.search(params[:search], params[:category_id]).order_by([params[:sort], params[:direction]])
|
||||||
@bulletin_categories = BulletinCategory.all
|
@bulletin_categories = BulletinCategory.all
|
||||||
|
|
||||||
module_app = ModuleApp.first(:conditions => {:key => 'announcement'})
|
module_app = ModuleApp.first(:conditions => {:key => 'announcement'})
|
||||||
|
|
|
@ -1,56 +1,57 @@
|
||||||
<div class="subnav">
|
<div class="subnav">
|
||||||
<ul class="nav nav-pills filter">
|
<ul class="nav nav-pills filter">
|
||||||
<li class="accordion-group">
|
<li class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a href="#collapse-status" data-toggle="collapse" data-parent=".filters" class="accordion-toggle"><%= t(:status) %> <b class="web-symbol"></b></a>
|
<a href="#collapse-status" data-toggle="collapse" data-parent=".filters" class="accordion-toggle"><%= t(:status) %> <b class="web-symbol"></b></a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="accordion-group">
|
<li class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a href="#collapse-category" data-toggle="collapse" data-parent=".filters" class="accordion-toggle"><%= t(:category) %> <b class="web-symbol"></b></a>
|
<a href="#collapse-category" data-toggle="collapse" data-parent=".filters" class="accordion-toggle"><%= t(:category) %> <b class="web-symbol"></b></a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="accordion-group">
|
<li class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a href="#collapse-tags" data-toggle="collapse" data-parent=".filters" class="accordion-toggle"><%= t(:tags) %> <b class="web-symbol"></b></a>
|
<a href="#collapse-tags" data-toggle="collapse" data-parent=".filters" class="accordion-toggle"><%= t(:tags) %> <b class="web-symbol"></b></a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="filters">
|
<div class="filters">
|
||||||
<div class="accordion-body collapse" id="collapse-status">
|
<div class="accordion-body collapse" id="collapse-status">
|
||||||
<div class="accordion-inner" data-toggle="buttons-checkbox">
|
<div class="accordion-inner" data-toggle="buttons-checkbox">
|
||||||
<a href="#" class="btn">Category1</a>
|
<a href="#" class="btn">Category1</a>
|
||||||
<a href="#" class="btn">Category2</a>
|
<a href="#" class="btn">Category2</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="filter-clear">
|
<div class="filter-clear">
|
||||||
<a href="#" class="btn"><i class="icons-brush-large"></i>Clear/重置</a>
|
<a href="#" class="btn"><i class="icons-brush-large"></i>Clear/重置</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="accordion-body collapse" id="collapse-category">
|
<div class="accordion-body collapse" id="collapse-category">
|
||||||
<div class="accordion-inner" data-toggle="buttons-checkbox">
|
<div class="accordion-inner" data-toggle="buttons-checkbox">
|
||||||
<a href="#" class="btn">Category1</a>
|
<% @bulletin_categories.each do |category| -%>
|
||||||
<a href="#" class="btn">Category2</a>
|
<%= link_to category.i18n_variable[I18n.locale], panel_announcement_back_end_bulletins_path(:filter => add_filter(:categories, category.id)), :class => 'btn' %>
|
||||||
</div>
|
<% end -%>
|
||||||
<div class="filter-clear">
|
</div>
|
||||||
<a href="#" class="btn"><i class="icons-brush-large"></i>Clear/重置</a>
|
<div class="filter-clear">
|
||||||
</div>
|
<a href="#" class="btn"><i class="icons-brush-large"></i>Clear/重置</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="accordion-body collapse" id="collapse-tags">
|
</div>
|
||||||
<div class="accordion-inner" data-toggle="buttons-checkbox">
|
<div class="accordion-body collapse" id="collapse-tags">
|
||||||
<a href="#" class="btn">Tag1</a>
|
<div class="accordion-inner" data-toggle="buttons-checkbox">
|
||||||
<a href="#" class="btn">Tag2</a>
|
<a href="#" class="btn">Tag1</a>
|
||||||
<a href="#" class="btn">Tag3</a>
|
<a href="#" class="btn">Tag2</a>
|
||||||
<a href="#" class="btn">Tag4</a>
|
<a href="#" class="btn">Tag3</a>
|
||||||
<a href="#" class="btn">Tag5</a>
|
<a href="#" class="btn">Tag4</a>
|
||||||
<a href="#" class="btn">Tag6</a>
|
<a href="#" class="btn">Tag5</a>
|
||||||
<a href="#" class="btn">Tag7</a>
|
<a href="#" class="btn">Tag6</a>
|
||||||
<a href="#" class="btn">Tag8</a>
|
<a href="#" class="btn">Tag7</a>
|
||||||
<a href="#" class="btn">Tag9</a>
|
<a href="#" class="btn">Tag8</a>
|
||||||
<a href="#" class="btn">Tag10</a>
|
<a href="#" class="btn">Tag9</a>
|
||||||
</div>
|
<a href="#" class="btn">Tag10</a>
|
||||||
<div class="filter-clear">
|
</div>
|
||||||
<a href="#" class="btn"><i class="icons-brush-large"></i>Clear/重置</a>
|
<div class="filter-clear">
|
||||||
</div>
|
<a href="#" class="btn"><i class="icons-brush-large"></i>Clear/重置</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,11 +1,6 @@
|
||||||
<% # encoding: utf-8 %>
|
<% # encoding: utf-8 %>
|
||||||
|
|
||||||
<%= f.error_messages %>
|
<!-- <%= f.error_messages %>
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :category %><br />
|
|
||||||
<%= f.select :bulletin_category_id, @bulletin_categorys.collect {|t| [ t.i18n_variable[I18n.locale], t.id ]} %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<%= f.label :image, t('announcement.image') %><br />
|
<%= f.label :image, t('announcement.image') %><br />
|
||||||
|
@ -144,5 +139,392 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<% end %>
|
<% end %> -->
|
||||||
|
|
||||||
|
<!--Widget start-->
|
||||||
|
<div id="sub-wiget">
|
||||||
|
<div id="widget-date" class="widget-box">
|
||||||
|
<div class="widget-action clear">
|
||||||
|
<a href="#" class="action"><i title="Set the announcement to start and end dates" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||||
|
</div>
|
||||||
|
<h3 class="widget-title"><i class="icons-calendar icons-white"></i> Date</h3>
|
||||||
|
<div class="widget-content clear">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Start</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select id="start-day" class="input-small">
|
||||||
|
<option>Day</option>
|
||||||
|
<option>1</option>
|
||||||
|
<option>2</option>
|
||||||
|
<option>3</option>
|
||||||
|
<option>4</option>
|
||||||
|
<option>5</option>
|
||||||
|
<option>6</option>
|
||||||
|
<option>7</option>
|
||||||
|
<option>8</option>
|
||||||
|
<option>9</option>
|
||||||
|
<option>10</option>
|
||||||
|
<option>11</option>
|
||||||
|
<option>12</option>
|
||||||
|
<option>13</option>
|
||||||
|
<option>14</option>
|
||||||
|
<option>15</option>
|
||||||
|
<option>16</option>
|
||||||
|
<option>17</option>
|
||||||
|
<option>18</option>
|
||||||
|
<option>19</option>
|
||||||
|
<option>20</option>
|
||||||
|
<option>21</option>
|
||||||
|
<option>22</option>
|
||||||
|
<option>23</option>
|
||||||
|
<option>24</option>
|
||||||
|
<option>25</option>
|
||||||
|
<option>26</option>
|
||||||
|
<option>27</option>
|
||||||
|
<option>28</option>
|
||||||
|
<option>29</option>
|
||||||
|
<option>30</option>
|
||||||
|
<option>31</option>
|
||||||
|
</select>
|
||||||
|
<select id="start-month" class="input-small">
|
||||||
|
<option>Month</option>
|
||||||
|
<option>1</option>
|
||||||
|
<option>2</option>
|
||||||
|
<option>3</option>
|
||||||
|
<option>4</option>
|
||||||
|
<option>5</option>
|
||||||
|
<option>6</option>
|
||||||
|
<option>7</option>
|
||||||
|
<option>8</option>
|
||||||
|
<option>9</option>
|
||||||
|
<option>10</option>
|
||||||
|
<option>11</option>
|
||||||
|
<option>12</option>
|
||||||
|
</select>
|
||||||
|
<select id="start-year" class="input-small">
|
||||||
|
<option>Year</option>
|
||||||
|
<option>2012</option>
|
||||||
|
<option>2011</option>
|
||||||
|
<option>2010</option>
|
||||||
|
<option>2009</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">End</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select id="start-day" class="input-small">
|
||||||
|
<option>Day</option>
|
||||||
|
<option>1</option>
|
||||||
|
<option>2</option>
|
||||||
|
<option>3</option>
|
||||||
|
<option>4</option>
|
||||||
|
<option>5</option>
|
||||||
|
<option>6</option>
|
||||||
|
<option>7</option>
|
||||||
|
<option>8</option>
|
||||||
|
<option>9</option>
|
||||||
|
<option>10</option>
|
||||||
|
<option>11</option>
|
||||||
|
<option>12</option>
|
||||||
|
<option>13</option>
|
||||||
|
<option>14</option>
|
||||||
|
<option>15</option>
|
||||||
|
<option>16</option>
|
||||||
|
<option>17</option>
|
||||||
|
<option>18</option>
|
||||||
|
<option>19</option>
|
||||||
|
<option>20</option>
|
||||||
|
<option>21</option>
|
||||||
|
<option>22</option>
|
||||||
|
<option>23</option>
|
||||||
|
<option>24</option>
|
||||||
|
<option>25</option>
|
||||||
|
<option>26</option>
|
||||||
|
<option>27</option>
|
||||||
|
<option>28</option>
|
||||||
|
<option>29</option>
|
||||||
|
<option>30</option>
|
||||||
|
<option>31</option>
|
||||||
|
</select>
|
||||||
|
<select id="start-month" class="input-small">
|
||||||
|
<option>Month</option>
|
||||||
|
<option>1</option>
|
||||||
|
<option>2</option>
|
||||||
|
<option>3</option>
|
||||||
|
<option>4</option>
|
||||||
|
<option>5</option>
|
||||||
|
<option>6</option>
|
||||||
|
<option>7</option>
|
||||||
|
<option>8</option>
|
||||||
|
<option>9</option>
|
||||||
|
<option>10</option>
|
||||||
|
<option>11</option>
|
||||||
|
<option>12</option>
|
||||||
|
</select>
|
||||||
|
<select id="start-year" class="input-small">
|
||||||
|
<option>Year</option>
|
||||||
|
<option>2012</option>
|
||||||
|
<option>2011</option>
|
||||||
|
<option>2010</option>
|
||||||
|
<option>2009</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="widget-status" class="widget-box">
|
||||||
|
<div class="widget-action clear">
|
||||||
|
<a class="action"><i title="Setting the announcement state" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||||
|
</div>
|
||||||
|
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i>Status</h3>
|
||||||
|
<div class="widget-content clear">
|
||||||
|
<div class="controls">
|
||||||
|
<label class="checkbox inline"><input type="checkbox" value="hot">Hot</label>
|
||||||
|
<label class="checkbox inline"><input type="checkbox" value="top">Top</label>
|
||||||
|
<label class="checkbox inline"><input type="checkbox" value="hide">Hide</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="widget-role" class="widget-box">
|
||||||
|
<div class="widget-action clear">
|
||||||
|
<a class="action"><i title="Set the read role" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||||
|
<a class="action"><i title="Setting" class="icon-cog icon-white tip"></i></a>
|
||||||
|
</div>
|
||||||
|
<h3 class="widget-title"><i class="icons-lock icons-white"></i>Permissions</h3>
|
||||||
|
<div class="widget-content clear">
|
||||||
|
<div class="controls">
|
||||||
|
<label class="radio inline"><input class="privacy" type="radio" value="public" name="privacy">Public</label>
|
||||||
|
<label class="radio inline"><input class="privacy" type="radio" value="private" name="privacy">Private</label>
|
||||||
|
<div class="well select-role">
|
||||||
|
<label class="checkbox inline"><input type="checkbox" value="hot">Student</label>
|
||||||
|
<label class="checkbox inline"><input type="checkbox" value="top">Teacher</label>
|
||||||
|
<label class="checkbox inline"><input type="checkbox" value="hide">Staff</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="widget-picture" class="widget-box">
|
||||||
|
<div class="widget-action clear">
|
||||||
|
<a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||||
|
</div>
|
||||||
|
<h3 class="widget-title"><i class="icons-picture icons-white"></i>Picture</h3>
|
||||||
|
<div class="widget-content clear">
|
||||||
|
<div class="control-group">
|
||||||
|
<img class="pull-left upload-picture" src="images/default-img.png" />
|
||||||
|
<div class="controls file-upload">
|
||||||
|
<label class="control-label btn" for="input-upload">
|
||||||
|
Browse/選擇檔案
|
||||||
|
<input id="input-upload" class="upload" type="file" name="upload" onchange="document.getElementById('fu').innerHTML = this.form.fu.value = this.value;">
|
||||||
|
</label>
|
||||||
|
<span id='fu' class="file-name"></span>
|
||||||
|
<br>
|
||||||
|
<input name='fu' class="input-medium" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="widget-tags" class="widget-box">
|
||||||
|
<div class="widget-action clear">
|
||||||
|
<a class="action"><i title="Enter post tags, Chinese and English required" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||||
|
<a class="action"><i title="Setting" class="icon-cog icon-white tip"></i></a>
|
||||||
|
</div>
|
||||||
|
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Tags</h3>
|
||||||
|
<div class="widget-content clear form-horizontal">
|
||||||
|
<div class="control-group error">
|
||||||
|
<label class="control-label" for="tags-zh-tw">
|
||||||
|
Chinese
|
||||||
|
</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input id='tags-zh-tw' class="input-prepend" type="text">
|
||||||
|
<span class="help-inline">Please correct the error</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="tags-en">
|
||||||
|
English
|
||||||
|
</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input id='tags-en' class="input-prepend" type="text">
|
||||||
|
<span class="help-inline">Please correct the error</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="clear">
|
||||||
|
<a class="pull-right btn btn-primary" href="#">Add/新增</a>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<span class="label label-tags">Default<a href><i class="icon-remove icon-white"></i></a></span>
|
||||||
|
<span class="label label-tags">Default<a href><i class="icon-remove icon-white"></i></a></span>
|
||||||
|
<span class="label label-tags">Default<a href><i class="icon-remove icon-white"></i></a></span>
|
||||||
|
<span class="label label-tags">Default<a href><i class="icon-remove icon-white"></i></a></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--Wiget End-->
|
||||||
|
<!--Post Start-->
|
||||||
|
<div id="post-body">
|
||||||
|
<div id="post-body-content" class="clear">
|
||||||
|
<%= f.select :bulletin_category_id, @bulletin_categorys.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-medium" %> <div class="btn-group pull-right">
|
||||||
|
<a class="btn dropdown-toggle" href="#" data-toggle="dropdown">
|
||||||
|
English
|
||||||
|
<span class="caret"></span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href="#">English</a></li>
|
||||||
|
<li><a href="#">Chinese</a></li>
|
||||||
|
<li><a href="#">Japanese</a></li>
|
||||||
|
<li><a href="#">French</a></li>
|
||||||
|
<li><a href="#">German</a></li>
|
||||||
|
<!--<li class="divider"></li>
|
||||||
|
<li><a href="#">Separated link</a></li>-->
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="title">
|
||||||
|
<input class="post-title" type="text" placeholder="Enter title here">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="editor">
|
||||||
|
<%= text_area_tag 'locale', nil, :style=>"width:100%" %>
|
||||||
|
</div>
|
||||||
|
<div class="main-wiget">
|
||||||
|
<div id="widget-link" class="widget-box">
|
||||||
|
<div class="widget-action clear">
|
||||||
|
<a class="action"><i title="Add a reference link" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||||
|
</div>
|
||||||
|
<h3 class="widget-title"><i class="icons-link icons-white"></i>Link</h3>
|
||||||
|
<div class="widget-content">
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Chinese</th>
|
||||||
|
<th>English</th>
|
||||||
|
<th class="span1"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:center" colspan="3">
|
||||||
|
<a class="btn btn-primary btn-small" href="#modal-link" data-toggle="modal"><i class="icon-plus icon-white"></i> ADD/新增</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>…</td>
|
||||||
|
<td>…</td>
|
||||||
|
<td><a href="#modal-link" data-toggle="modal" class="action"><i class="icon-pencil"></i></a><a href class="action"><i class="icon-remove"></i></a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div id="modal-link" class="modal hide fade">
|
||||||
|
<div class="modal-header">
|
||||||
|
<a class="close" data-dismiss="modal">×</a>
|
||||||
|
<h3>Add Link / Edit Link</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body form-horizontal">
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="http" class="control-label">http://</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" value="" id="http" class="input-xlarge">
|
||||||
|
<span class="help-inline">Please correct the error</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group error">
|
||||||
|
<label for="link-zh-tw" class="control-label">Chinese</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" value="" id="link-zh-tw" class="input-xlarge">
|
||||||
|
<span class="help-inline">Please correct the error</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="link-en" class="control-label">English</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" value="" id="link-en" class="input-xlarge">
|
||||||
|
<span class="help-inline">Please correct the error</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a class="btn btn-primary" href="#">Submit/確定</a>
|
||||||
|
<a class="btn" data-dismiss="modal" href="#">Cancel/取消</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="widget-file" class="widget-box">
|
||||||
|
<div class="widget-action clear">
|
||||||
|
<a class="action"><i title="Added to the file" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||||
|
</div>
|
||||||
|
<h3 class="widget-title"><i class="icons-paperclip icons-white"></i>File</h3>
|
||||||
|
<div class="widget-content">
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Chinese</th>
|
||||||
|
<th>English</th>
|
||||||
|
<th class="span1"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:center" colspan="3">
|
||||||
|
<a class="btn btn-primary btn-small" href="#modal-file" data-toggle="modal"><i class="icon-plus icon-white"></i> ADD/新增</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>…</td>
|
||||||
|
<td>…</td>
|
||||||
|
<td><a href="#modal-file" data-toggle="modal" class="action"><i class="icon-pencil"></i></a><a href class="action"><i class="icon-remove"></i></a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div id="modal-file" class="modal hide fade">
|
||||||
|
<div class="modal-header">
|
||||||
|
<a class="close" data-dismiss="modal">×</a>
|
||||||
|
<h3>Add File / Edit File</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body form-horizontal">
|
||||||
|
<div class="controls file-upload">
|
||||||
|
<label class="control-label btn" for="input-upload">
|
||||||
|
Browse
|
||||||
|
<input id="input-upload" class="upload" type="file" name="upload" onchange="document.getElementById('fn').innerHTML = this.value;">
|
||||||
|
</label>
|
||||||
|
<span id='fn' class="file-name"></span>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="file-zh-tw" class="control-label">Chinese</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" value="" id="file-zh-tw" class="input-xlarge">
|
||||||
|
<span class="help-inline">Please correct the error</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="file-en" class="control-label">English</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" value="" id="file-en" class="input-xlarge">
|
||||||
|
<span class="help-inline">Please correct the error</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a class="btn btn-primary" href="#">Submit/確定</a>
|
||||||
|
<a class="btn" data-dismiss="modal" href="#">Cancel/取消</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--Post End-->
|
||||||
|
<div class="form-actions">
|
||||||
|
<button class="btn btn-success" type="submit">Preview/預覽</button>
|
||||||
|
<button class="btn btn-primary" type="submit">Submit/送出</button>
|
||||||
|
<button class="btn" type="reset">Cancel/取消</button>
|
||||||
|
</div>
|
|
@ -1,16 +1,7 @@
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<h1><%= t('announcement.editing_announcement') %></h1>
|
<h1><%= t('announcement.editing_announcement') %></h1>
|
||||||
|
|
||||||
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletin_path(@bulletin) do |f| %>
|
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletin_path(@bulletin), :html => {:class => 'clear'} do |f| %>
|
||||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= link_back %>
|
<%= link_back %>
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
|
@ -1,48 +1,3 @@
|
||||||
<!-- <% content_for :secondary do %>
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<ul class="list">
|
|
||||||
<li><%= link_to t('bulletin.new_announcement'), new_panel_announcement_back_end_bulletin_path %></li>
|
|
||||||
<li><%= link_to t('bulletin.announcement_list'), panel_announcement_back_end_bulletins_path %></li>
|
|
||||||
<li><%= link_to t('bulletin.new_announcement_class'), panel_announcement_back_end_bulletin_categorys_path %></li>
|
|
||||||
</ul>
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<%= flash_messages %>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<fieldset><legend><%= t('bulletin.search') %></legend>
|
|
||||||
|
|
||||||
<%= form_for :bulletin, :action => 'search', :method => 'get', :url => panel_announcement_back_end_bulletins_path do |f| %>
|
|
||||||
|
|
||||||
<%#= f.select :bulletin_category_id, @bulletin_categorys.collect {|t| [ t.i18n_variable[I18n.locale], t.id ] },{ :include_blank => t('bulletin.select') }%>
|
|
||||||
|
|
||||||
Category <%= select_tag "category_id", options_for_select(@bulletin_categorys.collect{|t| [t.i18n_variable[I18n.locale], t.id]}), :prompt => t('bulletin.select') %>
|
|
||||||
|
|
||||||
KeyWord <%= text_field_tag :search, params[:search], :id => 'search_field' %>
|
|
||||||
|
|
||||||
<%= submit_tag "Search", :name => nil %>
|
|
||||||
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
|
|
||||||
|
|
||||||
<br />
|
|
||||||
-->
|
|
||||||
|
|
||||||
<%= render 'filter' %>
|
<%= render 'filter' %>
|
||||||
<table class="table main-list">
|
<table class="table main-list">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -51,14 +6,22 @@
|
||||||
<input type="checkbox">
|
<input type="checkbox">
|
||||||
<a href class="list-remove"><i class="icon-trash"></i></a>
|
<a href class="list-remove"><i class="icon-trash"></i></a>
|
||||||
</th>
|
</th>
|
||||||
<th class="span1"><%= t('bulletin.status') %></th>
|
<th id="sort-status" class="sort span1">
|
||||||
<th class="span1-2"><%= t('bulletin.category') %></th>
|
<%= link_to (t('bulletin.status') + content_tag(:b, nil, :class => "web-symbol")), panel_announcement_back_end_bulletins_path(sortable('status')) %>
|
||||||
<th class="span7 select"><%= t('bulletin.title') %></th>
|
</th>
|
||||||
<th class="span1-2"><%= t('bulletin.start_date') %></th>
|
<th id="sort-status" class="sort span1-2">
|
||||||
<th class="span1-2"><%= t('bulletin.end_date') %></th>
|
<%= link_to (t('bulletin.category') + content_tag(:b, nil, :class => "web-symbol")), panel_announcement_back_end_bulletins_path(sortable('category')) %>
|
||||||
<th class="span1-2"><%= t('bulletin.tags') %></th>
|
</th>
|
||||||
<th class="span1-2"><%= t('bulletin.last_modified') %></th>
|
<%= link_to content_tag(:th, (t('bulletin.title') + content_tag(:b, nil, :class => "web-symbol")), :id => "sort-title", :class => "sort span7 select active"), panel_announcement_back_end_bulletins_path %>
|
||||||
</tr>
|
<th id="sort-status" class="sort span1-2">
|
||||||
|
<%= link_to (t('bulletin.start_date') + content_tag(:b, nil, :class => "web-symbol")), panel_announcement_back_end_bulletins_path(sortable('start_date')) %>
|
||||||
|
</th>
|
||||||
|
<th id="sort-status" class="sort span1-2">
|
||||||
|
<%= link_to (t('bulletin.end_date') + content_tag(:b, nil, :class => "web-symbol")), panel_announcement_back_end_bulletins_path(sortable('end_date')) %>
|
||||||
|
</th>
|
||||||
|
<%= link_to content_tag(:th, (t('bulletin.tags') + content_tag(:b, nil, :class => "web-symbol")), :id => "sort-tags", :class => "sort span1-2"), panel_announcement_back_end_bulletins_path %>
|
||||||
|
<%= link_to content_tag(:th, (t('bulletin.last_modified') + content_tag(:b, nil, :class => "web-symbol")), :id => "sort-lastModified", :class => "sort span1-2"), panel_announcement_back_end_bulletins_path %>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<%= render :partial => 'bulletin', :collection => @bulletins %>
|
<%= render :partial => 'bulletin', :collection => @bulletins %>
|
||||||
|
|
Reference in New Issue