-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sidebar tags card #6124
Closed
Closed
sidebar tags card #6124
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2452c22
sidebar tags card
gautamig54 8271957
adding + toggle
gautamig54 fbd2dee
make height auto
gautamig54 a89263b
add color
gautamig54 a4b4acb
changes1
gautamig54 4335810
adding card class
gautamig54 007f816
removing custom card css modifications
jywarren f1a6d58
Update _tagging.html.erb
jywarren 3af6337
Update _tags.html.erb
jywarren 3746443
Update _tags.html.erb
jywarren 7120958
Update _tags.html.erb
jywarren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,24 +2,25 @@ | |
|
||
<!-- This is the sidebar tagging display, also renders Subscribe button for multiple subscription --> | ||
<div> | ||
<h1 style="display: inline-block; margin-right: 20px;">Tags</h1> | ||
<% if @node && [email protected]_tags.empty? %> | ||
<%= render partial: 'tag/subscribe_button', locals:{tags: @node.node_tags} %> | ||
<% end %> | ||
<h6 style="display: inline-block; margin-right: 20px; color:#666;">This page is part of: </h6> | ||
</div> | ||
<em class="italics"><a href="/tags">Tags</a> organize our knowledge base. Click to learn more or subscribe to a topic.</em> | ||
|
||
|
||
<% if @node %> | ||
<%= render partial: 'tag/replication' %> | ||
|
||
<span id="tags"> | ||
<%= render partial: 'tag/tags', locals: { power_tag: true, badge_name: 'badge-secondary', tags: @node.node_tags } %> | ||
<%= render partial: 'tag/tags', locals: { power_tag: false, badge_name: 'badge-primary', tags: @node.node_tags } %> | ||
<%= render partial: 'tag/tags', locals: { power_tag: true, badge_name: 'badge-secondary', tags: @node.node_tags } %> | ||
<%= render partial: 'tag/tags', locals: { power_tag: false, badge_name: 'badge-primary', tags: @node.node_tags } %> | ||
<% if @tags.count > 2 %> | ||
<a href=""><p style="float:left; color:#666; margin-top:15px; margin-left:5px;"><u><%= @tags.count-2 %> more</u>   </p></a> | ||
<% end %> | ||
</span> | ||
<% else %> | ||
<span id="tags"> | ||
<%= render partial: 'tag/tags', locals: { power_tag: false, badge_name: 'badge-primary', tags: user.user_tags, user: user } %> | ||
<%= render partial: 'tag/tags', locals: { power_tag: false, badge_name: 'badge-primary', tags: user.user_tags, user: user } %> | ||
<% if @tags.count > 2 %> | ||
<a href=""><p style="float:left; margin-top:-10px; color:#666;"><%= @tags.count-2 %> more   </p></a> | ||
<% end %> | ||
</span> | ||
<% end %> | ||
|
||
|
@@ -52,6 +53,8 @@ $(".label").on("click", function(e){ | |
<% if current_user && (parent != :profile || (current_user.id == user.id || logged_in_as(['admin']))) %> | ||
<% url = url || "/tag/create/" + @node.id.to_s %> | ||
|
||
<a id="tags-open" style="cursor: pointer;"><i class="fa fa-plus-circle fa-2x " style="color:#808080; float:left; margin-top:13px; margin-left:5px;" aria-hidden="true"></i></a> | ||
|
||
<form id="tagform" class="form" data-remote="true" action="<%= url %>"> | ||
<div class="control-group"> | ||
<input class="form-control" name="remote" type="hidden" value="true" /> | ||
|
@@ -82,4 +85,20 @@ $(".label").on("click", function(e){ | |
</form> | ||
<% end %> | ||
|
||
<script> | ||
$("#tags-open").click(function(){ | ||
$("#tagform").toggle(); | ||
}); | ||
</script> | ||
|
||
<style> | ||
#tagform { | ||
display:none; | ||
} | ||
.list-inline { | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
</style> | ||
|
||
<%= render partial: 'tag/location' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I think this may cause some trouble - it looks like we would need to switch by
tag.class
outside this iterator, so profile tags are unaffected. Then, we can split off the first 2, within theNodeTag
block, and show those as cards. The rest we can show, still in that block, the previous way.