Rename goals FilterLinks component to TagCloud
This is more consistent with the "tag_cloud" partial name.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
.sdg-goal-filter-links {
|
.sdg-goal-tag-cloud {
|
||||||
|
|
||||||
.sdg-goal-tag-list {
|
.sdg-goal-tag-list {
|
||||||
@extend %sdg-goal-list;
|
@extend %sdg-goal-list;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="sdg-goal-filter-links">
|
<div class="sdg-goal-tag-cloud">
|
||||||
<div class="sidebar-divider"></div>
|
<div class="sidebar-divider"></div>
|
||||||
<h2 class="sidebar-title"><%= heading %></h2>
|
<h2 class="sidebar-title"><%= heading %></h2>
|
||||||
<%= render SDG::Goals::TagListComponent.new(class_name) %>
|
<%= render SDG::Goals::TagListComponent.new(class_name) %>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
class SDG::Goals::FilterLinksComponent < ApplicationComponent
|
class SDG::Goals::TagCloudComponent < ApplicationComponent
|
||||||
attr_reader :class_name
|
attr_reader :class_name
|
||||||
|
|
||||||
def initialize(class_name)
|
def initialize(class_name)
|
||||||
@@ -13,4 +13,4 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= render SDG::Goals::FilterLinksComponent.new(taggable) %>
|
<%= render SDG::Goals::TagCloudComponent.new(taggable) %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
describe SDG::Goals::FilterLinksComponent, type: :component do
|
describe SDG::Goals::TagCloudComponent, type: :component do
|
||||||
before do
|
before do
|
||||||
Setting["feature.sdg"] = true
|
Setting["feature.sdg"] = true
|
||||||
Setting["sdg.process.debates"] = true
|
Setting["sdg.process.debates"] = true
|
||||||
@@ -8,7 +8,7 @@ describe SDG::Goals::FilterLinksComponent, type: :component do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "renders a title" do
|
it "renders a title" do
|
||||||
component = SDG::Goals::FilterLinksComponent.new("Debate")
|
component = SDG::Goals::TagCloudComponent.new("Debate")
|
||||||
|
|
||||||
render_inline component
|
render_inline component
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ describe SDG::Goals::FilterLinksComponent, type: :component do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "renders all goals" do
|
it "renders all goals" do
|
||||||
component = SDG::Goals::FilterLinksComponent.new("Proposal")
|
component = SDG::Goals::TagCloudComponent.new("Proposal")
|
||||||
|
|
||||||
render_inline component
|
render_inline component
|
||||||
|
|
||||||
Reference in New Issue
Block a user