* support news
This commit is contained in:
parent
96ffaedb1a
commit
c05c706455
|
|
@ -0,0 +1,6 @@
|
|||
ActiveAdmin.register JamRuby::News, :as => 'News' do
|
||||
|
||||
menu :parent => 'Misc'
|
||||
|
||||
|
||||
end
|
||||
|
|
@ -320,4 +320,5 @@ jam_tracks_bpm.sql
|
|||
jam_track_sessions.sql
|
||||
jam_track_sessions_v2.sql
|
||||
email_screening.sql
|
||||
bounced_email_cleanup.sql
|
||||
bounced_email_cleanup.sql
|
||||
news.sql
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
CREATE TABLE news (
|
||||
id VARCHAR(64) PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
title VARCHAR NOT NULL,
|
||||
body VARCHAR NOT NULL,
|
||||
position INTEGER NOT NULL UNIQUE,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
|
@ -236,6 +236,7 @@ require "jam_ruby/models/user_sync"
|
|||
require "jam_ruby/models/payment_history"
|
||||
require "jam_ruby/models/video_source"
|
||||
require "jam_ruby/models/text_message"
|
||||
require "jam_ruby/models/news"
|
||||
require "jam_ruby/models/sale"
|
||||
require "jam_ruby/models/sale_line_item"
|
||||
require "jam_ruby/models/recurly_transaction_web_hook"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
module JamRuby
|
||||
class News < ActiveRecord::Base
|
||||
|
||||
self.table_name = 'news'
|
||||
|
||||
attr_accessible :title, :body, :position, as: :admin
|
||||
default_scope { order('position') }
|
||||
validates :title, presence: true
|
||||
validates :body, presence: true
|
||||
validates :position, presence: true, numericality: {only_integer: true}, uniqueness: true
|
||||
|
||||
end
|
||||
end
|
||||
|
|
@ -17,6 +17,17 @@ context = window
|
|||
alertify.alert("COMING SOON!");
|
||||
|
||||
render: () ->
|
||||
|
||||
items = []
|
||||
|
||||
for item in gon.news
|
||||
items.push(`<div dangerouslySetInnerHTML={{__html: "<strong>" + item.title + "</strong>" + item.body}} key={item.position}></div>`)
|
||||
|
||||
news = `<div><h5 className="widget-title">WHAT'S NEW</h5>
|
||||
{items}</div>`
|
||||
|
||||
|
||||
|
||||
`<div>
|
||||
<div id="header-top">
|
||||
<div className="container">
|
||||
|
|
@ -304,7 +315,6 @@ context = window
|
|||
about us</a></p>
|
||||
<br/>
|
||||
|
||||
<img src="/assets/modern/logo-2.png" alt=""/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -315,65 +325,32 @@ context = window
|
|||
|
||||
<div className="widget ewf_widget_contact_info">
|
||||
|
||||
<h5 className="widget-title">WHAT'S NEW</h5>
|
||||
|
||||
<strong>Support</strong>
|
||||
|
||||
<p>For technical support and help using our products and services,
|
||||
please visit the <a indepth="true"
|
||||
rel="external"
|
||||
href="default.html">JamKazam
|
||||
Support Center</a>.</p>
|
||||
<strong>Partnerships</strong>
|
||||
|
||||
<p>For partnering inquiries, please contact us at: <a
|
||||
rel="external" href="mailto:partners@jamkazam.com">partners@jamkazam.com</a>.
|
||||
</p>
|
||||
<strong>Media</strong>
|
||||
|
||||
<p>For inquiries from traditional media, bloggers, and others
|
||||
interested in sharing news and information
|
||||
about us with others, please visit the <a
|
||||
href="http://jeffkoke.com/corp/media_center">JamKazam Media
|
||||
Center</a>, and you may also contact us at <a rel="external"
|
||||
href="mailto:pr@jamkazam.com">pr@jamkazam.com</a>.
|
||||
</p>
|
||||
<strong>Infringement</strong>
|
||||
|
||||
<p>To report content hosted on the JamKazam platform that that
|
||||
infringes your copyright or the copyright of
|
||||
a third party on whose behalf you are entitled to act, please
|
||||
see the Reporting Infringements section of
|
||||
the JamKazam Terms of Service.</p>
|
||||
<strong>General</strong>
|
||||
|
||||
<p>For general inquiries, please contact us at: <a rel="external"
|
||||
href="mailto:info@jamkazam.com">info@jamkazam.com</a>.
|
||||
</p>
|
||||
{news}
|
||||
|
||||
</div>
|
||||
<div className="widget ewf_widget_social_media">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="fixed">
|
||||
<div className="row">
|
||||
<img className="bottom-row-item" src="/assets/modern/logo-2.png" alt=""/>
|
||||
|
||||
<a href="https://www.facebook.com/JamKazam" className="facebook-icon social-icon">
|
||||
<i className="fa fa-facebook"></i>
|
||||
</a>
|
||||
<div className="bottom-row-item widget ewf_widget_social_media">
|
||||
<div className="fixed">
|
||||
<a href="https://www.facebook.com/JamKazam" className="facebook-icon social-icon">
|
||||
<i className="fa fa-facebook"></i>
|
||||
</a>
|
||||
|
||||
<a href="https://www.twitter.com/jamkazam" className="twitter-icon social-icon">
|
||||
<i className="fa fa-twitter"></i>
|
||||
</a>
|
||||
<a href="https://www.twitter.com/jamkazam" className="twitter-icon social-icon">
|
||||
<i className="fa fa-twitter"></i>
|
||||
</a>
|
||||
|
||||
<a href="https://plus.google.com/+Jamkazam" className="googleplus-icon social-icon">
|
||||
<i className="fa fa-google-plus"></i>
|
||||
</a>
|
||||
|
||||
<a href="https://www.youtube.com/channel/UC38nc9MMZgExJAd7ca3rkUA" className="youtube-icon social-icon">
|
||||
<i className="fa fa-youtube"></i>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<a href="https://plus.google.com/+Jamkazam" className="googleplus-icon social-icon">
|
||||
<i className="fa fa-google-plus"></i>
|
||||
</a>
|
||||
|
||||
<a href="https://www.youtube.com/channel/UC38nc9MMZgExJAd7ca3rkUA" className="youtube-icon social-icon">
|
||||
<i className="fa fa-youtube"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -406,6 +383,7 @@ context = window
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -190,6 +190,15 @@ a.sign-in {
|
|||
text-align:center;
|
||||
}
|
||||
|
||||
.bottom-row-item {
|
||||
float:left;
|
||||
|
||||
&img {
|
||||
margin-top: 10px;
|
||||
margin-left: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.alertify-button {
|
||||
text-shadow:none;
|
||||
box-shadow:none;
|
||||
|
|
@ -206,4 +215,5 @@ a.sign-in {
|
|||
font-family: 'Quicksand', Arial, sans-serif;
|
||||
color:black;
|
||||
font-size:26px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -208,6 +208,8 @@ class UsersController < ApplicationController
|
|||
return
|
||||
end
|
||||
|
||||
gon.news = News.all
|
||||
|
||||
render :layout => "modern"
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue