Merge branch 'design_team' into ldap
Conflicts: Gemfile app/models/ad_banner.rb
This commit is contained in:
commit
f950f77f36
146 files changed
+14041
-116
No files matched your search
+1
@@ -29,6 +29,7 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
||||
preview_content
|
||||
else
|
||||
@bulletin = Bulletin.can_display.where(_id: params[:id]).first
|
||||
impressionist(@bulletin)
|
||||
get_categorys
|
||||
end
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@ class Bulletin
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Mongoid::MultiParameterAttributes
|
||||
include Impressionist::Impressionable
|
||||
|
||||
is_impressionable :counter_cache => { :column_name => :view_count }
|
||||
|
||||
has_one :title, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy
|
||||
has_one :subtitle, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy
|
||||
@@ -23,6 +26,7 @@ class Bulletin
|
||||
field :is_pending, :type => Boolean, :default => true
|
||||
field :is_rejected, :type => Boolean, :default => false
|
||||
|
||||
field :view_count, :type => Integer, :default => 0
|
||||
|
||||
field :not_checked_reason
|
||||
|
||||
|
||||
Vendored
-6
@@ -99,12 +99,6 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
<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>
|
||||
<hr>
|
||||
<input type="text" class="input-xlarge">
|
||||
</div>
|
||||
</div>
|
||||
<% if params[:action] != 'new' %>
|
||||
|
||||
Vendored
+1
@@ -5,6 +5,7 @@
|
||||
<span class="date"><%= @bulletin.postdate %></span>
|
||||
|
|
||||
<a href="" class="unit"><%= User.find(@bulletin.create_user_id).sub_roles.collect{|t| t.key}.join(" ") rescue '' %></a>
|
||||
<span><%= dislpay_view_count(@bulletin) %></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_image">
|
||||
|
||||
Vendored
+1
@@ -30,6 +30,7 @@ class Panel::News::FrontEnd::NewsBulletinsController < OrbitWidgetController
|
||||
preview_content
|
||||
else
|
||||
@news_bulletin = NewsBulletin.can_display.where(_id: params[:id]).first
|
||||
impressionist(@news_bulletin)
|
||||
get_categorys
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
class NewsBulletin
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Mongoid::MultiParameterAttributes
|
||||
include Mongoid::MultiParameterAttributes
|
||||
include Impressionist::Impressionable
|
||||
|
||||
is_impressionable :counter_cache => { :column_name => :view_count }
|
||||
|
||||
has_one :title, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy
|
||||
has_one :subtitle, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy
|
||||
@@ -23,6 +26,7 @@ class NewsBulletin
|
||||
field :is_pending, :type => Boolean, :default => true
|
||||
field :is_rejected, :type => Boolean, :default => false
|
||||
|
||||
field :view_count, :type => Integer, :default => 0
|
||||
|
||||
field :not_checked_reason
|
||||
|
||||
|
||||
+1
@@ -5,6 +5,7 @@
|
||||
<span class="date"><%= @news_bulletin.postdate %></span>
|
||||
|
|
||||
<a href="" class="unit"><%= @news_bulletin.unit_list_for_anc.title[I18n.locale] rescue '' %></a>
|
||||
<span><%= dislpay_view_count(@news_bulletin) %></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_image">
|
||||
|
||||
+4
-4
@@ -6,10 +6,10 @@ class Panel::PageContent::FrontEnd::PageContextsController < OrbitWidgetControll
|
||||
end
|
||||
|
||||
def index
|
||||
|
||||
# @page_context = PageContext.where("page_id" => params[:page_id], :archived => false)
|
||||
@page_context = PageContext.first(conditions: { page_id: params[:page_id], :archived => false })
|
||||
|
||||
# @page_context = PageContext.where("page_id" => params[:page_id], :archived => false)
|
||||
@page_context = PageContext.first(conditions: { page_id: params[:page_id], :archived => false })
|
||||
impressionist(@page_context)
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.xml { render :xml => @page_contexts }
|
||||
|
||||
@@ -4,15 +4,17 @@ class PageContext
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Mongoid::MultiParameterAttributes
|
||||
|
||||
include Impressionist::Impressionable
|
||||
include OrbitCoreLib::ObjectAuthable
|
||||
|
||||
|
||||
is_impressionable :counter_cache => { :column_name => :view_count }
|
||||
|
||||
has_one :context, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy
|
||||
|
||||
field :create_user_id
|
||||
field :update_user_id
|
||||
field :version, :type => Integer , :default => 0
|
||||
field :view_count, :type => Integer, :default => 0
|
||||
|
||||
field :archived, :type => Boolean, :default => false
|
||||
# field :current, :type => Boolean, :default => false
|
||||
|
||||
+23
-23
@@ -1,23 +1,23 @@
|
||||
|
||||
<tr id="<%= dom_id page_context %>" class="with_action">
|
||||
<td>
|
||||
<%= page_context.page.path %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<%if is_manager? || is_admin? || page_context.authed_users(:edit).include?(current_user)%>
|
||||
<li><%= link_to t('admin.page_context.edit'), edit_panel_page_content_back_end_page_context_path(page_context) %></li>
|
||||
<%if (is_manager? || is_admin?) %>
|
||||
<li><%=show_page_context_edit_auth_link page_context%></li>
|
||||
<% end%>
|
||||
<% end -%>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%if is_manager? || is_admin? || page_context.authed_users(:edit).include?(current_user)%>
|
||||
<%= link_to page_context.version, panel_page_content_back_end_view_path(page_context.page_id) %>
|
||||
<%end -%>
|
||||
</td>
|
||||
<td><%= page_context.updated_at.strftime("%Y-%m-%d %H:%I:%S") %></td>
|
||||
<td><%= User.find(page_context.create_user_id).name %></td>
|
||||
</tr>
|
||||
<tr id="<%= dom_id page_context %>" class="with_action">
|
||||
<td>
|
||||
<%= page_context.page.path %></br>
|
||||
<%= page_context.page.i18n_variable[I18n.locale] %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<%if is_manager? || is_admin? || page_context.authed_users(:edit).include?(current_user)%>
|
||||
<li><%= link_to t('admin.page_context.edit'), edit_panel_page_content_back_end_page_context_path(page_context) %></li>
|
||||
<%if (is_manager? || is_admin?) %>
|
||||
<li><%=show_page_context_edit_auth_link page_context%></li>
|
||||
<% end%>
|
||||
<% end -%>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%if is_manager? || is_admin? || page_context.authed_users(:edit).include?(current_user)%>
|
||||
<%= link_to page_context.version, panel_page_content_back_end_view_path(page_context.page_id) %>
|
||||
<%end -%>
|
||||
</td>
|
||||
<td><%= page_context.updated_at.strftime("%Y-%m-%d %H:%I:%S") %></td>
|
||||
<td><%= User.find(page_context.create_user_id).name %></td>
|
||||
</tr>
|
||||
+2
@@ -6,3 +6,5 @@
|
||||
<h1 class="h1"><%= @page_context.page.i18n_variable[I18n.locale] rescue nil %></h1>
|
||||
|
||||
<div class="page_content"><%= @page_context.context[I18n.locale].html_safe rescue nil %></div>
|
||||
|
||||
<div><%= dislpay_view_count(@page_context) %></div>
|
||||
Reference in new issue
Block a user