Disabled Ubuntu reviews
The reviews are pretty useless. People refer to bugs or old versions or just don't know how to use a piece of software. This is not helpful.
This commit is contained in:
parent
4a2f21631a
commit
fe6430322b
4 changed files with 32 additions and 30 deletions
|
|
@ -238,12 +238,12 @@ class PackagesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
# Show an HTML partial with reviews of this package from the Ubuntu API
|
# Show an HTML partial with reviews of this package from the Ubuntu API
|
||||||
def reviews
|
# def reviews
|
||||||
expires_in 1.day, public: true
|
# expires_in 1.day, public: true
|
||||||
# @reviews = Package.find_by_name!(params[:name]).ubuntu_reviews
|
# # @reviews = Package.find_by_name!(params[:name]).ubuntu_reviews
|
||||||
@reviews = get_ubuntu_reviews params[:name]
|
# @reviews = get_ubuntu_reviews params[:name]
|
||||||
render '_reviews', layout: false
|
# render '_reviews', layout: false
|
||||||
end
|
# end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,24 @@
|
||||||
- if @reviews.count > 0
|
/ Currently unused
|
||||||
|
|
||||||
.subtitle Reviews from Ubuntu users
|
/ - if @reviews.count > 0
|
||||||
|
|
||||||
- @reviews.each do |review|
|
/ .subtitle Reviews from Ubuntu users
|
||||||
p
|
|
||||||
div
|
|
||||||
b = review['summary']
|
|
||||||
' …
|
|
||||||
= review['review_text']
|
|
||||||
.text-right
|
|
||||||
em
|
|
||||||
= review['reviewer_displayname']
|
|
||||||
' –
|
|
||||||
= time_ago_in_words(DateTime.parse(review['date_created']))
|
|
||||||
' ago –
|
|
||||||
= star_rating(review['rating'])
|
|
||||||
|
|
||||||
/ - else
|
/ - @reviews.each do |review|
|
||||||
|
/ p
|
||||||
|
/ div
|
||||||
|
/ b = review['summary']
|
||||||
|
/ ' …
|
||||||
|
/ = review['review_text']
|
||||||
|
/ .text-right
|
||||||
|
/ em
|
||||||
|
/ = review['reviewer_displayname']
|
||||||
|
/ ' –
|
||||||
|
/ = time_ago_in_words(DateTime.parse(review['date_created']))
|
||||||
|
/ ' ago –
|
||||||
|
/ = star_rating(review['rating'])
|
||||||
|
|
||||||
/ p
|
/ / - else
|
||||||
/ em No reviews available.
|
|
||||||
|
/ / p
|
||||||
|
/ / em No reviews available.
|
||||||
|
|
|
||||||
|
|
@ -44,12 +44,12 @@
|
||||||
// Load reviews from the Ubuntu API through our own (cached) URL.
|
// Load reviews from the Ubuntu API through our own (cached) URL.
|
||||||
// Use asynchronous load to keep loading times low if the review
|
// Use asynchronous load to keep loading times low if the review
|
||||||
// was not yet cached.
|
// was not yet cached.
|
||||||
#reviews data-package-reviews-url=package_reviews_path(@package.name)
|
/ #reviews data-package-reviews-url=package_reviews_path(@package.name)
|
||||||
|
|
||||||
.small-5.medium-5.columns data-sticky-container=true
|
.small-5.medium-5.columns data-sticky-container=true
|
||||||
= render(partial: 'details_rightbox', locals: {pkg: @package})
|
= render(partial: 'details_rightbox', locals: {pkg: @package})
|
||||||
|
|
||||||
javascript:
|
/ javascript:
|
||||||
$( function() {
|
/ $( function() {
|
||||||
load_reviews()
|
/ load_reviews()
|
||||||
})
|
/ })
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ Rails.application.configure do
|
||||||
|
|
||||||
# Example file for development to avoid queries to online service
|
# Example file for development to avoid queries to online service
|
||||||
# config.ubuntu_reviews_api_url = 'test/files/ubuntu-review-api/cream'
|
# config.ubuntu_reviews_api_url = 'test/files/ubuntu-review-api/cream'
|
||||||
config.ubuntu_reviews_api_url = 'https://reviews.ubuntu.com/reviews/api/1.0/reviews/filter/any/any/any/any/%s'
|
# config.ubuntu_reviews_api_url = 'https://reviews.ubuntu.com/reviews/api/1.0/reviews/filter/any/any/any/any/%s'
|
||||||
|
|
||||||
config.images_path = Rails.root.join('public', 'screenshots')
|
config.images_path = Rails.root.join('public', 'screenshots')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue