Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3 0 stable #16

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
67e55d4
update gemfile and gemspec to spree 2.4.0.rc3
jrf540 Nov 16, 2014
2c56230
bump spree version to 2.4.0
jrf540 Nov 27, 2014
6975755
update to s3 image hosting
jrf540 Feb 19, 2015
c9b16c6
update for spree 3
jrf540 Mar 6, 2015
67e5fb9
update for bootstrap
jrf540 Mar 6, 2015
b058a40
styling
jrf540 Mar 6, 2015
de44cf6
formatting
jrf540 Mar 6, 2015
6558976
change admin icon to comment
jrf540 Mar 18, 2015
8e8bbf6
Update spree_blogging_spree.gemspec
kshlyk Jun 19, 2015
0c17ce3
replace old Spree::Config[:site_name] in feed.rss
b8in Feb 18, 2015
1fe0abd
solves Unknown column 'taggings_count'
krazedkrish Feb 18, 2015
88bcf80
updates spree_core to 3.0.4 stable
krazedkrish Nov 3, 2015
8b735be
Merge pull request #1 from krazedkrish/3-0-stable
kshlyk Nov 3, 2015
866a0ba
update for spree 3
jrf540 Mar 6, 2015
5becfe6
update for bootstrap
jrf540 Mar 6, 2015
bec901c
styling
jrf540 Mar 6, 2015
df5e3e6
formatting
jrf540 Mar 6, 2015
e50ecfe
change admin icon to comment
jrf540 Mar 18, 2015
a3d57ee
Update spree_blogging_spree.gemspec
kshlyk Jun 19, 2015
ae99968
replace old Spree::Config[:site_name] in feed.rss
b8in Feb 18, 2015
ee8af60
solves Unknown column 'taggings_count'
krazedkrish Feb 18, 2015
70782eb
updates spree_core to 3.0.4 stable
krazedkrish Nov 3, 2015
1fc3138
updates spree blogging version to 3.0.0
krazedkrish Nov 4, 2015
28343f7
solves many of the specs
krazedkrish Nov 4, 2015
965e19c
solves spec for admin edit blog
krazedkrish Nov 4, 2015
7ef9b72
add ruby 2.2.3 for travis ci
krazedkrish Nov 4, 2015
a7824db
Merge pull request #2 from adavanisanti/3-0-stable
krazedkrish Nov 3, 2016
12bfcc5
Revert "update to s3 image hosting"
krazedkrish Nov 3, 2016
a3191c2
various fixes
Novik Nov 12, 2015
068288f
various fixes
Novik Nov 13, 2015
7096631
updates readme
krazedkrish Nov 3, 2016
81da8dd
Revert change in routes, commit:068288f55f79de97b4904653beb86e57d1126566
krazedkrish Nov 3, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.2.3
before_script:
- 'bundle exec rake test_app'
script: 'bundle exec rspec spec'
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'spree', github: 'spree/spree', branch: '2-3-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-3-stable'
gem 'spree', github: 'spree/spree', branch: '3-0-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'

gemspec
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Installation
Add to your Gemfile:

```ruby
gem 'spree_blogging_spree', github: 'stefansenk/spree-blogging-spree'
gem 'spree_blogging_spree', github: 'krazedkrish/spree-blogging-spree', branch: '3-0-stable'
```

Bundle your dependencies and run the installation generator:
Expand Down
Empty file modified app/controllers/spree/admin/blog_entries_controller.rb
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion app/helpers/spree/admin/navigation_helper_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
def link_to_blog_in_store(resource, options={})
url = options[:url] || blog_entry_permalink(resource)
#options[:data] = {:action => 'show'}
link_to_with_icon('icon-view', Spree.t(:view_in_store), url, options)
link_to(Spree.t(:view_in_store), url, options)
end
end
4 changes: 2 additions & 2 deletions app/helpers/spree/blog_entries_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def blog_entry_url_permalink(e)
end

def blog_full_article_html(blog_entry)
"<br><br>Read the full article #{link_to blog_entry.title, blog_entry_url_permalink(blog_entry)} at #{link_to "#{Spree::Config[:site_name]} Blog", blog_url}."
"<br><br>Read the full article #{link_to blog_entry.title, blog_entry_url_permalink(blog_entry)} at #{link_to "#{Spree::Store.current.name} Blog", blog_url}."
end

def blog_first_appeared_html(blog_entry)
"<br><br>The article #{link_to blog_entry.title, blog_entry_url_permalink(blog_entry)} first appeared on #{link_to "#{Spree::Config[:site_name]} Blog", blog_url}."
"<br><br>The article #{link_to blog_entry.title, blog_entry_url_permalink(blog_entry)} first appeared on #{link_to "#{Spree::Store.current.name} Blog", blog_url}."
end

