Skip to content

Instantly share code, notes, and snippets.

@hchandad
Created October 8, 2016 18:19
Show Gist options
  • Save hchandad/9e52c50107b9c8f6c9732b6f2cb19230 to your computer and use it in GitHub Desktop.
Save hchandad/9e52c50107b9c8f6c9732b6f2cb19230 to your computer and use it in GitHub Desktop.
issue example
diff --git a/core/templates/dev/head/components/ResponseHeaderDirective.js b/core/templates/dev/head/components/ResponseHeaderDirective.js
index bdbc649..538ce46 100644
--- a/core/templates/dev/head/components/ResponseHeaderDirective.js
+++ b/core/templates/dev/head/components/ResponseHeaderDirective.js
@@ -25,7 +25,9 @@ oppia.directive('responseHeader', [function() {
getSummary: '&summary',
getShortSummary: '&shortSummary',
isActive: '&isActive',
- getOnDeleteFn: '&onDeleteFn'
+ getOnDeleteFn: '&onDeleteFn',
+ numRules: '&numRules',
+ hasMoreThanOneRule: '&hasMoreThanOneRule'
},
templateUrl: 'components/responseHeader',
controller: [
diff --git a/core/templates/dev/head/components/response_header_directive.html b/core/templates/dev/head/components/response_header_directive.html
index ad606b2..7e6e755 100644
--- a/core/templates/dev/head/components/response_header_directive.html
+++ b/core/templates/dev/head/components/response_header_directive.html
@@ -4,7 +4,12 @@
<span ng-if="!isActive()" ng-attr-title="<[getSummary()]>">
<[getShortSummary()]>
</span>
- <span ng-if="isActive()">&nbsp;</span>
+ <!--
+ <span ng-if="hasMoreThanOneRule() && !isActive()" class="label label-info">
+ +<[numRules()]>
+ </span>
+ -->
+ <span ng-if="!isActive()">&nbsp;</span>
</div>
<span>→</span>
diff --git a/core/templates/dev/head/pages/exploration_editor/editor_tab/state_editor_responses.html b/core/templates/dev/head/pages/exploration_editor/editor_tab/state_editor_responses.html
index 5c0bc94..e1a669f 100644
--- a/core/templates/dev/head/pages/exploration_editor/editor_tab/state_editor_responses.html
+++ b/core/templates/dev/head/pages/exploration_editor/editor_tab/state_editor_responses.html
@@ -28,7 +28,9 @@
short-summary="answerGroup | summarizeAnswerGroup : getCurrentInteractionId():getAnswerChoices():true"
is-active="$index === activeAnswerGroupIndex"
on-delete-fn="deleteAnswerGroup"
- outcome="answerGroup.outcome">
+ outcome="answerGroup.outcome"
+ num-rules="answerGroup.rule_specs.length - 1"
+ has-more-than-one-rule="answerGroup.rule_specs.length > 1">
</response-header>
</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment