Tag cloud threshold is displayed on the screen
This commit is contained in:
parent
6c6b293099
commit
2048398aa7
|
@ -51,6 +51,10 @@ ul.ui-autocomplete li
|
||||||
margin: 0
|
margin: 0
|
||||||
background-color: #F0F8FF
|
background-color: #F0F8FF
|
||||||
|
|
||||||
body.tags .event[class*='libre-en-fete-'] em.city:before
|
body.tags
|
||||||
content: image-url(lef-small)
|
.event[class*='libre-en-fete-'] em.city:before
|
||||||
margin-right: 0.5em
|
content: image-url(lef-small)
|
||||||
|
margin-right: 0.5em
|
||||||
|
.info
|
||||||
|
float: right
|
||||||
|
margin-right: 10%
|
||||||
|
|
|
@ -5,7 +5,8 @@ class TagsController < InheritedResources::Base
|
||||||
has_scope :tag, as: :id
|
has_scope :tag, as: :id
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@tags = ActsAsTaggableOn::Tag.where('taggings_count > 3')
|
@tags = ActsAsTaggableOn::Tag.where('taggings_count > ?',
|
||||||
|
Rails.configuration.cloud_threshold)
|
||||||
if params[:term]
|
if params[:term]
|
||||||
# Used to autocomplete tags
|
# Used to autocomplete tags
|
||||||
@tags = @tags.select(:id, :name, 'name AS label')
|
@tags = @tags.select(:id, :name, 'name AS label')
|
||||||
|
|
|
@ -2,5 +2,9 @@
|
||||||
%em.fa.fa-tags
|
%em.fa.fa-tags
|
||||||
= title t '.title'
|
= title t '.title'
|
||||||
|
|
||||||
- tag_cloud @tags, %w(css1 css2 css3 css4) do |tag, css_class|
|
- tag_cloud @tags.order(:name), %w[css1 css2 css3 css4] do |tag, css_class|
|
||||||
= link_to tag.name, { action: :show, id: tag.name }, class: css_class
|
= link_to tag.name, { action: :show, id: tag.name }, class: css_class
|
||||||
|
|
||||||
|
%p.info
|
||||||
|
%em.fa.fa-info-circle
|
||||||
|
= t '.threshold', threshold: Rails.configuration.cloud_threshold
|
||||||
|
|
|
@ -50,5 +50,7 @@ module AgendaDuLibreRails
|
||||||
config.action_controller.per_form_csrf_tokens = false
|
config.action_controller.per_form_csrf_tokens = false
|
||||||
|
|
||||||
config.active_record.sqlite3.represent_boolean_as_integer = true
|
config.active_record.sqlite3.represent_boolean_as_integer = true
|
||||||
|
|
||||||
|
config.cloud_threshold = 3
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -151,6 +151,7 @@ it more readable or agreable."
|
||||||
tags:
|
tags:
|
||||||
index:
|
index:
|
||||||
title: Tags
|
title: Tags
|
||||||
|
threshold: used more than %{threshold} times
|
||||||
show:
|
show:
|
||||||
title: Tag
|
title: Tag
|
||||||
links: See also
|
links: See also
|
||||||
|
|
|
@ -164,6 +164,7 @@ l’événement pour la rendre plus complète, plus lisible ou plus attrayante."
|
||||||
tags:
|
tags:
|
||||||
index:
|
index:
|
||||||
title: Mots-clés
|
title: Mots-clés
|
||||||
|
threshold: utilisés plus de %{threshold} fois
|
||||||
show:
|
show:
|
||||||
title: Mot-clé
|
title: Mot-clé
|
||||||
links: Voir aussi
|
links: Voir aussi
|
||||||
|
|
Loading…
Reference in New Issue