feat: add approval rating to stories

This commit is contained in:
Neetpone 2024-04-13 18:32:56 -04:00
parent 9bc91be23f
commit 3ed7bf9d38
4 changed files with 12 additions and 14 deletions

View file

@ -530,12 +530,7 @@ a.submit2.cancel:active {
display: inline-block;
margin: 0 0 0 5px;
}
.fic-cell .popular {
display: block;
float: left;
overflow: hidden;
padding: 5px 10px;
}
.fic-cell .description {
overflow: hidden;
border: solid #adc 1px;
@ -3293,7 +3288,7 @@ body.story,
.fic-cell header,
.fic-cell .details,
.user .name {
overflow: auto;
overflow: hidden;
}
.fic-cell .description a,
.fic-data .u {

View file

@ -22,7 +22,7 @@ class ImagesController < ApplicationController
if File.exist? path
content_type = Marcel::MimeType.for Pathname.new(path)
else
content_type, body = fetch_image uri
content_type, body = fetch_image parsed
File.binwrite path, body
end

View file

@ -119,7 +119,7 @@ div.search-adv
b Sort By
br
=> select_tag :sf, options_for_select({'Query Relevance' => 'rel', 'Title' => 'title', 'Author' => 'author', \
'Publish Date' => 'date_published', 'Updated Date' => 'date_updated', 'Word Count' => 'num_words'}, @search_params[:sf])
'Publish Date' => 'date_published', 'Updated Date' => 'date_updated', 'Word Count' => 'num_words', 'FiMFiction Rating' => 'rating'}, @search_params[:sf])
= select_tag :sd, options_for_select({'High to Low' => 'desc', 'Low to High' => 'asc'}, @search_params[:sd])
- if show_button
.buttons

View file

@ -13,6 +13,9 @@ section.fic-cell
br
span.popular
span.stats
- if story.rating
span.likes
| Rating: #{story.rating}%
- if story.short_description
p.description= story.short_description
- else