nitweb/angular: add /classdef/:full_name page
authorAlexandre Terrasa <alexandre@moz-code.org>
Wed, 1 Jun 2016 02:48:42 +0000 (22:48 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 1 Jun 2016 03:57:05 +0000 (23:57 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

share/nitweb/javascripts/nitweb.js
share/nitweb/stylesheets/nitweb.css
share/nitweb/views/classdef.html [new file with mode: 0644]

index 9a4aa16..e426fea 100644 (file)
                                controller: 'EntityCtrl',
                                controllerAs: 'entityCtrl'
                        })
+                       .when('/classdef/:id', {
+                               templateUrl: 'views/classdef.html',
+                               controller: 'EntityCtrl',
+                               controllerAs: 'entityCtrl'
+                       })
                        .otherwise({
                                redirectTo: '/'
                        });
index 18f2f4e..2baad72 100644 (file)
@@ -76,6 +76,20 @@ a {
        color: #666;
        font-family: monospace;
 }
+
+/* tabs */
+
+.nav-tabs li { cursor: pointer; }
+
+.nav>li.warning>a {
+    color: #fff;
+    background-color: #f0ad4e;
+}
+
+.nav>li.warning>a:focus, .nav>li.warning>a:hover {
+    background-color: #ff9c0f;
+}
+
 /*
  * Code Highlighting
  */
diff --git a/share/nitweb/views/classdef.html b/share/nitweb/views/classdef.html
new file mode 100644 (file)
index 0000000..50768ec
--- /dev/null
@@ -0,0 +1,16 @@
+<div class='container-fluid'>
+       <div class='page-header'>
+               <h2><entity-signature mentity='mentity'/></h2>
+               <entity-link mentity='mentity.mpackage' />
+               :: <entity-link mentity='mentity.mmodule' />
+               :: {{mentity.name}}
+       </div>
+
+       <ul class='nav nav-tabs' role='tablist'>
+               <li class='warning'>
+                       <a ng-href='{{mentity.mclass.web_url}}'>
+                               <span class='glyphicon glyphicon-chevron-left'/> Go to class
+                       </a>
+               </li>
+       </ul>
+</div>