def blog_entry_tag_list_html blog_entry
Expand Down
9 changes: 6 additions & 3 deletions app/overrides/add_blog_admin_menu_tab.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Deface::Override.new(:virtual_path => "spree/admin/shared/_menu",
Deface::Override.new(:virtual_path => "spree/layouts/admin",
:name => "blog_admin_tabs",
:insert_bottom => "[data-hook='admin_tabs'], #admin_tabs[data-hook]",
:text => "<%= tab(:blog_entries, :label => 'Blog', :url => spree.admin_blog_entries_path, :icon => 'file') if can? :manage, Spree::BlogEntry %>",
:insert_bottom => "#main-sidebar",
:text => "<% if Spree.user_class && can?(:admin, Spree::BlogEntry) %><ul class='nav nav-sidebar'><%= tab Spree.t(:BLOG), url: spree.admin_blog_entries_path, icon: 'comment' %></ul><% end %>",
:disabled => false)



93 changes: 60 additions & 33 deletions app/views/spree/admin/blog_entries/_form.html.erb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@

<div class="row">
<div class="alpha ten columns">

<div class="col-md-12">
<%= form.field_container :title do %>
<%= form.label :title, Spree.t(:title) %> <span class="required">*</span><br />
<%= form.text_field :title, :class => 'fullwidth title' %>
<div class="form-group">
<%= form.label :title, Spree.t(:title) %> <span class="text-danger">*</span><br />
<%= form.text_field :title, :class => 'form-control' %>
<%= form.error_message_on :title %>
</div><!-- form-group -->
<% end %>

<%= form.field_container :permalink do %>
<%= form.label :permalink, Spree.t(:permalink) %> <span class="required">*</span><br />
<%= form.text_field :permalink, :class => 'fullwidth' %>
<div class="form-group">
<%= form.label :permalink, Spree.t(:permalink) %> <span class="text-danger">*</span><br />
<%= form.text_field :permalink, :class => 'form-control' %>
<%= form.error_message_on :permalink %>
</div><!-- form-group -->
<% end %>

<%= form.field_container :category_list do %>
<%= form.label :category_list, Spree.t(:category_list) %><br />
<%= form.text_field :category_list, :class => 'fullwidth' %>
<div class="form-group">
<%= form.label :category_list, Spree.t(:category_list) %>
<%= form.text_field :category_list, value: @blog_entry.category_list.join(', ') %>
</div><!-- form-group -->
<% end %>

<%= form.field_container :tag_list do %>
<%= form.label :tag_list, Spree.t(:tag_list) %><br />
<%= form.text_field :tag_list, :class => 'fullwidth' %>
<div class="form-group">
<%= form.label :tag_list, Spree.t(:tag_list) %>
<%= form.text_field :tag_list, value: @blog_entry.tag_list.join(', ') %>
</div><!-- form-group -->
<% end %>

<% unless Rails.env.test? %>
Expand All @@ -30,70 +37,90 @@
$("#blog_entry_category_list").select2({tags: <%= Spree::BlogEntry.tag_counts_on(:categories).map{|t| t.name }.to_json.html_safe %> });
</script>
<% end %>
</div><!-- col -->
</div><!-- row -->


<div class="columns five alpha">
<div class="row">
<div class="col-sm-6">
<%= form.field_container :published_at do %>
<%= form.label :published_at, Spree.t(:published_at) %><br />
<div class="form-group">
<%= form.label :published_at, Spree.t(:published_at) %>
<%= form.error_message_on :published_at %>
<% if @blog_entry.published_at? %>
<% published_at = l(@blog_entry.published_at, :format => Spree.t('date_picker.format')) %>
<% else %>
<% published_at = nil %>
<% end %>
<%= form.text_field :published_at, :value => published_at, :class => 'datepicker' %>
<%= form.text_field :published_at, :value => published_at, :class => 'datepicker form-control' %>
<% end %>
</div><!-- form-group -->
</div>

<div class="columns five omega">
<div class="col-sm-4 col-sm-offset-2">
<%= form.field_container :visible do %>
<%= form.label :visible, Spree.t(:visible) %><br />
<%= form.check_box :visible %>
<%= form.error_message_on :visible %>
<% end %>
</div>

</div>

<div class="omega six columns">
</div><!-- col -->
</div><!-- row -->
<div class='row'>
<div class="col-sm-6">

<%= form.field_container :author_id do %>
<%= form.label :author_id, Spree.t(:author_id) %><br />
<%= form.select :author_id, Spree.user_class.joins(:spree_roles).where("#{Spree::Role.table_name}.name" => "blogger").collect {|u| [u.email, u.id]}, {:include_blank => true}, :class => 'select2' %>
<% end %>

</div><!-- col-sm-6 -->
</div><!-- row -->
<div class='row'>
<div class="col-sm-6">
<%= field_set_tag Spree.t(:blog_entry_featured_image) do %>
<% @blog_entry.build_blog_entry_image unless @blog_entry.blog_entry_image %>

<%= form.fields_for :blog_entry_image do |blog_entry_image_field| %>
<%= form.field_container :blog_entry_image_attachment do %>
<% unless @blog_entry.blog_entry_image.new_record? %>
<div class="blog_entry_image_thumbnail">
<div class="blog_entry_image_thumbnail thumbnail">
<%= link_to image_tag(@blog_entry.blog_entry_image.attachment.url(:mini)), @blog_entry.blog_entry_image.attachment.url(:large) %>
<%= @blog_entry.blog_entry_image.attachment_file_name %><br/>
</div>
<% end %>
<%= blog_entry_image_field.file_field :attachment %>
<%= blog_entry_image_field.file_field :attachment, :class => 'form-control' %>
<% end %>

</div><!-- col-sm-6 -->
<div class="col-sm-6">
<%= form.field_container :blog_entry_image_alt do %>
<%= blog_entry_image_field.label :alt, Spree.t(:alt_text) %><br/>
<%= blog_entry_image_field.text_field :alt %>
<div class="form-group">
<%= blog_entry_image_field.label :alt, Spree.t(:alt_text) %>
<%= blog_entry_image_field.text_field :alt , :class => 'form-control' %>
</div><!-- form-group -->
<% end %>
</div><!-- col-sm-6 -->
<% end %>
<% end %>

</div>
</div>

</div><!-- row -->
<div class='row'>
<div class="col-sm-12">
<%= form.field_container :body do %>
<%= form.label :body %> <span class="required">*</span><br />
<%= form.text_area :body, {:cols => 60, :rows => 4, :class => 'fullwidth', :id => 'blog_entry_body'} %>
<div class="form-group">
<%= form.label :body %> <span class="text-danger">*</span>
<%= form.text_area :body, { :rows => 10, :class => 'form-control', :id => 'blog_entry_body'} %>
<%= form.error_message_on :body %>
</div><!-- form-group -->
<% end %>

</div><!-- col -->
</div><!-- row -->
<div class='row'>
<div class="col-sm-12">
<%= form.field_container :summary do %>
<%= form.label :summary %><br />
<%= form.text_area :summary, {:cols => 60, :rows => 4, :class => 'fullwidth', :id => 'blog_entry_summary'} %>
<div class="form-group">
<%= form.label :summary %>
<%= form.text_area :summary, { :rows => 4, :class => 'form-control', :id => 'blog_entry_summary'} %>
<%= form.error_message_on :summary %>
</div><!-- form-group -->
<% end %>
</div><!-- col -->
</div><!-- row -->
4 changes: 2 additions & 2 deletions app/views/spree/admin/blog_entries/edit.html.erb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<% content_for :page_title do %>
<%= Spree.t(:editing) %>: <%= @blog_entry.title %>
<%= Spree.t(:editing_resource) %>: <%= ERB.new(@blog_entry.title).result(binding).html_safe %>
<% end %>

<% content_for :page_actions do %>
<li><%= button_link_to Spree.t(:back_to_blog_list), spree.admin_blog_entries_url, :icon => 'arrow-left' %></li>
<%= button_link_to Spree.t(:back_to_blog_list), spree.admin_blog_entries_url, :icon => 'arrow-left' %>
<% end %>

<%= render "spree/shared/error_messages", :target => @blog_entry %>
Expand Down
25 changes: 10 additions & 15 deletions app/views/spree/admin/blog_entries/index.html.erb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@
<% end %>

<% content_for :page_actions do %>
<li><%= button_link_to Spree.t(:new_blog_entry), new_object_url, :icon => 'plus' %></li>
<%= button_link_to Spree.t(:new_blog_entry), new_object_url, :icon => 'plus', :class => 'btn-success' %>
<% end %>

<% if @blog_entries.any? %>
<table class="index">
<colgroup>
<col style="width: 15%">
<col style="width: 30%">
<col style="width: 35%">
<col style="width: 5%">
<col style="width: 15%">
</colgroup>
<table class="index table">

<thead>
<tr>
<th class="date"><%= Spree.t(:published_at) %></th>
Expand All @@ -28,13 +22,14 @@
<tbody>
<% @blog_entries.each do |blog_entry| %>
<tr class="<%= cycle('odd', 'even') %>" id="<%= spree_dom_id blog_entry %>">
<td class="align-center"><%= l( blog_entry.published_at, :format => :blog_date) if blog_entry.published_at %></td>
<td class="align-center"><%= blog_entry.title %></td>
<td class="align-center"><%= blog_entry.summary.truncate(300) if blog_entry.summary %></td>
<td class="align-center">
<%= content_tag(:i, '', :class => 'fa fa-ok green') if blog_entry.visible %>
<td class=""><%= l( blog_entry.published_at, :format => :blog_date) if blog_entry.published_at %></td>
<td class=""><%= ERB.new(blog_entry.title).result(binding).html_safe %></td>
<td class=""><%= ERB.new(blog_entry.summary.truncate(300)).result(binding).html_safe if blog_entry.summary %></td>
<td class="">
<%= content_tag(:i, '', :class => 'icon icon-show text-success') if blog_entry.visible %>
</td>
<td class="actions">

<%= link_to_blog_in_store blog_entry, :no_text => true, target: '_blank' %>
<%= link_to_edit blog_entry, :no_text => true %>
<%= link_to_delete blog_entry, :no_text => true %>
Expand All @@ -46,7 +41,7 @@

<%= paginate @blog_entries %>
<% else %>
<div class="alpha twelve columns no-objects-found">
<div class="no-objects-found">
<%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/blog_entry')) %>,
<%= link_to Spree.t(:add_one), spree.new_admin_blog_entry_path %>!
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/admin/blog_entries/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<% end %>

<% content_for :page_actions do %>
<li><%= button_link_to Spree.t(:back_to_blog_list), spree.admin_blog_entries_url, :icon => 'arrow-left' %></li>
<%= button_link_to Spree.t(:back_to_blog_list), spree.admin_blog_entries_url, :icon => 'arrow-left' %>
<% end %>

<%= render "spree/shared/error_messages", :target => @blog_entry %>
Expand Down
22 changes: 10 additions & 12 deletions app/views/spree/admin/users/_author_info_fields.html.erb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
<div class="ten columns alpha omega">
<div class="alpha five columns">
<%= f.field_container :nickname do %>
<div class="col-md-6">
<%= f.field_container :nickname, class: ['form-group'] do %>
<%= f.label :nickname, Spree.t(:nickname) %>
<%= f.text_field :nickname, :class => 'fullwidth' %>
<%= f.text_field :nickname, :class => 'form-control' %>
<%= error_message_on :user, :nickname %>
<% end %>
<%= f.field_container :website_url do %>
<%= f.field_container :website_url, class: ['form-group'] do %>
<%= f.label :website_url, Spree.t(:website_url) %>
<%= f.text_field :website_url, :class => 'fullwidth' %>
<%= f.text_field :website_url, :class => 'form-control' %>
<%= error_message_on :user, :website_url %>
<% end %>
<%= f.field_container :google_plus_url do %>
<%= f.field_container :google_plus_url, class: ['form-group'] do %>
<%= f.label :google_plus_url, Spree.t(:google_plus_url) %>
<%= f.text_field :google_plus_url, :class => 'fullwidth' %>
<%= f.text_field :google_plus_url, :class => 'form-control' %>
<%= f.error_message_on :google_plus_url %>
<% end %>
</div>
<div class="omega five columns">
<%= f.field_container :bio_info do %>
<div class="col-md-6">
<%= f.field_container :bio_info, class: ['form-group'] do %>
<%= f.label :bio_info, Spree.t(:bio_info) %>
<%= f.text_area :bio_info, {:rows => 4, :class => 'fullwidth'} %>
<%= f.text_area :bio_info, {:rows => 4, :class => 'form-control'} %>
<%= f.error_message_on :bio_info %>
<% end %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/spree/blog_entries/_blog_entries.html.erb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="blog_entry_container" class="columns twelve omega">
<div id="blog_entry_container" class="">
<% if !@blog_entries.empty? %>
<ul id="blog_entry_entries">
<% @blog_entries.each do |blog_entry| %>
Expand Down
6 changes: 3 additions & 3 deletions app/views/spree/blog_entries/author.html.erb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<%= render :partial => 'spree/blog_entries/blog_sidebar' %>
<% end %>

<div class="columns twelve alpha omega blog_author_info">
<div class="columns six alpha">
<div class="row blog_author_info">
<div class="col-md-6">
<h1><%= "#{Spree.t :blog_author}: #{@author.nickname}" %></h1>
<%= link_to @author.website_url, @author.website_url unless @author.website_url.blank? %>
</div>
<div class="columns six omega">
<div class="col-md-6">
<%= @author.bio_info %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/blog_entries/feed.rss.builder
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
xml.channel do
xml.title "#{Spree::Config[:site_name]} Blog"
xml.title "#{Spree::Store.current.name} Blog"
xml.description ""
xml.link blog_url

Expand Down
4 changes: 2 additions & 2 deletions app/views/spree/blog_entries/show.html.erb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<%= render :partial => 'spree/blog_entries/blog_sidebar' %>
<% end %>

<div id="blog_entry_container">
<div id="blog_entry_entry">
<div id="blog_entry_container" class=''>
<div id="blog_entry_entry" class=''>

<h1><%= @blog_entry.title %></h1>

Expand Down
Loading