This repository has been archived by the owner on Mar 27, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
10,338 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#= require wysihtml5-0.3.0 | ||
#= require bootstrap3-wysihtml5 | ||
|
||
$('.editor-control').wysihtml5 | ||
stylesheets: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
//= require bootstrap-wysihtml5 | ||
//= require bootstrap3-wysiwyg5-color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.row | ||
.col-lg-6 | ||
= form_for @news_item do |form| | ||
.form-group | ||
= form.label :title, t('news.title_description') | ||
= form.text_field :title, class: 'form-control' | ||
.form-group | ||
= form.label :body, t('news.body_description') | ||
= form.text_area :body, rows: 10, cols: 100, class: 'form-control editor-control' | ||
.form-group | ||
- if @logged_in.can_edit?(@news_item) | ||
.pull-right | ||
= link_to @news_item, method: 'delete', data: { confirm: t('are_you_sure') }, class: 'btn btn-danger' do | ||
= icon 'fa fa-trash-o' | ||
= t('news.delete_button') | ||
= button_tag class: 'btn btn-success' do | ||
= @news_item.new_record? ? t('news.submit_news') : t('news.save_news') | ||
|
||
- content_for :css do | ||
= stylesheet_link_tag 'editor' | ||
|
||
- content_for :js do | ||
= javascript_include_tag 'editor' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.news-item.box.box-info | ||
.box-header | ||
%h3.box-title= link_to news_item.title, news_item, class: 'no-underline' | ||
- if @logged_in.can_edit?(news_item) | ||
.box-tools.pull-right | ||
= link_to edit_news_item_path(news_item), class: 'btn bg-gray btn-xs' do | ||
= icon 'fa fa-pencil' | ||
.box-body | ||
= sanitize_html news_item.body | ||
.box-footer | ||
= render partial: 'news_item_meta', locals: {news_item: news_item, controls: false} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.news-item-meta | ||
posted #{news_item.published.to_s(:date) rescue '?'} | ||
- if news_item.person | ||
by #{link_to news_item.person.name, news_item.person} | ||
- elsif news_item.link.to_s.any? | ||
from #{link_to news_item.link.sub(/^http:\/\//, ''), news_item.link} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- @title = t('news.edit.heading') | ||
|
||
= render partial: 'form' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
- content_for :meta do | ||
%link{rel: 'alternate', type: 'application/atom+xml', title: t('news.news_feed'), href: news_url(format: 'xml', code: @logged_in.feed_code)} | ||
|
||
- @title = t('news.heading') | ||
|
||
.row | ||
.col-md-6 | ||
= t('news.welcome_to_the_place') | ||
- if Setting.get(:features, :news_by_users) | ||
= t('news.if_you_have_something_to_share_html', url: new_news_item_path) | ||
.col-md-6 | ||
.pull-right | ||
= t('news.subscribe.description') | ||
= link_to news_path(format: 'xml', code: @logged_in.feed_code), class: 'btn bg-orange' do | ||
= icon 'fa fa-rss' | ||
= t('news.subscribe.button') | ||
|
||
.row | ||
.col-md-12 | ||
= pagination @news_items | ||
= render partial: 'news_item', collection: @news_items | ||
= pagination @news_items | ||
|
||
- unless @news_items.any? | ||
%p | ||
%em= t('news.no_news_is_available') |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- @title = t('news.submit_news') | ||
|
||
= render partial: 'form' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- @title = @news_item.title | ||
|
||
.panel | ||
.panel-body | ||
- if @logged_in.can_edit?(@news_item) | ||
.pull-right | ||
= link_to edit_news_item_path(@news_item), class: 'btn btn-xs btn-info' do | ||
= icon 'fa fa-pencil' | ||
= t('news.edit_button') | ||
= link_to news_item_path(@news_item), class: 'btn btn-xs bg-gray text-red', method: 'delete', confirm: t('are_you_sure') do | ||
= icon 'fa fa-trash-o' | ||
= t('news.delete_button') | ||
= render partial: 'news_item_meta', object: @news_item, as: :news_item | ||
|
||
.news-item= sanitize_html @news_item.body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
en: | ||
|
||
news: | ||
heading: "News" | ||
edit: | ||
heading: "Edit News Post" | ||
edit_button: "Edit" | ||
delete_button: "Delete" | ||
body_description: "Share your announcement, information, or news here:" | ||
deleted: "News deleted." | ||
if_you_have_something_to_share_html: "If you have something newsworthy to share, <a href='%{url}'>submit it here</a>." | ||
news_feed: "News Feed" | ||
no_news_is_available: "No news is available at this time." | ||
save_news: "Save News" | ||
saved: "News saved." | ||
submit_news: "Submit News" | ||
subscribe: | ||
button: "Subscribe" | ||
description: "Get news updates in your feed reader." | ||
title_description: "Give your post a concise title:" | ||
welcome_to_the_place: "Welcome to the place for community news." |
Oops, something went wrong.