Basic function for ad_banner
This commit is contained in:
parent
46db173e0b
commit
ec428f240c
|
@ -24,21 +24,21 @@ PrototypeR4::Application.configure do
|
||||||
config.action_dispatch.best_standards_support = :builtin
|
config.action_dispatch.best_standards_support = :builtin
|
||||||
|
|
||||||
|
|
||||||
config.middleware.use ExceptionNotifier,
|
# config.middleware.use ExceptionNotifier,
|
||||||
:email_prefix => "[R4_error]",
|
# :email_prefix => "[R4_error]",
|
||||||
:sender_address => %{"notifier" <redmine@rulingcom.com>},
|
# :sender_address => %{"notifier" <redmine@rulingcom.com>},
|
||||||
:exception_recipients => %w{chris@rulingcom.com}
|
# :exception_recipients => %w{chris@rulingcom.com}
|
||||||
|
#
|
||||||
config.action_mailer.delivery_method = :smtp
|
# config.action_mailer.delivery_method = :smtp
|
||||||
config.action_mailer.smtp_settings = {
|
# config.action_mailer.smtp_settings = {
|
||||||
:tls => true,
|
# :tls => true,
|
||||||
:enable_starttls_auto => true,
|
# :enable_starttls_auto => true,
|
||||||
:address => "smtp.gmail.com",
|
# :address => "smtp.gmail.com",
|
||||||
:port => '587',
|
# :port => '587',
|
||||||
:domain => "smtp.gmail.com",
|
# :domain => "smtp.gmail.com",
|
||||||
:authentication => "plain",
|
# :authentication => "plain",
|
||||||
:user_name => "redmine@rulingcom.com",
|
# :user_name => "redmine@rulingcom.com",
|
||||||
:password => "rulingredmine" }
|
# :password => "rulingredmine" }
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ PrototypeR4::Application.routes.draw do
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
resources :assets
|
resources :assets
|
||||||
resources :app_auths
|
resources :app_auths
|
||||||
|
resources :ad_banners
|
||||||
resources :designs do
|
resources :designs do
|
||||||
collection do
|
collection do
|
||||||
get 'upload_package'
|
get 'upload_package'
|
||||||
|
|
|
@ -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>
|
|
|
@ -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 />
|
|
||||||
|
|
Loading…
Reference in New Issue