Basic function for ad_banner
This commit is contained in:
1 parent
ccbde122df
commit
3287b68354
4 files changed
+16
-114
No files matched your search
-34
@@ -1,34 +0,0 @@
|
||||
<div class='list_item'>
|
||||
|
||||
<% bulletin_files.each do | bulletin_file | %>
|
||||
<%= fields_for 'bulletin[bulletin_files][]', bulletin_file, :index => nil do |f| %>
|
||||
<div class="field">
|
||||
<%= f.label :file %>
|
||||
<%#= file_field_tag 'bulletin[file]' %>
|
||||
<%= f.file_field :file %>
|
||||
|
||||
<%= f.label :file_title %>
|
||||
<%= f.text_field :filetitle %>
|
||||
|
||||
<%= f.label :file_description %>
|
||||
<%= f.text_field :description %>
|
||||
|
||||
<span class="action">
|
||||
<% if bulletin_file.new_record? %>
|
||||
<a href="#" class="delete"><%= t(:delete) %></a>
|
||||
<% else %>
|
||||
<%= f.hidden_field :id %>
|
||||
<% if bulletin_file.is_built_in? %>
|
||||
<a href="#" class="switch" id="<%= bulletin_file.id %>"></a>
|
||||
<%= f.hidden_field :disabled, :value => bulletin_file.is_disabled? , :class => 'built_in_state' %>
|
||||
<% else %>
|
||||
<a href="#" class="remove_existing_record"><%= t(:delete) %></a>
|
||||
<%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
-64
@@ -1,64 +0,0 @@
|
||||
<% 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.new_announcement_class'), panel_announcement_back_end_bulletin_categorys_path %></li>
|
||||
</ul>
|
||||
<% end -%>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<h1><%= t('bulletin.list_announcement') %></h1>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<% @bulletin_categorys.each do |t| %>
|
||||
|
||||
<h4><%= link_to t.i18n_variable[I18n.locale], panel_announcement_back_end_bulletins_path(:bulletin_category_id => t.id ) %></h4>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th><%= t('bulletin.category') %></th>
|
||||
<th><%= t('bulletin.title') %></th>
|
||||
<th><%= t('bulletin.image') %></th>
|
||||
<th><%= t('bulletin.file') %></th>
|
||||
<th><%= t('bulletin.text') %></th>
|
||||
<th><%= t('bulletin.postdate') %></th>
|
||||
<th><%= t('bulletin.deadline') %></th>
|
||||
<th><%= t('bulletin.action') %></th>
|
||||
</tr>
|
||||
|
||||
<% t.bulletins.each do |post| %>
|
||||
<tr>
|
||||
<td><%= link_to post.bulletin_category.i18n_variable[I18n.locale], panel_announcement_front_end_bulletin_path(post) %></td>
|
||||
<td><%= post.title %></td>
|
||||
<td><%= link_to t('bulletin.image'), post.image.url, {:target => '_blank', :title => post.alt} if post.image.file %></td>
|
||||
<td>
|
||||
<% post.bulletin_files.each do | bfile | %>
|
||||
<%= link_to bfile.filetitle, bfile.file.url, {:target => '_blank', :title => bfile.description} if bfile.file.file %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= truncate(post.text,:length=>15) %></td>
|
||||
<td><%= post.postdate %></td>
|
||||
<td><%= post.deadline %></td>
|
||||
<td>
|
||||
<%= link_to t('bulletin.edit'), edit_panel_announcement_back_end_bulletin_path(post) %> |
|
||||
<%= link_to t('bulletin.delete'), panel_announcement_back_end_bulletin_path(post), :confirm => t('announcement.sure?'), :method => :delete, :confirm => 'Are you sure?' %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
|
||||
</table>
|
||||
|
||||
<% end %>
|
||||
|
||||
<br />
|
||||
|
||||
Reference in new issue
Block a user