fix announcement links & files
This commit is contained in:
commit
a755eb184b
84 files changed
+2009
-1672
No files matched your search
+1
-1
@@ -14,4 +14,4 @@
|
||||
<td><%= bulletin_category.i18n_variable[locale] rescue nil %></td>
|
||||
<% end %>
|
||||
<td><%= bulletin_category.display %></td>
|
||||
</tr>
|
||||
</tr>
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
<% # encoding: utf-8 %>
|
||||
|
||||
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :key %><br />
|
||||
<%= f.text_field :key %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :name %><br />
|
||||
<%= f.fields_for :i18n_variable, (@bulletin_category.new_record? ? @bulletin_category.build_i18n_variable : @bulletin_category.i18n_variable) do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %>
|
||||
<%= f.text_field locale, :style => "width:130px" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :display %> <br />
|
||||
<%#= f.select :display, BulletinCategory::PAYMENT_TYPES, :prompt => 'Select a display method' %>
|
||||
|
||||
<%= f.radio_button :display, "List" %>List
|
||||
<%#= f.label :display, 'list', :value => '1', :checked => @a %>
|
||||
<%= f.radio_button :display, "Picture" %>Picture
|
||||
<%#= f.label :display, 'picture', :value => '2', :checked => @b %>
|
||||
<br />顯示方式是設定在前台頁面時,資訊所呈現的樣式
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit %>
|
||||
</div>
|
||||
|
||||
|
||||
+8
-8
@@ -1,15 +1,15 @@
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<% content_for :secondary do %>
|
||||
<ul class="list">
|
||||
<li><%= link_to t('bulletin_category.index'), panel_announcement_back_end_bulletin_categorys_path, :class => 'seclink2' %></li>
|
||||
</ul>
|
||||
<%= render :partial => '/panel/announcement/back_end/announcement_secondary' %>
|
||||
<% end -%>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<h1><%= t('bulletin_category.new_announcement_class') %></h1>
|
||||
<%= form_for @bulletin_category, :url => panel_announcement_back_end_bulletin_categorys_path do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
|
||||
+3
-2
@@ -24,11 +24,12 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown"><%= link_to t('bulletin.delete'), panel_announcement_back_end_bulletin_path(bulletin), :confirm => t('announcement.sure?'), :method => :delete, :remote => true %></li>
|
||||
<li><%= link_to t('bulletin.fact_check'), edit_panel_announcement_back_end_bulletin_path(bulletin) %></li><%#= #TODO add ancher so user can quick access into that part %>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td><%= bulletin.bulletin_category.i18n_variable[I18n.locale] %></td>
|
||||
<td><%= link_to bulletin.title[I18n.locale], panel_announcement_back_end_bulletin_path(bulletin) %></td>
|
||||
<td><%= link_to bulletin.title[I18n.locale], panel_announcement_back_end_bulletin_path(bulletin) rescue ''%></td>
|
||||
<td><%= bulletin.postdate %></td>
|
||||
<td><%= (bulletin.deadline) ? bulletin.deadline : t('bulletin.no_deadline') %></td>
|
||||
<td>
|
||||
@@ -36,7 +37,7 @@
|
||||
<span class="label label-tags"><%= tag[I18n.locale] %></span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= User.from_id(bulletin.update_user_id).name %></td>
|
||||
<td><%= User.from_id(bulletin.update_user_id).name rescue ''%></td>
|
||||
</tr>
|
||||
|
||||
<%= render :partial => 'quick_edit', :locals => {:bulletin => bulletin} %>
|
||||
|
||||
+1
-1
@@ -36,4 +36,4 @@
|
||||
</thead>
|
||||
<tbody class="sort-holder">
|
||||
<%= render :partial => 'bulletin', :collection => @bulletins %>
|
||||
</tbody>
|
||||
</tbody>
|
||||
Vendored
+20
-44
@@ -1,6 +1,25 @@
|
||||
<% # encoding: utf-8 %>
|
||||
|
||||
<%= f.error_messages %>
|
||||
<%= f.select :bulletin_category_id, @bulletin_categorys.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-medium" %>
|
||||
<div class="field">
|
||||
<%= label :fact_check_stat, t('announcement.bulletin.fact_check_stat') %>
|
||||
<%= f.radio_button :is_checked, true%>
|
||||
<%= label :is_checked_true, t('announcement.bulletin.fact_check_pass') %>
|
||||
<%= f.radio_button :is_checked, false, (@bulletin.is_checked.nil?? {:checked => true} : {}) %>
|
||||
<%= label :is_checked_false, t('announcement.bulletin.fact_check_not_pass') %>
|
||||
|
||||
<%= label :is_checked_false, t('announcement.bulletin.fact_check_not_pass_reason') %>
|
||||
<%= f.text_field :not_checked_reason %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= f.label :image, t('announcement.image') %><br />
|
||||
<%= f.file_field :image %>
|
||||
<% if @bulletin.image.file %>
|
||||
<%= check_box_tag 'bulletin[image_del]' %>
|
||||
<%= t('announcement.刪除已上傳檔案') %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!--Widget start-->
|
||||
|
||||
@@ -83,7 +102,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--Wiget End-->
|
||||
<!--Post Start-->
|
||||
|
||||
@@ -194,49 +213,6 @@
|
||||
</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>
|
||||
<%#= render :partial => 'bulletin_link2', :collection => @bulletin.bulletin_links %>
|
||||
|
||||
<% @bulletin.bulletin_links.each_with_index do |bulletin_link2, i| %>
|
||||
<%= f.fields_for :bulletin_links, bulletin_link2 do |f| %>
|
||||
<%= render :partial => 'bulletin_link2', :object => bulletin_link2, :locals => {:f => f, :i => i} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="bulletin_link_qe"><%#= render :partial => "bulletin_link_qe" %></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="main-wiget">
|
||||
<div id="widget-file" class="widget-box">
|
||||
<div class="widget-action clear">
|
||||
|
||||
+5
-5
@@ -3,11 +3,11 @@
|
||||
<td colspan="8">
|
||||
<legend><%= t(:quick_edit) %> - <span class='qe_title'></span>Basic / Picture / Tags / Link / File</legend>
|
||||
<%= form_for bulletin, :url => panel_announcement_back_end_bulletin_path(bulletin), :html => {:class => 'form-horizontal'} do |f| %>
|
||||
<%= render :partial => "quick_edit_basic", :locals => { :f => f, :bulletin => bulletin } %>
|
||||
<%= render :partial => "quick_edit_picture", :locals => { :f => f, :bulletin => bulletin } %>
|
||||
<%= render :partial => "quick_edit_tags", :locals => { :f => f, :bulletin => bulletin } %>
|
||||
<%= render :partial => "quick_edit_links", :locals => { :f => f, :bulletin => bulletin } %>
|
||||
<%= render :partial => "quick_edit_files", :locals => { :f => f, :bulletin => bulletin } %>
|
||||
<%= render :partial => "panel/announcement/back_end/bulletins/quick_edit_basic", :locals => { :f => f, :bulletin => bulletin } %>
|
||||
<%= render :partial => "panel/announcement/back_end/bulletins/quick_edit_picture", :locals => { :f => f, :bulletin => bulletin } %>
|
||||
<%= render :partial => "panel/announcement/back_end/bulletins/quick_edit_tags", :locals => { :f => f, :bulletin => bulletin } %>
|
||||
<%= render :partial => "panel/announcement/back_end/bulletins/quick_edit_links", :locals => { :f => f, :bulletin => bulletin } %>
|
||||
<%= render :partial => "panel/announcement/back_end/bulletins/quick_edit_files", :locals => { :f => f, :bulletin => bulletin } %>
|
||||
<div class="form-actions">
|
||||
<%= f.submit t(:submit), :class => 'btn btn-primary' %>
|
||||
<%= f.submit t(:cancel), :class => 'btn', :type => 'reset' %>
|
||||
|
||||
Vendored
+1
-1
@@ -4,4 +4,4 @@
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
|
||||
<%= link_back %>
|
||||
<%= link_back %>
|
||||
Vendored
+1
-2
@@ -2,11 +2,10 @@
|
||||
<table id="bulettin_sort_list" class="table main-list">
|
||||
<%= render 'bulletins' %>
|
||||
</table>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('admin.add'), new_panel_announcement_back_end_bulletin_path, :class => 'btn btn-primary' %>
|
||||
</div>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<%= javascript_include_tag "bulletin_form" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
Vendored
+1
-2
@@ -1,6 +1,5 @@
|
||||
|
||||
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletins_path do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
|
||||
<%= link_back %>
|
||||
<%= link_back %>
|
||||
Vendored
+7
-3
@@ -1,10 +1,14 @@
|
||||
<% # encoding: utf-8 %>
|
||||
<% content_for :secondary do %>
|
||||
<%= render :partial => '/panel/announcement/back_end/announcement_secondary' %>
|
||||
<% end -%>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<p id="notice"><%= flash_messages %></p>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb
Vendored
+7
-3
@@ -2,7 +2,11 @@
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<h1 class="h1"><%= t('announcement.list_announcement') %></h1>
|
||||
<% if @current_category %>
|
||||
<h1 class="h1"><%= @current_category.i18n_variable[I18n.locale] + t('announcement.bulletin.list_lower') %></h1>
|
||||
<% else %>
|
||||
<h1 class="h1"><%= t('announcement.list_announcement') %></h1>
|
||||
<% end %>
|
||||
|
||||
|
||||
<table class="table table-bordered">
|
||||
@@ -24,6 +28,6 @@
|
||||
<% end %>
|
||||
|
||||
</table>
|
||||
|
||||
<%= paginate @bulletins %>
|
||||
|
||||
<%= paginate @bulletins, :params => {:inner => 'false'} %>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<% @web_links.each do |web_link| %>
|
||||
<li>
|
||||
<a><%= web_link.name[I18n.locale] %></a>
|
||||
<%= link_to web_link.name[I18n.locale], web_link.url %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in new issue
Block a user