foxynews 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +23 -0
- data/app/controllers/foxynews/presskits_controller.rb +10 -0
- data/app/controllers/foxynews/pressrooms_controller.rb +46 -0
- data/app/helpers/foxynews/foxynews_helper.rb +5 -0
- data/app/models/foxynews/featured_item.rb +4 -0
- data/app/services/foxynews/clipping.rb +14 -0
- data/app/services/foxynews/paging.rb +13 -0
- data/app/services/foxynews/parser.rb +28 -0
- data/app/services/foxynews/press_release.rb +22 -0
- data/app/services/foxynews/press_release_setter.rb +56 -0
- data/app/services/foxynews/presskit.rb +19 -0
- data/app/services/foxynews/presskit_setter.rb +48 -0
- data/app/services/foxynews/pressroom.rb +20 -0
- data/app/services/foxynews/pressroom_setter.rb +75 -0
- data/app/views/foxynews/partials/_contact_details.html.erb +18 -0
- data/app/views/foxynews/partials/_contact_panels.html.erb +28 -0
- data/app/views/foxynews/partials/_contact_social_media.html.erb +17 -0
- data/app/views/foxynews/partials/_featured_press_release.html.erb +12 -0
- data/app/views/foxynews/partials/_modal.html.erb +8 -0
- data/app/views/foxynews/partials/_presskits.html.erb +8 -0
- data/app/views/foxynews/partials/_pressroom_about.html.erb +6 -0
- data/app/views/foxynews/partials/_spokesman_details.html.erb +31 -0
- data/app/views/foxynews/partials/_thumbnails.html.erb +33 -0
- data/app/views/foxynews/partials/_timeline.html.erb +50 -0
- data/app/views/foxynews/presskits/show.html.erb +10 -0
- data/app/views/foxynews/pressrooms/index.html.erb +25 -0
- data/app/views/foxynews/pressrooms/show.html.erb +21 -0
- data/config/locales/en.yml +32 -0
- data/config/routes.rb +9 -0
- data/db/migrate/20150915120000_create_foxynews_featured_items.rb +13 -0
- data/db/migrate/20150921110000_change_article_to_article_id.rb +5 -0
- data/lib/foxynews.rb +10 -0
- data/lib/foxynews/engine.rb +13 -0
- data/lib/foxynews/version.rb +3 -0
- data/lib/generators/foxynews/initializer_generator.rb +12 -0
- data/lib/generators/foxynews/templates/foxynews_template.rb +3 -0
- data/lib/tasks/foxynews_tasks.rake +4 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/foxynews.rb +3 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +59 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20150921115208_create_foxynews_featured_items.foxynews.rb +14 -0
- data/test/dummy/db/migrate/20150921115209_change_article_to_article_id.foxynews.rb +6 -0
- data/test/dummy/db/schema.rb +27 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +351 -0
- data/test/dummy/log/test.log +9326 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/spec/features/pressroom_feature_spec.rb +101 -0
- data/test/dummy/spec/rails_helper.rb +52 -0
- data/test/dummy/spec/services/foxynews/press_release_setter_spec.rb +40 -0
- data/test/dummy/spec/services/foxynews/presskit_setter_spec.rb +40 -0
- data/test/dummy/spec/services/foxynews/pressroom_setter_spec.rb +50 -0
- data/test/dummy/spec/spec_helper.rb +92 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/0ieeKnMtadPClPcf7n4_-7f9dFAa5EKPn-nhh8g4E_I.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/3fB7XY5WyPu8FySUeyC372vbXJ2Ix4iB1QaNHXbk_BY.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +2 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/9dpacct--ty4g6t9ET48xr39Oa8KFJq67stokNMRBE0.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/CzzhnWANCyFkiMpG8MGAUus0oHH7jFGSjgKNQytoGB8.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/EHcymtlGKlOMMf7gOs-X2_jpvcBTW92Qeaxu2B5-Wbg.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/LGn_lRMM4VGWV-tOkzVE711bHWh5XhMIHtLL-ydCc5s.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +3 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/P6CzQLNPa_qmqh4oEs_FJcmJUu_RgN9rxL-u5eUX8a8.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/SGxtd6iKmB2TMwH-VOx-jVYXh5m_09UjNEOkifPHLL0.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ZF-VgWKVwd4l6mDAOWYmcWP44GkNpVapsSWxOVT_jXs.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/e_NLP8hWf6Ma_xNwWM6lWrQIYZIy62BM5mIpRIVEz24.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/eyIVoTHtfeBUAG8zonwJLMFQsk7muavIqU6by75vy6E.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/hZi1k6tpxxCGYxRe7zY74ItcOI8gZrREOpGuA8JSpGg.cache +3 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/hkb4T84XlBEogo6JU3t-W-8oWx1BbAVq7dqJ2DNHwt4.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/pEhaat2KBd5SrT7szC_8R1_6hK17FTpvoRFkmCRSD3M.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/1fnsGuWQsCAFit0Lhxi-NuDTrnuzg0MPZnEeYfoXT9Q.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/9dpacct--ty4g6t9ET48xr39Oa8KFJq67stokNMRBE0.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/9jPCqzZvmeFf31Rz8y3OEo8OQXEHVcwmLgkx0tXs-o8.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/CzzhnWANCyFkiMpG8MGAUus0oHH7jFGSjgKNQytoGB8.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/N-1CMS_rjg3LKA5Sh64XgIXIzy-4T-PQ8PIf4HY_R8s.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +3 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/WZy7M8vyOXLZi2NSRoODBS6edlqJTSpd1JoU8Aq03fY.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ZF-VgWKVwd4l6mDAOWYmcWP44GkNpVapsSWxOVT_jXs.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/eyIVoTHtfeBUAG8zonwJLMFQsk7muavIqU6by75vy6E.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/hZi1k6tpxxCGYxRe7zY74ItcOI8gZrREOpGuA8JSpGg.cache +3 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/o2kqwqoUQ3gkgncZO1IWdVRzFD0wCSQ-HyL62cINFOU.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/pEhaat2KBd5SrT7szC_8R1_6hK17FTpvoRFkmCRSD3M.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/pQIgTfLmEPykNamzxdqBww21SMT7YlZlZGy6hgQ6eVE.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/tAO-KLuNv0f9gUG3lGwGw7ujopxtlyjAr83jAzLWyq0.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/td9wUl9SLRnSSgE2ZK_VqCzLxTkFiCW50KkOhE916Wo.cache +1 -0
- data/test/dummy_responses/pressrooms_id.json +1 -0
- data/test/dummy_responses/pressrooms_id_press_releases.json +45 -0
- data/test/dummy_responses/pressrooms_id_press_releases_109544.json +1 -0
- data/test/dummy_responses/pressrooms_id_presskits.json +1 -0
- data/test/dummy_responses/pressrooms_id_presskits_215958.json +1 -0
- data/test/dummy_responses/pressrooms_id_timeline.json +135 -0
- data/test/test_helper.rb +19 -0
- metadata +302 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<section class="hide-for-print" id="information">
|
|
2
|
+
<dl class="accordion" data-accordion>
|
|
3
|
+
<dd>
|
|
4
|
+
<a href="#panel_details">
|
|
5
|
+
<i class="ss-info custom-text-color"/>
|
|
6
|
+
<span><%= t('pressroom.contact.header') %></span>
|
|
7
|
+
</a>
|
|
8
|
+
<%= render partial: 'foxynews/partials/contact_details', locals: {pressroom: pressroom} %>
|
|
9
|
+
</dd>
|
|
10
|
+
<% if pressroom.pr_contacts.present? %>
|
|
11
|
+
<dd>
|
|
12
|
+
<a href="#panel_contacts">
|
|
13
|
+
<i class="ss-info custom-text-color"/>
|
|
14
|
+
<span><%= t('pressroom.contact.spokesman') %></span>
|
|
15
|
+
</a>
|
|
16
|
+
<%= render partial: 'foxynews/partials/spokesman_details', locals: {pr_contacts: pressroom.pr_contacts} %>
|
|
17
|
+
</dd>
|
|
18
|
+
<% end %>
|
|
19
|
+
<dd class="hide-for-print">
|
|
20
|
+
<a href="#panel_social">
|
|
21
|
+
<i class="ss-megaphone custom-text-color"/>
|
|
22
|
+
<span><%= t('pressroom.contact.social_media') %></span>
|
|
23
|
+
</a>
|
|
24
|
+
<%= render partial: 'foxynews/partials/contact_social_media', locals: {pressroom: pressroom} %>
|
|
25
|
+
</dd>
|
|
26
|
+
</dl>
|
|
27
|
+
</section>
|
|
28
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<div class="content" id="panel_social">
|
|
2
|
+
<% if pressroom.urls['facebook'].present? %>
|
|
3
|
+
<a href=<%= pressroom.urls['facebook'] %> title="Facebook"><i class="social-facebook"></i></a>
|
|
4
|
+
<% end %>
|
|
5
|
+
<% if pressroom.urls['twitter'].present? %>
|
|
6
|
+
<a href=<%= pressroom.urls['twitter'] %> title="Twitter"><i class="social-twitter"></i></a>
|
|
7
|
+
<% end %>
|
|
8
|
+
<% if pressroom.urls['linkedin'].present? %>
|
|
9
|
+
<a href=<%= pressroom.urls['linkedin'] %> title="Linkedin"><i class="social-linkedin"></i></a>
|
|
10
|
+
<% end %>
|
|
11
|
+
<% if pressroom.urls['googleplus'].present? %>
|
|
12
|
+
<a href=<%= pressroom.urls['googleplus'] %> title="Googleplus"><i class="social-googleplus"></i></a>
|
|
13
|
+
<% end %>
|
|
14
|
+
<% if pressroom.urls['instagram'].present? %>
|
|
15
|
+
<a href=<%= pressroom.urls['instagram'] %> title="Instagram"><i class="social-instagram"></i></a>
|
|
16
|
+
<% end %>
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<article class="white_background" id="featured_press_release" data-id="#{press_release.id}">
|
|
2
|
+
<div class="row">
|
|
3
|
+
<div class="default_content_block">
|
|
4
|
+
<a href=<%= pressroom_path(press_release.id, to_slug(press_release.title)) %>>
|
|
5
|
+
<h4 class="pressroom-month"><%= Date.parse(press_release.release_date).strftime('%d %B, %Y') %></h4>
|
|
6
|
+
<h2><%= press_release.title %></h2>
|
|
7
|
+
<p><%= press_release.summary %></p>
|
|
8
|
+
</a>
|
|
9
|
+
<a class="medium white button radius text-center" href=<%= pressroom_path(press_release.id, to_slug(press_release.title)) %>><%= t('press_release.read') %></a>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</article>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<% presskits.each do |presskit| %>
|
|
2
|
+
<% if presskit.media.present? %>
|
|
3
|
+
<div class="presskit-title">
|
|
4
|
+
<a href=<%= presskit_path(presskit.id, to_slug(presskit.title)) %>>
|
|
5
|
+
<%= t('presskit.view_with_title', title: presskit.title) %></a>
|
|
6
|
+
</div>
|
|
7
|
+
<% end %>
|
|
8
|
+
<% end %>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<div class="content" id="panel_contacts">
|
|
2
|
+
<ul id="pr_contacts">
|
|
3
|
+
<% pr_contacts.each do |prc| %>
|
|
4
|
+
<li class="<%= (prc.id == pr_contacts.first.id) ? 'first' : '' %>">
|
|
5
|
+
<img alt=<%= prc.name %> class="avatar" src=<%= prc.avatar['medium_square']['url'] %> width=<%= prc.avatar['medium_square']['width'] %> height=<%= prc.avatar['medium_square']['height'] %>/>
|
|
6
|
+
<div class="nice_texts">
|
|
7
|
+
<p class="contact_name"><%= prc.name %></p>
|
|
8
|
+
<div class="contact_info">
|
|
9
|
+
<a href=<%= "mailto:#{prc.contact_info}" %>><%= prc.contact_info %></a>
|
|
10
|
+
</div>
|
|
11
|
+
<% if prc.usernames.has_key?('skype') %>
|
|
12
|
+
<p class="skype_username">
|
|
13
|
+
<a class="track_event" href=<%= prc.urls['skype'] %> data-action="click skype link" data-category="pressdoc sidebar events" data-label="skype link">
|
|
14
|
+
<i class="social-skype"/>
|
|
15
|
+
<%= prc.usernames['skype'] %>
|
|
16
|
+
</a>
|
|
17
|
+
</p>
|
|
18
|
+
<% end %>
|
|
19
|
+
<% if prc.usernames.has_key?('twitter') %>
|
|
20
|
+
<p class="twitter_username">
|
|
21
|
+
<a class="track_event" href=<%= prc.urls['twitter'] %> data-action="click twitter link" data-category="pressdoc sidebar events" data-label="twitter link">
|
|
22
|
+
<i class="social-twitter"/>
|
|
23
|
+
<%= prc.usernames['twitter'] %>
|
|
24
|
+
</a>
|
|
25
|
+
</p>
|
|
26
|
+
<% end %>
|
|
27
|
+
</div>
|
|
28
|
+
</li>
|
|
29
|
+
<% end %>
|
|
30
|
+
</ul>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<% if vertical.present? && vertical == 1 %>
|
|
2
|
+
<ul class="media-preview media-preview--vertical">
|
|
3
|
+
<% else %>
|
|
4
|
+
<ul class="media-preview">
|
|
5
|
+
<% end %>
|
|
6
|
+
<% presskit.media_items(limit).each do |media| %>
|
|
7
|
+
<li class="media-preview-item">
|
|
8
|
+
<a class="media-preview__modal-trigger" href=<%= media.sizes['large']['url']%> download=<%= media.title.gsub(/[^\w-]/, '') %> data-original=<%= media.sizes['original']['url'] %>>
|
|
9
|
+
<img class="media-preview-item__image" src=<%= media.sizes['medium']['url'] %> height=<%= media.sizes['medium']['height'] %> width=<%= media.sizes['medium']['width'] %>/>
|
|
10
|
+
</a>
|
|
11
|
+
</li>
|
|
12
|
+
<% end %>
|
|
13
|
+
<li class="media-preview-item media-preview__link">
|
|
14
|
+
<% if presskit.present? %>
|
|
15
|
+
<%= link_to foxynews.presskit_path(presskit.id, to_slug(presskit.title)), class: 'media-preview__link' do %>
|
|
16
|
+
<i class="pressroom_icon"></i>
|
|
17
|
+
<%= t('presskit.see_all') %>
|
|
18
|
+
<% end %>
|
|
19
|
+
<% end %>
|
|
20
|
+
</li>
|
|
21
|
+
</ul>
|
|
22
|
+
|
|
23
|
+
<%= content_for :modal_content do %>
|
|
24
|
+
<div class="media-modal__item media-item">
|
|
25
|
+
<h3 class="media-modal__title"></h3>
|
|
26
|
+
<a class="media-modal__link" href='' download=''>
|
|
27
|
+
<img class="media-modal__image" src=''/>
|
|
28
|
+
<div class="media-item__cta"><%= t('presskit.download') %></div>
|
|
29
|
+
</a>
|
|
30
|
+
</div>
|
|
31
|
+
<% end %>
|
|
32
|
+
|
|
33
|
+
<%= render partial: "foxynews/partials/modal", locals: {id: 'media-modal'} %>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<div class="row" id="pressroom_items">
|
|
2
|
+
<% timeline.data.each do |month, data| %>
|
|
3
|
+
<div class="default_content_block">
|
|
4
|
+
<h4 class="pressroom-month"><%= month %></h4>
|
|
5
|
+
<% data.each do |content| %>
|
|
6
|
+
<% if content.type == 'story' %>
|
|
7
|
+
<article class="collapse row story">
|
|
8
|
+
<div class="small-12 columns">
|
|
9
|
+
<span class="pressroom-day hide-for-small"><%= (content.id == data.first.id) ? Date.parse(content.release_date).strftime('%-d %^b') : '' %></span>
|
|
10
|
+
<div class="details">
|
|
11
|
+
<a href=<%= pressroom_path(content.id, to_slug(content.title)) %>>
|
|
12
|
+
<h3><%= content.title %></h3>
|
|
13
|
+
<small class="text-justify"><%= content.summary %></small>
|
|
14
|
+
</a>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</article>
|
|
18
|
+
<% else %>
|
|
19
|
+
<article class="collapse row clipping">
|
|
20
|
+
<div class="small-12 columns">
|
|
21
|
+
<span class="pressroom-day hide-for-small"><%= (content.id == data.first.id) ? Date.parse(content.release_date).strftime('%-d %^b') : '' %></span>
|
|
22
|
+
<div class="details">
|
|
23
|
+
<a href="#">
|
|
24
|
+
<h3><%= content.title %></h3>
|
|
25
|
+
<small>
|
|
26
|
+
<i class="ss-redirect"/>
|
|
27
|
+
<span><%= t('pressroom.timeline.clipping.source', source: content.source) %></span>
|
|
28
|
+
</small>
|
|
29
|
+
</a>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</article>
|
|
33
|
+
<% end %>
|
|
34
|
+
<% end %>
|
|
35
|
+
</div>
|
|
36
|
+
<% end %>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="row" id="paging">
|
|
39
|
+
<% if @timeline.paging.try(:first).present? %>
|
|
40
|
+
<a href=<%= "/?limit=#{@limit}&page=1" %>><%= t('pagination.first') %></a>
|
|
41
|
+
<% end %>
|
|
42
|
+
<% if @timeline.paging.try(:previous).present? %>
|
|
43
|
+
<a href=<%= "/?#{@timeline.paging.previous.split('?').last}" %>><%= t('pagination.previous') %></a>
|
|
44
|
+
<% end %>
|
|
45
|
+
<% if @next_timeline_page.try(:data).present? %>
|
|
46
|
+
<a href=<%= "/?limit=#{@limit}&page=#{@next_page}" %>><%= t('pagination.next') %></a>
|
|
47
|
+
<% end %>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<h1><%= @presskit.title %></h1>
|
|
2
|
+
|
|
3
|
+
<% @presskit.media.each do |media| %>
|
|
4
|
+
<div class="media-item">
|
|
5
|
+
<h2><%= media.title %></h2>
|
|
6
|
+
<img src=<%= media.sizes['medium']['url'] %> height=<%= media.sizes['medium']['height'] %> width=<%= media.sizes['medium']['width'] %> />
|
|
7
|
+
|
|
8
|
+
<a href=<%= media.sizes['original']['url'] %> download=<%= media.title %>><%= t('presskit.download') %></a>
|
|
9
|
+
</div>
|
|
10
|
+
<% end %>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<div class="collapse press_releases press_releases_index row">
|
|
2
|
+
<main id="content" role="main">
|
|
3
|
+
<%= render partial: 'foxynews/partials/featured_press_release', locals: {press_release: @press_release } if @press_release.present? %>
|
|
4
|
+
<%= render partial: 'foxynews/partials/timeline', locals: {timeline: @timeline} %>
|
|
5
|
+
<div class="row">
|
|
6
|
+
<div class="default_content_block"></div>
|
|
7
|
+
</div>
|
|
8
|
+
<%= render partial: 'foxynews/partials/pressroom_about', locals: {pressroom: pressroom} %>
|
|
9
|
+
</main>
|
|
10
|
+
<aside id="sidebar">
|
|
11
|
+
<section id="logo">
|
|
12
|
+
<a href="#"><img id="company_logo" alt="<%= pressroom.name %> logo" src=<%= pressroom.logo['small'] %> /></a>
|
|
13
|
+
</section>
|
|
14
|
+
<section id="name">
|
|
15
|
+
<h1>
|
|
16
|
+
<a id="title_text" href="#">
|
|
17
|
+
<%= pressroom.name %>
|
|
18
|
+
<span id="subtitle_text">pressroom</span>
|
|
19
|
+
</a>
|
|
20
|
+
</h1>
|
|
21
|
+
</section>
|
|
22
|
+
<%= render partial: 'foxynews/partials/contact_panels', locals: {pressroom: pressroom} %>
|
|
23
|
+
<%= render partial: 'foxynews/partials/presskits', locals: {presskits: presskit.data } %>
|
|
24
|
+
</aside>
|
|
25
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<h1><%= @press_release.title %></h1>
|
|
2
|
+
<h2><%= @press_release.subtitle %></h2>
|
|
3
|
+
|
|
4
|
+
<div class='press-release'>
|
|
5
|
+
<% @press_release.parsed_content.each do |content_block| %>
|
|
6
|
+
<% if content_block['type'] == 'text' %>
|
|
7
|
+
<p><%= content_block['data']['text'].html_safe %></p>
|
|
8
|
+
<% elsif content_block['type'] == 'quote' %>
|
|
9
|
+
<div class='block-quote'>
|
|
10
|
+
<%= content_block['data']['quote'].html_safe %>
|
|
11
|
+
<span class='cite'><%= (content_block['data'].has_key? 'cite') ? content_block['data']['cite'].html_safe : '' %></span>
|
|
12
|
+
</div>
|
|
13
|
+
<% elsif content_block['type'] == 'media_collection' %>
|
|
14
|
+
<% content_block['data']['items'].each do |media| %>
|
|
15
|
+
<img src=<%= media['sizes']['medium']['url'] %> width=<%= media['sizes']['medium']['width'] %> height=<%= media['sizes']['medium']['height'] %> alt=<%= media['sizes']['title'] %>/>
|
|
16
|
+
<% end %>
|
|
17
|
+
<% elsif content_block['type'] == 'media_item' %>
|
|
18
|
+
<img src=<%= content_block['data']['item']['sizes']['medium']['url'] %> width=<%= content_block['data']['item']['sizes']['medium']['width'] %> height=<%= content_block['data']['item']['sizes']['medium']['height'] %> alt=<%= content_block['data']['item']['sizes']['title'] %>/>
|
|
19
|
+
<% end %>
|
|
20
|
+
<% end %>
|
|
21
|
+
</div>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
en:
|
|
2
|
+
presskit:
|
|
3
|
+
download: Download
|
|
4
|
+
view: View
|
|
5
|
+
view_with_title: 'View %{title}'
|
|
6
|
+
see_all: See all
|
|
7
|
+
pressroom:
|
|
8
|
+
main_website: Main Website
|
|
9
|
+
company_blog: Company Blog
|
|
10
|
+
contact_us: Contact
|
|
11
|
+
contact:
|
|
12
|
+
header: Contact
|
|
13
|
+
information: Contact Information
|
|
14
|
+
spokesman: Spokesperson
|
|
15
|
+
social_media: Social Media
|
|
16
|
+
about: About
|
|
17
|
+
timeline:
|
|
18
|
+
clipping:
|
|
19
|
+
source: 'Source: %{source}'
|
|
20
|
+
paging:
|
|
21
|
+
first: First
|
|
22
|
+
previous: Prev
|
|
23
|
+
next: Next
|
|
24
|
+
show:
|
|
25
|
+
back: Back
|
|
26
|
+
press_release:
|
|
27
|
+
read: Read Press Release
|
|
28
|
+
pagination:
|
|
29
|
+
first: First
|
|
30
|
+
previous: Prev
|
|
31
|
+
next: Next
|
|
32
|
+
error: We're sorry there was an error displaying this story
|
data/config/routes.rb
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Foxynews::Engine.routes.draw do
|
|
2
|
+
|
|
3
|
+
get 'pressrooms' => 'pressrooms#index', as: 'pressrooms'
|
|
4
|
+
get 'pressrooms/show/:id(/:title)' => 'pressrooms#show', as: 'pressroom'
|
|
5
|
+
get 'pressrooms/archive' => 'pressrooms#archive', as: 'pressroom_archive'
|
|
6
|
+
get 'presskit/show/:id(/:title)' => 'presskits#show', as: 'presskit'
|
|
7
|
+
|
|
8
|
+
root 'pressrooms#index'
|
|
9
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
class CreateFoxynewsFeaturedItems < ActiveRecord::Migration
|
|
2
|
+
def change
|
|
3
|
+
create_table :foxynews_featured_items do |t|
|
|
4
|
+
t.string :title
|
|
5
|
+
t.integer :article
|
|
6
|
+
t.boolean :featured
|
|
7
|
+
t.datetime :created_at
|
|
8
|
+
t.datetime :updated_at
|
|
9
|
+
end
|
|
10
|
+
add_index :foxynews_featured_items, :title
|
|
11
|
+
add_index :foxynews_featured_items, :article
|
|
12
|
+
end
|
|
13
|
+
end
|
data/lib/foxynews.rb
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Foxynews
|
|
2
|
+
class Engine < ::Rails::Engine
|
|
3
|
+
isolate_namespace Foxynews
|
|
4
|
+
|
|
5
|
+
initializer :append_migrations do |app|
|
|
6
|
+
unless app.root.to_s.match root.to_s
|
|
7
|
+
config.paths["db/migrate"].expanded.each do |expanded_path|
|
|
8
|
+
app.config.paths["db/migrate"] << expanded_path
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module Foxynews
|
|
2
|
+
module Generators
|
|
3
|
+
class InitializerGenerator < Rails::Generators::Base
|
|
4
|
+
source_root File.expand_path("../templates", __FILE__)
|
|
5
|
+
|
|
6
|
+
desc "This generator creates the foxynews initializer file at config/initializers"
|
|
7
|
+
def create_initializer_file
|
|
8
|
+
copy_file "foxynews_template.rb", "config/initializers/foxynews.rb"
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
== README
|
|
2
|
+
|
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
|
4
|
+
application up and running.
|
|
5
|
+
|
|
6
|
+
Things you may want to cover:
|
|
7
|
+
|
|
8
|
+
* Ruby version
|
|
9
|
+
|
|
10
|
+
* System dependencies
|
|
11
|
+
|
|
12
|
+
* Configuration
|
|
13
|
+
|
|
14
|
+
* Database creation
|
|
15
|
+
|
|
16
|
+
* Database initialization
|
|
17
|
+
|
|
18
|
+
* How to run the test suite
|
|
19
|
+
|
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
|
21
|
+
|
|
22
|
+
* Deployment instructions
|
|
23
|
+
|
|
24
|
+
* ...
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
|
28
|
+
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
|
2
|
+
// listed below.
|
|
3
|
+
//
|
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
|
6
|
+
//
|
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
|
8
|
+
// compiled file.
|
|
9
|
+
//
|
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
|
11
|
+
// about supported directives.
|
|
12
|
+
//
|
|
13
|
+
//= require_tree .
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
+
* listed below.
|
|
4
|
+
*
|
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
|
7
|
+
*
|
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
|
11
|
+
* file per style scope.
|
|
12
|
+
*
|
|
13
|
+
*= require_tree .
|
|
14
|
+
*= require_self
|
|
15
|
+
*/
|