Skip to content

Instantly share code, notes, and snippets.

@ph4un00b
Last active September 18, 2015 21:21
Show Gist options
  • Save ph4un00b/c20c56089e3018bd7ba0 to your computer and use it in GitHub Desktop.
Save ph4un00b/c20c56089e3018bd7ba0 to your computer and use it in GitHub Desktop.
not working image feedback -bv-
<!-- repeat -->
<div ng-if="image[0].metadata.action === 'delete'">
<!--<div ng-if="image[0].metadata.type === form.QUESTION">-->
<div ng-switch="image[0].metadata.type">
<div ng-switch-when="Question">
<p>
<img class="img-thumbnail" style="margin-bottom: 4%;"
src="{{form.getImageURL(form.QUESTION, image[0].metadata.index)}}"
width="60px" alt=""/>
- type: {{image[0].metadata.type}}, action: Delete Image
</p>
</div>
<!--<div ng-if="image[0].metadata.type === form.ANSWER">-->
<div ng-switch-when="Answer">
<p>
<img class="img-thumbnail" style="margin-bottom: 4%;"
src="{{form.getImageURL(form.ANSWER, image[0].metadata.index)}}"
width="60px" alt=""/>
- type: {{image[0].metadata.type}}, action: Delete Image
</p>
</div>
</div>
</div>
<div ng-if="image[0].metadata.action === 'update'">
<div ng-if="image[0].metadata.type === form.QUESTION">
<p>
<img class="img-thumbnail" style="margin-bottom: 4%;"
ng-src="{{form.getImageURL(form.QUESTION, image[0].metadata.index)}}"
width="60px" alt=""/>
- type: {{image[0].metadata.type}}, action: Update Image with <span style="color: brown;">{{image[0].name}}</span>
</p>
</div>
<div ng-if="image[0].metadata.type === form.ANSWER">
<p>
<img class="img-thumbnail" style="margin-bottom: 4%;"
ng-src="{{form.getImageURL(form.ANSWER, image[0].metadata.index)}}"
width="60px" alt=""/>
- type: {{image[0].metadata.type}}, action: Update Image with <span style="color: brown;">{{image[0].name}}</span>
</p>
</div>
</div>
<div ng-if="image[0].metadata.type === form.QUESTION && image[0].metadata.action !== 'create'">
<p>
- image: <span style="color: brown;">{{form.getImageURL(form.QUESTION, image[0])}}</span>,
type: {{image[0].metadata.type}},
action: {{image[0].metadata.action === 'delete'? 'Delete': 'Update'}} Image <span style="color: brown;">{{image[0].name}}</span>
</p>
</div>
<div ng-if="image[0].metadata.type === form.ANSWER && image[0].metadata.action !== 'create'">
<!--<p ng-if="image[0].metadata.action === 'delete'">-->
- image: <span style="color: brown;">{{form.getImageURL(form.ANSWER, image[0])}}</span>,
type: {{image[0].metadata.type}},
action: Delete Image <span style="color: brown;">{{form.getImageURL(form.ANSWER, image[0])}}</span>
<!--</p>-->
<!--<p ng-if="image[0].metadata.action === 'update'">-->
<!--- image: <span style="color: brown;">{{form.getImageURL(form.ANSWER, image[0].metadata.index)}}</span>,-->
<!--type: {{image[0].metadata.type}},-->
<!--action: Update Image with <span style="color: brown;">{{image[0].name}}</span>-->
<!--</p>-->
</div>
<!-- create image-->
<p ng-if="image[0].metadata.action === 'create'">
- image: <span style="color: brown;">{{image[0].name}}</span>, type: {{image[0].metadata.type}}, action: {{image[0].metadata.action + ' Image'}}
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment