Skip to content

Commit

Permalink
FEATURE: add op-bookmark class for op-bookmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed May 5, 2015
1 parent b4f6666 commit 8e372f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -3,7 +3,7 @@
{{/if ~}}
{{~#each status in view.statuses ~}}
{{~#if status.href ~}}
<a href='{{status.href}}' title='{{status.title}}' class='topic-status'><i class='fa fa-{{status.icon}}'></i></a>
<a href='{{status.href}}' title='{{status.title}}' class='topic-status {{status.extraClasses}}'><i class='fa fa-{{status.icon}}'></i></a>
{{~else ~}}
<{{status.openTag}} title='{{status.title}}' class='topic-status'><i class='fa fa-{{status.icon}}'></i></{{status.closeTag}}>
{{~/if ~}}
Expand Down
6 changes: 5 additions & 1 deletion app/assets/javascripts/discourse/views/topic-status.js.es6
Expand Up @@ -16,10 +16,14 @@ export default Ember.Object.extend({
if(topic.get('bookmarked')){
var url = topic.get('url');
var postNumbers = topic.get('bookmarked_post_numbers');
var extraClasses = "";
if(postNumbers && postNumbers[0] > 1) {
url += '/' + postNumbers[0];
} else {
extraClasses = "op-bookmark";
}
results.push({icon: 'bookmark', key: 'bookmarked', href: url});

results.push({extraClasses: extraClasses, icon: 'bookmark', key: 'bookmarked', href: url});
}

if(topic.get('closed')){
Expand Down

0 comments on commit 8e372f3

Please sign in to comment.