Fix for mailer
This commit is contained in:
parent
e87c678eb7
commit
9f3042c4fe
|
@ -71,7 +71,12 @@ class Admin::SitesController < OrbitBackendController
|
||||||
end
|
end
|
||||||
|
|
||||||
def responsive_setting
|
def responsive_setting
|
||||||
|
@bulletins = Bulletin.all
|
||||||
|
@bulletin_categories = []
|
||||||
|
@bulletins.each do |bulletin|
|
||||||
|
@bulletin_categories << bulletin.get_bulletin_category
|
||||||
|
end
|
||||||
|
@categories = @bulletin_categories
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
|
||||||
|
|
||||||
def registration_approval
|
def registration_approval
|
||||||
page_num = params[:page] || 1
|
page_num = params[:page] || 1
|
||||||
@users = User.approval_pending.page(page_num).per(12).desc("_id")
|
@users = User.approval_pending.page(page_num).per(12).desc("_id").not_guest_and_approved_user
|
||||||
end
|
end
|
||||||
|
|
||||||
def approve_registration
|
def approve_registration
|
||||||
|
|
|
@ -19,7 +19,7 @@ class Site
|
||||||
field :sitemap_menu_in_header, :type => Boolean, :default => false
|
field :sitemap_menu_in_header, :type => Boolean, :default => false
|
||||||
field :enable_terms_of_use, :type => Boolean, :default => false
|
field :enable_terms_of_use, :type => Boolean, :default => false
|
||||||
field :enable_language_detection, :type => Boolean, :default => false
|
field :enable_language_detection, :type => Boolean, :default => false
|
||||||
field :enable_announcement_mobile, :type => Boolean, :default => false
|
field :announcement_category, :type => Array
|
||||||
|
|
||||||
field :title_always_on, :type => Boolean, :default => false
|
field :title_always_on, :type => Boolean, :default => false
|
||||||
field :dashbroad_allow_visitor, :type => Boolean, :default => false
|
field :dashbroad_allow_visitor, :type => Boolean, :default => false
|
||||||
|
|
|
@ -22,11 +22,6 @@ class User
|
||||||
field :cache_dept,type: Hash
|
field :cache_dept,type: Hash
|
||||||
field :status_record,type: Hash
|
field :status_record,type: Hash
|
||||||
field :approved, type: Boolean, :default => false
|
field :approved, type: Boolean, :default => false
|
||||||
field :reset_password_token, :type => String
|
|
||||||
field :reset_password_sent_at, :type => Time
|
|
||||||
field :remember_created_at, :type => Time
|
|
||||||
|
|
||||||
attr_accessible :remember_me
|
|
||||||
|
|
||||||
has_and_belongs_to_many :approving_apps, class_name: 'AuthApproval', inverse_of: 'authorized_users'
|
has_and_belongs_to_many :approving_apps, class_name: 'AuthApproval', inverse_of: 'authorized_users'
|
||||||
has_and_belongs_to_many :managing_apps, class_name: 'AuthManager', inverse_of: 'authorized_users'
|
has_and_belongs_to_many :managing_apps, class_name: 'AuthManager', inverse_of: 'authorized_users'
|
||||||
|
@ -63,6 +58,8 @@ class User
|
||||||
before_save :rebuild_status_record
|
before_save :rebuild_status_record
|
||||||
scope :remote_account, where(:nccu_id.ne => nil)
|
scope :remote_account, where(:nccu_id.ne => nil)
|
||||||
scope :not_guest_user, all_of(:name.ne => "guest").and(:approved => true)
|
scope :not_guest_user, all_of(:name.ne => "guest").and(:approved => true)
|
||||||
|
scope :not_guest_and_approved_user, all_of(:name.ne => "guest").and(:approved => false)
|
||||||
|
|
||||||
scope :approval_pending, where(:approved => false)
|
scope :approval_pending, where(:approved => false)
|
||||||
|
|
||||||
validates :user_id,
|
validates :user_id,
|
||||||
|
|
|
@ -26,13 +26,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="settings" class="control-group">
|
<!-- <div id="settings" class="control-group">
|
||||||
<label class="control-label muted"><%= I18n.t('site.announcement')%></label>
|
<label class="control-label muted"><%= I18n.t('site.announcement')%></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= f.check_box :enable_announcement_mobile , :class=>"toggle-check", :data=> { disabled: true } %>
|
<% @categories.each do |category|%>
|
||||||
<span class="help-block">Enable Announcements</span>
|
<%= check_box_tag "site[announcement_category][]", category.id.to_s, @site.announcement_category.include?(category), :class=>"toggle-check announcement_category", :data => { :title => "#{category.title}", disabled: true }, "data-deploy"=>"inline" %>
|
||||||
</div>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label muted"><%= I18n.t('site.mobile_api_openness_on') %></label>
|
<label class="control-label muted"><%= I18n.t('site.mobile_api_openness_on') %></label>
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<section class="main-menu">
|
<section class="main-menu">
|
||||||
<ul class="clear">
|
<ul class="clear">
|
||||||
<li><%= link_to content_tag(:i, nil, :class => "icons-house") + content_tag(:span, t('mobile.home')), mobile_path(:app => params[:app]) %></li>
|
<li><%= link_to content_tag(:i, nil, :class => "icons-house") + content_tag(:span, t('mobile.home')), mobile_path(:app => params[:app]) %></li>
|
||||||
|
<% if @site.enable_announcement_mobile %>
|
||||||
<li><%= link_to content_tag(:i, nil, :class => "icons-megaphone") + content_tag(:span, t('mobile.bulletin')), mobile_announcement_path(:app => params[:app]) %></li>
|
<li><%= link_to content_tag(:i, nil, :class => "icons-megaphone") + content_tag(:span, t('mobile.bulletin')), mobile_announcement_path(:app => params[:app]) %></li>
|
||||||
|
<% end %>
|
||||||
<li><%= link_to content_tag(:i, nil, :class => "icons-newspaper") + content_tag(:span, t('mobile.page')), mobile_page_path(:app => params[:app]) %></li>
|
<li><%= link_to content_tag(:i, nil, :class => "icons-newspaper") + content_tag(:span, t('mobile.page')), mobile_page_path(:app => params[:app]) %></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
|
@ -67,6 +67,10 @@ class Bulletin
|
||||||
self.category.title
|
self.category.title
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_bulletin_category
|
||||||
|
self.category
|
||||||
|
end
|
||||||
|
|
||||||
def share_item
|
def share_item
|
||||||
Item.first(conditions:{name: 'announcement'})
|
Item.first(conditions:{name: 'announcement'})
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
<h2>Videos</h2>
|
|
||||||
<ul class="video-list">
|
|
||||||
<% @client_videos.videos.each do |v| %>
|
|
||||||
<% @video = v.video_id.split(/tag:youtube.com,2008:video:+/).last %>
|
|
||||||
<% @vd = UnvlogIt.new("https://www.youtube.com/watch?v=#{@video}")%>
|
|
||||||
<li><p class="video-title"><%= @vd.title %>
|
|
||||||
<div class="video"><%= @vd.embed_html(200, 150).html_safe %></div></li>
|
|
||||||
<%end%>
|
|
Loading…
Reference in New Issue