Skip to content

Instantly share code, notes, and snippets.

@bxh-io
Created December 5, 2012 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bxh-io/4215664 to your computer and use it in GitHub Desktop.
Save bxh-io/4215664 to your computer and use it in GitHub Desktop.
<div class="answer-meta">
{{#if isGlobalQuestion}}
<p>You are viewing a global question</p>
{{else}}
{{#if content.is_followed}}
<a {{action followQuestion}}class="follow unfollow"><span class="ss-icon">&#xEB85;
</span>Following</a>
{{else}}
<a {{action followQuestion}}class="follow"><span class="ss-icon">&#xEB85;
</span>Follow</a>
{{/if}}
<!--<a href="" class="share"><span class="ss-icon">&#xEE00;
</span>Share</a>-->
{{#if content.global_answers.length}}
{{#if content.answers.length}}
<!-- If there are both course and global answers-->
<a {{action switchAnswers target="parentView"}} {{bindAttr class=":course-answers notGlobalAnswers:selected"}}>{{content.number_of_course_answers}} <span class="ss-icon">&#xF501;</span></a>
<a {{action switchAnswers target="parentView"}} {{bindAttr class=":global-answers notCourseAnswers:selected"}}>{{content.number_of_community_answers}}</a>
{{else}}
<!-- Only global answers -->
<span class="selected">{{content.number_of_community_answers}}<span class="ss-icon">&#xF501;</span></span>
<span>No Course Answers</span>
{{/if}}
{{else}}
<!-- No global answers here -->
{{#if content.answers.length}}
<!-- Some course answers but no global answers -->
<span class="selected">{{content.number_of_course_answers}}<span class="ss-icon">&#xF501;</span></span>
<span>No Community Answers</span>
{{else}}
<span class="no-answers">No Answers at all...</span>
{{/if}}
{{/if}}
{{/if}}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment