nitweb/angular: show code in definition cards
[nit.git] / share / nitweb / directives / entity / defcard.html
index 2c0b9c8..5a024fe 100644 (file)
                        <span ng-if='!definition.mclassdef'>
                                in <entity-link mentity='definition.mmodule' />
                        </span>
+                       <div class='btn-bar'>
+                               <button class='btn btn-link' aria-expanded='false'
+                                       data-target='#{{codeId}}' ng-click='loadCardCode()'
+                                       aria-controls='{{codeId}}'>
+                                       <span class='glyphicon glyphicon-console'
+                                       title='Show code' />
+                               </button>
+                       </div>
                </h5>
+               <div id='{{codeId}}' class='collapse'>
+                       <pre ng-bind-html='code' />
+               </div>
                <entity-location mentity='definition' />
        </div>
 </div>