Replace link with button in relationable scores
This commit is contained in:
@@ -2134,7 +2134,7 @@ table {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
button {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-right: $line-height;
|
margin-right: $line-height;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -2152,6 +2152,14 @@ table {
|
|||||||
&::before {
|
&::before {
|
||||||
margin-right: $font-icon-margin;
|
margin-right: $font-icon-margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
display: inline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<small><%= t("related_content.is_related") %></small>
|
<small><%= t("related_content.is_related") %></small>
|
||||||
|
|
||||||
<span class="relate-content-score">
|
<div class="relate-content-score">
|
||||||
<%= link_to t("related_content.score_positive"),
|
<%= button_to t("related_content.score_positive"),
|
||||||
score_positive_related_content_path(related),
|
score_positive_related_content_path(related),
|
||||||
method: :put,
|
method: :put,
|
||||||
remote: true,
|
remote: true,
|
||||||
class: "score-positive" %>
|
class: "score-positive" %>
|
||||||
|
|
||||||
<%= link_to t("related_content.score_negative"),
|
<%= button_to t("related_content.score_negative"),
|
||||||
score_negative_related_content_path(related),
|
score_negative_related_content_path(related),
|
||||||
method: :put,
|
method: :put,
|
||||||
remote: true,
|
remote: true,
|
||||||
class: "score-negative" %>
|
class: "score-negative" %>
|
||||||
</span>
|
</div>
|
||||||
|
|||||||
@@ -146,10 +146,10 @@ shared_examples "relationable" do |relationable_model_name|
|
|||||||
visit polymorphic_path(relationable)
|
visit polymorphic_path(relationable)
|
||||||
|
|
||||||
within("#related-content-list") do
|
within("#related-content-list") do
|
||||||
click_link "Yes"
|
click_button "Yes"
|
||||||
|
|
||||||
expect(page).not_to have_link "Yes"
|
expect(page).not_to have_button "Yes"
|
||||||
expect(page).not_to have_link "No"
|
expect(page).not_to have_button "No"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -163,10 +163,10 @@ shared_examples "relationable" do |relationable_model_name|
|
|||||||
visit polymorphic_path(relationable)
|
visit polymorphic_path(relationable)
|
||||||
|
|
||||||
within("#related-content-list") do
|
within("#related-content-list") do
|
||||||
click_link "No"
|
click_button "No"
|
||||||
|
|
||||||
expect(page).not_to have_link "Yes"
|
expect(page).not_to have_button "Yes"
|
||||||
expect(page).not_to have_link "No"
|
expect(page).not_to have_button "No"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user