You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2014/07/22 17:26:16 UTC

[25/59] [abbrv] fauxton commit: updated refs/heads/master to 4e37185

Sidebar UI - design doc oriented


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/84774bde
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/84774bde
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/84774bde

Branch: refs/heads/master
Commit: 84774bdeb406a44acb4fcb723fdd116ef835ee22
Parents: 5a3bb55
Author: suelockwood <de...@apache.org>
Authored: Fri Apr 18 11:25:43 2014 -0400
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Jul 22 16:49:09 2014 +0200

----------------------------------------------------------------------
 app/addons/activetasks/templates/tabs.html      |  11 +-
 app/addons/activetasks/views.js                 |   2 +
 app/addons/documents/assets/less/documents.less |  70 ++++++-
 app/addons/documents/routes.js                  | 116 ++++++++----
 .../templates/add_new_ddoc_fn_dropdown.html     |  31 +++
 .../documents/templates/all_docs_layout.html    |  12 +-
 .../documents/templates/attachments_footer.html |  20 ++
 app/addons/documents/templates/ddoc_info.html   |   2 +-
 .../documents/templates/design_doc_menu.html    |  27 +++
 .../templates/design_doc_selector.html          |   3 +
 .../documents/templates/index_menu_item.html    |   4 +-
 app/addons/documents/templates/sidebar.html     |  40 ++--
 app/addons/documents/templates/view_editor.html |   3 +-
 app/addons/documents/views.js                   | 187 ++++++++++++++-----
 app/templates/layouts/two_pane.html             |   1 -
 app/templates/layouts/with_tabs_sidebar.html    |   6 +-
 assets/less/bootstrap/dropdowns.less            |  33 +++-
 assets/less/bootstrap/navs.less                 |   3 -
 assets/less/bootstrap/variables.less            |   8 +-
 assets/less/fauxton.less                        |  85 +++++----
 assets/less/variables.less                      |   1 +
 21 files changed, 474 insertions(+), 191 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/activetasks/templates/tabs.html
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/templates/tabs.html b/app/addons/activetasks/templates/tabs.html
index 5869748..624c386 100644
--- a/app/addons/activetasks/templates/tabs.html
+++ b/app/addons/activetasks/templates/tabs.html
@@ -14,14 +14,6 @@ the License.
 
 
 
-
-
-<div id="sidenav">
-  <header class="row-fluid">
-    <h3>Filter by: </h3>
-  </header>
-
-  <nav>
 		<ul class="task-tabs nav nav-list">
 		  <% for (var filter in filters) { %>
 		      <li data-type="<%=filter%>">
@@ -42,5 +34,4 @@ the License.
 				<label for="pollingRange"><span>5</span> second(s)</label>
 			</li>
 		</ul>
-  </nav>
-</div>
+

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/activetasks/views.js
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/views.js b/app/addons/activetasks/views.js
index 87d56e2..54d8215 100644
--- a/app/addons/activetasks/views.js
+++ b/app/addons/activetasks/views.js
@@ -109,6 +109,8 @@ function (app, FauxtonAPI, ActiveTasks) {
   });
 
   Views.TabMenu = FauxtonAPI.View.extend({
+    tagName: "nav",
+    className: "sidenav",
     template: "addons/activetasks/templates/tabs",
 
     events: {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/documents/assets/less/documents.less
----------------------------------------------------------------------
diff --git a/app/addons/documents/assets/less/documents.less b/app/addons/documents/assets/less/documents.less
index e62be30..8b0ba2e 100644
--- a/app/addons/documents/assets/less/documents.less
+++ b/app/addons/documents/assets/less/documents.less
@@ -84,9 +84,13 @@ button.beautify {
 .change-box {
   margin: 0 20px 20px 20px;
 }
+.searchbox-container {
+  position: fixed;
+  right: 15px;
+}
 
 .change-wrapper {
-  margin-top: 57px;
+  margin-top: 20px;
   border-bottom: 1px solid #dddddd;
   &:last-child {
     border-bottom: none;
@@ -132,6 +136,7 @@ button.beautify {
   word-wrap: break-word;
 }
 
+
 #dashboard-upper-content{
   .js-query-keys-wrapper{
     padding-top: 0;
@@ -152,4 +157,67 @@ button.beautify {
   }
 }
 
+.sidenav{
+  margin-bottom: 40px;
+  li.nav-header {
+    position: relative;
+    .accordion-body{
+      &.in {
+        border-bottom: 1px solid #d3d7db;
+      }
+      color: #eee;
+      margin-left: 0;
+      li a{
+        padding-left: 55px;
+        font-size: 14px;
+        &:hover {
+          text-decoration: none;
+          color: #af2d24;
+        }
+      }
+    }
+    > span{
+      display: block;
+      padding: 10px 13px 10px 30px;
+      color: #333333;
+      border-bottom: 1px solid #d3d7db;
+      &:before{
+        vertical-align: bottom;
+        font-size: 12px;
+        padding-right: 10px;
+        margin-bottom: 2px;
+      }
+      &.down:before {
+        margin-bottom: -2px;
+        transform:rotate(90deg);
+        -ms-transform:rotate(90deg); /* IE 9 */
+        -webkit-transform:rotate(90deg); /* Opera, Chrome, and Safari */
+      }
+    }
+    div.new-button {
+      position: absolute;
+      top: 2px;
+      right: 15px;
+      .dropdown-menu{
+        left: -82px;
+        padding-bottom: 0;
+        width: auto;
+        min-width: 0;
+        li a {
+          padding: 10px 15px 10px 12px;
+        }
+      }
+      .dropdown-toggle{
+        text-decoration: none;
+      }
+      > a {
+        border-bottom: none;
+        text-decoration: none;
+        font-size: 16px;
+
+      }
+    }
+  }
+}
+
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/documents/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes.js b/app/addons/documents/routes.js
index a21bdaa..df58de4 100644
--- a/app/addons/documents/routes.js
+++ b/app/addons/documents/routes.js
@@ -17,10 +17,11 @@ define([
 
        // Modules
        "addons/documents/views",
-       "addons/databases/base"
+       "addons/databases/base",
+       "addons/documents/resources"
 ],
 
-function(app, FauxtonAPI, Documents, Databases) {
+function(app, FauxtonAPI, Documents, Databases, Resources) {
 
   var DocEditorRouteObject = FauxtonAPI.RouteObject.extend({
     layout: "one_pane",
@@ -131,7 +132,25 @@ function(app, FauxtonAPI, Documents, Databases) {
         route: "viewFn",
         roles: ['_admin']
       },
-      "database/:database/new_view": "newViewEditor"
+      "database/:database/_design/:ddoc/_lists/:fn": {
+        route: "tempFn",
+        roles: ['_admin']
+      },
+      "database/:database/_design/:ddoc/_filters/:fn": {
+        route: "tempFn",
+        roles: ['_admin']
+      },
+      "database/:database/_design/:ddoc/_show/:fn": {
+        route: "tempFn",
+        roles: ['_admin']
+      },
+      "database/:database/_design/:ddoc/metadata": {
+        route: "designDocMetadata",
+        roles: ['_admin']
+      },
+      "database/:database/new_view": "newViewEditor",
+      "database/:database/new_view/:designDoc": "newViewEditor",
+      "database/:database/_changes(:params)": "changes"
     },
 
     events: {
@@ -167,6 +186,35 @@ function(app, FauxtonAPI, Documents, Databases) {
         database: this.data.database
       }));
     },
+    designDocMetadata:  function(database, ddoc){
+      this.toolsView && this.toolsView.remove();
+      this.viewEditor && this.viewEditor.remove();
+
+      var DesignDocInfo = new Resources.DdocInfo({_id: "_design/"+ddoc},{database: this.data.database });
+
+      this.setView("#dashboard-lower-content", new Documents.Views.DdocInfo({
+        ddocName: ddoc,
+        model: DesignDocInfo
+      }));
+
+      this.sidebar.setSelectedTab(app.utils.removeSpecialCharacters(ddoc)+"_metadata");
+
+      this.crumbs = function () {
+        return [
+          {"name": this.data.database.id, "link": Databases.databaseUrl(this.data.database)},
+        ];
+      };
+
+    },
+    tempFn:  function(databaseName, ddoc, fn){
+      this.setView("#dashboard-upper-content", new Documents.Views.temp({}));
+      this.crumbs = function () {
+        return [
+          {"name": this.data.database.id, "link": Databases.databaseUrl(this.data.database)},
+        ];
+      };
+
+    },
 
     establish: function () {
       return this.data.designDocs.fetch({reset: true});
@@ -205,16 +253,11 @@ function(app, FauxtonAPI, Documents, Databases) {
         this.sidebar.setSelectedTab('all-docs');
       }
 
-      if (this.viewEditor) { this.viewEditor.remove(); }
-
-      this.toolsView = this.setView("#dashboard-upper-menu", new Documents.Views.JumpToDoc({
-        database: this.data.database,
-        collection: this.data.database.allDocs
-      }));
+      this.viewEditor && this.viewEditor.remove();
 
       this.data.database.allDocs.paging.pageSize = this.getDocPerPageLimit(urlParams, parseInt(docParams.limit, 10));
 
-      this.setView("#dashboard-upper-content", new Documents.Views.AllDocsLayout({
+      this.viewEditor = this.setView("#dashboard-upper-content", new Documents.Views.AllDocsLayout({
         database: this.data.database,
         collection: this.data.database.allDocs,
         params: urlParams,
@@ -264,7 +307,7 @@ function(app, FauxtonAPI, Documents, Databases) {
         ddocInfo: this.ddocInfo(decodeDdoc, this.data.designDocs, view)
       }));
 
-      if (this.toolsView) { this.toolsView.remove(); }
+      this.toolsView && this.toolsView.remove();
 
       this.documentsView = this.createViewDocumentsView({
         designDoc: decodeDdoc,
@@ -308,13 +351,14 @@ function(app, FauxtonAPI, Documents, Databases) {
       }));
     },
 
-    newViewEditor: function () {
+    newViewEditor: function (database, designDoc) {
       var params = app.getParams();
 
       this.toolsView && this.toolsView.remove();
       this.documentsView && this.documentsView.remove();
 
       this.viewEditor = this.setView("#dashboard-upper-content", new Documents.Views.ViewEditor({
+        currentddoc: "_design/"+designDoc || "",
         ddocs: this.data.designDocs,
         params: params,
         database: this.data.database,
@@ -447,46 +491,36 @@ function(app, FauxtonAPI, Documents, Databases) {
       } else {
         return parseInt(urlParams.limit, 10);
       }
-    }
-
-  });
-
-  var ChangesRouteObject = FauxtonAPI.RouteObject.extend({
-    layout: "with_tabs",
-    selectedHeader: "Databases",
-    crumbs: function () {
-      return [
-        {"name": this.database.id, "link": Databases.databaseUrl(this.database)},
-        {"name": "_changes", "link": "/_changes"}
-      ];
     },
 
-    routes: {
-      "database/:database/_changes(:params)": "changes"
-    },
+    changes: function (event) {
+      var docParams = app.getParams();
+      this.data.database.buildChanges(docParams);
 
-    initialize: function (route, masterLayout, options) {
-      this.databaseName = options[0];
-      this.database = new Databases.Model({id: this.databaseName});
+      this.documentsView = this.setView("#dashboard-lower-content", new Documents.Views.Changes({
+        model: this.data.database
+      }));
 
-      var docParams = app.getParams();
+      this.toolsView && this.toolsView.remove();
+      this.viewEditor && this.viewEditor.remove();
 
-      this.database.buildChanges(docParams);
-    },
+      this.sidebar.setSelectedTab('changes');
 
-    changes: function (event) {
-      this.setView("#dashboard-content", new Documents.Views.Changes({
-        model: this.database
-      }));
-    },
+      this.crumbs = function () {
+        return [
+          {"name": this.data.database.id, "link": Databases.databaseUrl(this.data.database)},
+          {"name": "_changes", "link": "/_changes"}
+        ];
+      };
 
-    apiUrl: function() {
-      return [this.database.url("apiurl"), this.database.documentation()];
+      this.apiUrl = function() {
+        return [this.data.database.url("apiurl"), this.data.database.documentation()];
+      };
     }
 
   });
 
-  Documents.RouteObjects = [DocEditorRouteObject, NewDocEditorRouteObject, DocumentsRouteObject, ChangesRouteObject];
+  Documents.RouteObjects = [DocEditorRouteObject, NewDocEditorRouteObject, DocumentsRouteObject];
 
   return Documents;
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html b/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
new file mode 100644
index 0000000..77323a9
--- /dev/null
+++ b/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
@@ -0,0 +1,31 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<div class="dropdown">
+	<a class="dropdown-toggle icon fonticon-circle-plus" data-toggle="dropdown" href="#" data-bypass="true"></a>
+	<ul class="dropdown-menu arrow" role="menu" aria-labelledby="dLabel">
+		<% if (full){ %>
+			<li><a class="icon fonticon-replication" href="#replicate/<%=database.id%>">Replicate</a><li>
+			<li><a class="icon fonticon-trash" href="#" data-bypass="true">Delete</a><li>
+		<%}%>
+		<li class="header-label">Add new</li>
+		<li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/new_view/<%=ddocSafe%>">Secondary View</a><li>
+<!-- 	  <li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/new_filter/<%=ddocSafe%>">Filter Function</a><li>
+	  <li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/new_show/<%=ddocSafe%>">Show Function</a><li>
+	  <li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/new_list/<%=ddocSafe%>">List function</a><li> -->
+	  <% _.each(extensionLinks, function(link) { %>
+			<li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/<%=link.url%>/<%=ddocSafe%>"><%=link.title%></a><li>
+    <%});%>
+	</ul>
+</div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/documents/templates/all_docs_layout.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/all_docs_layout.html b/app/addons/documents/templates/all_docs_layout.html
index 2862e16..e2c2479 100644
--- a/app/addons/documents/templates/all_docs_layout.html
+++ b/app/addons/documents/templates/all_docs_layout.html
@@ -11,10 +11,14 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 License for the specific language governing permissions and limitations under
 the License.
 -->
-<ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">
-  <li><a id="toggle-query" href="#query" data-bypass="true" data-toggle="tab">
-    <i class="fonticon fonticon-plus"></i> Query Options</a></li>
-</ul>
+<div class="dashboard-upper-menu">
+	<ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">
+	  <li><a id="toggle-query" href="#query" data-bypass="true" data-toggle="tab">
+	    <i class="fonticon fonticon-plus"></i> Query Options</a></li>
+	</ul>
+	<div class="js-search searchbox-container"></div>
+</div>
+
 <div class="tab-content">
   <div class="tab-pane" id="query">
   </div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/documents/templates/attachments_footer.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/attachments_footer.html b/app/addons/documents/templates/attachments_footer.html
new file mode 100644
index 0000000..31bd5a5
--- /dev/null
+++ b/app/addons/documents/templates/attachments_footer.html
@@ -0,0 +1,20 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<ul>
+	<li> attachment 1</li>
+	<li> attachment 2 </li>
+	<li> attachment 3</li>
+	<li> attachment 4</li>
+</ul>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/documents/templates/ddoc_info.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/ddoc_info.html b/app/addons/documents/templates/ddoc_info.html
index b33e49b..3f8f80f 100644
--- a/app/addons/documents/templates/ddoc_info.html
+++ b/app/addons/documents/templates/ddoc_info.html
@@ -12,7 +12,7 @@ License for the specific language governing permissions and limitations under
 the License.
 -->
 <div>
-  <h2> Design Doc MetaData </h2>
+  <h2>Design Doc MetaData:  _design/<%=Ddoc%> </h2>
   <div class="row-fluid">
 	<% i=0; _.map(view_index, function (val, key) { %>
 		<% if(i%2==0){%>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/documents/templates/design_doc_menu.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/design_doc_menu.html b/app/addons/documents/templates/design_doc_menu.html
new file mode 100644
index 0000000..c5bd392
--- /dev/null
+++ b/app/addons/documents/templates/design_doc_menu.html
@@ -0,0 +1,27 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+<li class="nav-header">
+	<span  class="fonticon-play js-collapse-toggle" data-toggle="collapse" data-target="#<%= ddoc_clean %>">
+		<%= designDoc%>
+	</span>
+	<div class="new-button"></div>
+	<ul class="accordion-body collapse" id="<%= ddoc_clean %>">
+		<li>
+			<a id="<%= ddoc_clean %>_metadata" href="#database/<%= database_encoded %>/_design/<%= ddoc_encoded %>/metadata" class="toggle-view">
+			  Design Doc Metadata
+			</a>
+		</li>
+
+	</ul>
+</li>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/documents/templates/design_doc_selector.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/design_doc_selector.html b/app/addons/documents/templates/design_doc_selector.html
index 769ca3b..828b5a5 100644
--- a/app/addons/documents/templates/design_doc_selector.html
+++ b/app/addons/documents/templates/design_doc_selector.html
@@ -16,7 +16,10 @@ the License.
   <select id="ddoc">
     <optgroup label="Select a document">
       <option value="new-doc">New document</option>
+
       <% ddocs.each(function(ddoc) { %>
+      <%= ddoc.id %>
+      <%= ddocName %>
       <% if (ddoc.id === ddocName) { %>
       <option selected="selected" value="<%- ddoc.id %>"><%- ddoc.id %></option>
       <% } else { %>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/documents/templates/index_menu_item.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/index_menu_item.html b/app/addons/documents/templates/index_menu_item.html
index 7ca9012..455f491 100644
--- a/app/addons/documents/templates/index_menu_item.html
+++ b/app/addons/documents/templates/index_menu_item.html
@@ -12,6 +12,6 @@ License for the specific language governing permissions and limitations under
 the License.
 -->
 
-<a id="<%= ddoc_clean %>_<%= index_clean %>" href="#database/<%= database_encoded %>/_design/<%= ddoc_encoded %>/_view/<%= index_encoded %>" class="toggle-view">
-  <%= ddoc %><span class="divider">/</span><%= index %>
+<a id="<%= removeSpecialCharacters(ddoc) %>_<%= removeSpecialCharacters(index) %>" href="#database/<%= safeURL(database) %>/_design/<%= safeURL(ddoc)%>/_<%=type%>/<%= safeURL(index) %>" class="toggle-view">
+  <%= index %>
 </a>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/documents/templates/sidebar.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/sidebar.html b/app/addons/documents/templates/sidebar.html
index 750cd30..74c8605 100644
--- a/app/addons/documents/templates/sidebar.html
+++ b/app/addons/documents/templates/sidebar.html
@@ -11,34 +11,17 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 License for the specific language governing permissions and limitations under
 the License.
 -->
-
-<div id="sidenav">
-  <header class="row-fluid">
+<!--   <header class="row-fluid">
     <div class="span12">
-      <div class="btn-group">
-        <button class="btn dropdown-toggle dropdown-toggle-btn" data-toggle="dropdown">
-          Docs
-          <span class="caret"></span>
-        </button>
-        <ul class="dropdown-menu">
-          <!-- dropdown menu links -->
-          <li><a href="<%= db_url %>"><i class="icon icon-file"></i> Docs</a></li>
-          <li><a href="<%= permissions_url %>"><i class="icon icon-lock"></i> Permissions</a></li>
-          <li><a href="<%= changes_url %>"><i class="icon icon-forward"></i> Changes</a></li>
-          <% _.each(docLinks, function (link) { %>
-          <li><a href="<%= database_url + '/' + link.url %>"><i class="icon <%= link.icon %>"></i> <%= link.title %></a></li>
-          <% }); %>
-        </ul>
-      </div>
 
       <div class="btn-group">
         <button class="btn dropdown-toggle dropdown-toggle-btn" data-toggle="dropdown">
-          New
+          Create New
           <span class="caret"></span>
         </button>
         <ul class="dropdown-menu">
           <!-- dropdown menu links -->
-          <li>
+<!--           <li>
           <a id="doc" href="#<%= database.url('app') %>/new">Document</a>
           </li>
           <li>
@@ -51,18 +34,17 @@ the License.
       </div>
         <button id="delete-database" class="btn pull-right"><i class="icon-trash"></i> Database</button>
     </div>
-  </header>
+  </header> -->
+
 
-  <nav>
     <ul class="nav nav-list">
+      <li><a id="permissions" href="<%= permissions_url %>">Permissions</a><li>
+      <li><a id="changes" href="<%= changes_url %>">Changes</a><li>
+      <% _.each(docLinks, function (link) { %>
+        <li><a href="<%= database_url + '/' + link.url %>"><%= link.title %></a></li>
+      <% }); %>
       <li class="active"><a id="all-docs" href="#<%= database.url('index') %>" class="toggle-view"> All documents</a></li>
       <li><a id="design-docs" href='#<%= database.url("index") %>?startkey="_design"&endkey="_e"'  class="toggle-view"> All design docs</a></li>
     </ul>
-    <ul class="nav nav-list views">
-      <li class="nav-header">Secondary Indexes</li>
-      <li><a id="new-view" href="#<%= database.url('app') %>/new_view" class="new"><i class="icon-plus"></i> New</a></li>
-    </ul>
-    <div id="extension-navs"></div>
-  </nav>
+
   <div id="delete-db-modal"> </div>
-</div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/documents/templates/view_editor.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/view_editor.html b/app/addons/documents/templates/view_editor.html
index 1a10ff5..5a1013b 100644
--- a/app/addons/documents/templates/view_editor.html
+++ b/app/addons/documents/templates/view_editor.html
@@ -11,6 +11,7 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 License for the specific language governing permissions and limitations under
 the License.
 -->
+<div class="dashboard-upper-menu">
   <ul class="nav nav-tabs" id="db-views-tabs-nav">
     <li class="active"> <a data-bypass="true" id="index-nav" data-toggle="tab" href="#index">
       <i class="fonticon-wrench fonticon"></i>
@@ -19,9 +20,9 @@ the License.
     <li><a data-bypass="true" id="query-nav" href="#query" data-toggle="tab">
       <i class="fonticon-plus fonticon"></i> Query Options</a>
     </li>
-    <li><a data-bypass="true" id="meta-nav" href="#metadata" data-toggle="tab">Design Doc Metadata</a></li>
     <% } %>
   </ul>
+</div>
   <div class="all-docs-list errors-container"></div>
   <div class="tab-content">
 	 <div id="query-options-wrapper"></div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 6ccb733..0e229f1 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -345,25 +345,27 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       this.ddoc = options.ddoc;
       this.database = options.database;
       this.selected = !! options.selected;
+      this.selector = options.selector;
     },
 
     serialize: function() {
       return {
+        type:  this.selector,
         index: this.index,
         ddoc: this.ddoc,
         database: this.database,
-        index_clean: app.utils.removeSpecialCharacters(this.index),
-        ddoc_clean: app.utils.removeSpecialCharacters(this.ddoc),
-        index_encoded: app.utils.safeURLName(this.index),
-        ddoc_encoded: app.utils.safeURLName(this.ddoc),
-        database_encoded: app.utils.safeURLName(this.database),
+        // index_clean: app.utils.removeSpecialCharacters(this.index),
+        // ddoc_clean: app.utils.removeSpecialCharacters(this.ddoc),
+        // index_encoded: app.utils.safeURLName(this.index),
+        // ddoc_encoded: app.utils.safeURLName(this.ddoc),
+        // database_encoded: app.utils.safeURLName(this.database),
         selected: this.selected
       };
     },
 
     afterRender: function() {
       if (this.selected) {
-        $("#sidenav ul.nav-list li").removeClass("active");
+        $(".sidenav ul.nav-list li").removeClass("active");
         this.$el.addClass("active");
       }
     }
@@ -455,6 +457,11 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
         showPreview: false,
         database: this.database,
       }));
+
+      this.toolsView = this.setView(".js-search", new Views.JumpToDoc({
+        database: this.database,
+        collection: this.database.allDocs
+      }));
     },
 
     afterRender: function () {
@@ -1339,6 +1346,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       this.ddocs = options.ddocs;
       this.params = options.params;
       this.database = options.database;
+      this.currentDdoc = options.currentddoc;
       if (this.newView) {
         this.viewName = 'newView';
       } else {
@@ -1626,8 +1634,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       if ($targetTab.attr('id') !== $previousTab.attr('id')) {
         $previousTab.removeAttr('style');
       }
-      //stop polling
-      this.ddocInfoView.stopRefreshInterval();
 
       if ($targetId === 'index-nav') {
         if (this.newView) { return; }
@@ -1636,11 +1642,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
         $targetTab.toggle('slow', function(){
            that.showEditors();
         });
-      } else if ($targetId === "meta-nav"){
-        if (!$("#ddoc-info").is(":visible")){
-          this.ddocInfoView.startRefreshInterval();
-        }
-        $targetTab.toggle('slow');
       } else {
         $targetTab.toggle('slow');
       }
@@ -1684,16 +1685,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
         $('.beautify-tooltip').tooltip();
       }
     },
-    renderDdocInfo: function(){
-      if(this.ddocInfoView){
-        this.ddocInfoView.remove();
-      }
-
-      if (this.newView) { return; }
-      this.ddocInfoView = this.setView('#ddoc-info', new Views.DdocInfo({model: this.ddocInfo }));
-      this.ddocInfoView.render();
-
-    },
     beforeRender: function () {
 
       if (this.newView) {
@@ -1723,7 +1714,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
 
       this.designDocSelector = this.setView('.design-doc-group', new Views.DesignDocSelector({
         collection: designDocs,
-        ddocName: this.model.id,
+        ddocName: this.currentDdoc || this.model.id,
         database: this.database
       }));
 
@@ -1745,7 +1736,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
     },
 
     afterRender: function() {
-      this.renderDdocInfo();
 
       if (this.params && !this.newView) {
         this.advancedOptions.updateFromParams(this.params);
@@ -1827,6 +1817,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
 
   Views.Sidebar = FauxtonAPI.View.extend({
     template: "addons/documents/templates/sidebar",
+    className: "sidenav",
+    tagName: "nav",
     events: {
       "click button#delete-database": "showDeleteDatabaseModal"
     },
@@ -1860,17 +1852,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       };
     },
 
-    buildIndexList: function(collection, selector, design){
-      _.each(_.keys(collection), function(key){
-        var selected = this.ddocID == "_design/"+design;
-        this.insertView("ul.nav." + selector, new Views.IndexItem({
-          ddoc: design,
-          index: key,
-          database: this.collection.database.id,
-          selected: selected && key == this.currView
-        }));
-      }, this);
-    },
 
     beforeRender: function(manage) {
       this.deleteDBModal = this.setView(
@@ -1878,13 +1859,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
         new Views.DeleteDBModal({database: this.database})
       );
 
-      var sidebarListViews = FauxtonAPI.getExtensions('sidebar:list');
-      _.each(sidebarListViews, function (view) {
-        var extension = this.insertView('#extension-navs', view);
-        extension.update(this.database, this.collection, this.viewName);
-        extension.render();
-      }, this);
-
       var viewFilters = FauxtonAPI.getExtensions('sidebar:viewFilters'),
           collection = this.collection.models;
 
@@ -1896,12 +1870,12 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
 
       _.each(collection, function(design) {
         if (design.has('doc')){
-          var ddoc = design.id.replace(/^_design\//,"");
-          if (design.get('doc').views){
-            this.buildIndexList(design.get('doc').views, "views", ddoc);
-          }
+          this.insertView(new Views.DdocSidenav({
+            model: design,
+            collection: this.collection
+          }));
         }
-      }, this);
+      },this);
     },
 
 
@@ -1913,8 +1887,88 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
 
     setSelectedTab: function (selectedTab) {
       this.selectedTab = selectedTab;
+      var $selectedTab = this.$('#' + selectedTab);
+
       this.$('li').removeClass('active');
-      this.$('#' + selectedTab).parent().addClass('active');
+      $selectedTab.parent().addClass('active');
+
+      if ($selectedTab.parents(".accordion-body").length !== 0){
+        $selectedTab
+        .parents(".accordion-body")
+        .addClass("in")
+        .parents(".nav-header")
+        .find(".js-collapse-toggle").addClass("down");
+      }
+
+    }
+  });
+
+
+  Views.DdocSidenav = FauxtonAPI.View.extend({
+    tagName: "ul",
+    className:  "nav nav-list",
+    template: "addons/documents/templates/design_doc_menu",
+    events: {
+      "click button": "no",
+      "click .js-collapse-toggle": "toggleArrow"
+    },
+    initialize: function(){
+
+    },
+    toggleArrow:  function(e){
+      this.$(e.currentTarget).toggleClass("down");
+    },
+    no: function(event){
+      event.preventDefault();
+      alert("no");
+    },
+    buildIndexList: function(collection, selector){
+      var design = this.model.id.replace(/^_design\//,"");
+      _.each(_.keys(collection[selector]), function(key){
+        this.insertView(".accordion-body", new Views.IndexItem({
+          selector: selector,
+          ddoc: design,
+          index: key,
+          database: this.model.collection.database.id
+        }));
+      }, this);
+    },
+
+    serialize: function(){
+      var ddocName = this.model.id.replace(/^_design\//,"");
+      return{
+        database: this.collection.database,
+        designDoc: ddocName,
+        ddoc_clean: app.utils.removeSpecialCharacters(ddocName),
+        ddoc_encoded: app.utils.safeURLName(ddocName),
+        database_encoded: app.utils.safeURLName(this.model.collection.database.id),
+      };
+    },
+    beforeRender: function(manage) {
+      var ddocDocs = this.model.get("doc");
+      var ddocName = this.model.id.replace(/^_design\//,"");
+
+      var sidebarListTypes = FauxtonAPI.getExtensions('sidebar:list');
+          if (ddocDocs){
+            //Views
+            this.buildIndexList(ddocDocs, "views");
+            //lists
+            // this.buildIndexList(ddocDocs, "lists");
+            // //show
+            // this.buildIndexList(ddocDocs, "show");
+            // //filters
+            // this.buildIndexList(ddocDocs, "filters");
+            //extensions
+            _.each(sidebarListTypes, function (type) {
+              this.buildIndexList(ddocDocs, type);
+            },this);
+          }
+      this.insertView(".new-button", new Views.newMenuDropdown({
+        database: this.collection.database,
+        ddocSafeName: app.utils.safeURLName(ddocName),
+        fullMenu: false
+      }));
+
     }
   });
 
@@ -1970,16 +2024,51 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
     }
   });
 
+
+  Views.newMenuDropdown = FauxtonAPI.View.extend({
+    template: "addons/documents/templates/add_new_ddoc_fn_dropdown",
+    tagName: "div",
+    className: "dropdown",
+    initialize: function(options){
+      this.database = options.database;
+      this.fullMenu = options.fullMenu;
+      this.ddocSafeName = options.ddocSafeName || "";
+    },
+    serialize: function(){
+      var sidebarItem = FauxtonAPI.getExtensions('sidebar:links');
+      return {
+        extensionLinks: sidebarItem,
+        database: this.database,
+        ddocSafe: this.ddocSafeName,
+        full:  this.fullMenu
+      };
+    }
+  });
+
+
+  Views.temp = FauxtonAPI.View.extend({
+  });
+
   Views.DdocInfo = FauxtonAPI.View.extend({
     template: "addons/documents/templates/ddoc_info",
 
     initialize: function (options) {
+      this.ddocName = options.ddocName;
       this.refreshTime = options.refreshTime || 5000;
       this.listenTo(this.model, 'change', this.render);
     },
 
+    establish: function () {
+      return this.model.fetch();
+    },
+
+    afterRender: function(){
+      this.startRefreshInterval();
+    },
+
     serialize: function () {
       return {
+        Ddoc: this.ddocName,
         view_index: this.model.get('view_index')
       };
     },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/templates/layouts/two_pane.html
----------------------------------------------------------------------
diff --git a/app/templates/layouts/two_pane.html b/app/templates/layouts/two_pane.html
index 0c3165e..031ad12 100644
--- a/app/templates/layouts/two_pane.html
+++ b/app/templates/layouts/two_pane.html
@@ -22,7 +22,6 @@ the License.
 
 
   <div class="row-fluid content-area">
-  	<div id="tabs" class="row"></div>
     <div id="left-content" class="span6"></div>
     <div id="right-content" class="span6"></div>
   </div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/app/templates/layouts/with_tabs_sidebar.html
----------------------------------------------------------------------
diff --git a/app/templates/layouts/with_tabs_sidebar.html b/app/templates/layouts/with_tabs_sidebar.html
index c808ac9..a0ed03d 100644
--- a/app/templates/layouts/with_tabs_sidebar.html
+++ b/app/templates/layouts/with_tabs_sidebar.html
@@ -28,8 +28,10 @@ the License.
 
     <section id="dashboard-content" class="list pull-right window-resizeable">
       <div class="inner">
-        <div id="dashboard-upper-menu" class="window-resizeable"></div>
-        <div id="dashboard-upper-content"></div>
+        <!-- <div id="dashboard-upper-menu" class="window-resizeable"></div> -->
+        <div id="dashboard-upper-content">
+
+        </div>
 
         <div id="dashboard-lower-content"></div>
       </div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/assets/less/bootstrap/dropdowns.less
----------------------------------------------------------------------
diff --git a/assets/less/bootstrap/dropdowns.less b/assets/less/bootstrap/dropdowns.less
index 9e47b47..5b3ca77 100644
--- a/assets/less/bootstrap/dropdowns.less
+++ b/assets/less/bootstrap/dropdowns.less
@@ -39,6 +39,7 @@
 // The dropdown menu (ul)
 // ----------------------
 .dropdown-menu {
+
   position: absolute;
   top: 100%;
   left: 0;
@@ -46,7 +47,6 @@
   display: none; // none by default, but block on "open" of the menu
   float: left;
   min-width: 160px;
-  padding: 5px 0;
   margin: 2px 0 0; // override default ul
   list-style: none;
   background-color: @dropdownBackground;
@@ -54,8 +54,6 @@
   border: 1px solid @dropdownBorder;
   *border-right-width: 2px;
   *border-bottom-width: 2px;
-  .border-radius(6px);
-  .box-shadow(0 5px 10px rgba(0,0,0,.2));
   -webkit-background-clip: padding-box;
      -moz-background-clip: padding;
           background-clip: padding-box;
@@ -65,7 +63,29 @@
     right: 0;
     left: auto;
   }
-
+  li.header-label{
+    background-color: #1A1A1A;
+    color: #676767;
+    padding: 3px 20px;
+    font-size: 13px;
+  }
+  &.arrow {
+    &:before{
+      content: "";
+      display: block;
+      position: absolute;
+      border-style: solid;
+      top: -20px;
+      right: 10%;
+      width: 0;
+      height: 0;
+      margin-left: -10px;
+      border-left: 10px solid transparent;
+      border-right: 10px solid transparent;
+      border-bottom: 10px solid #2b2f33;
+      border-top: 10px solid transparent;
+    }
+  }
   // Dividers (basically an hr) within the dropdown
   .divider {
     .nav-divider(@dropdownDividerTop, @dropdownDividerBottom);
@@ -73,6 +93,10 @@
 
   // Links within the dropdown menu
   > li > a {
+    &.icon:before{
+      padding-right: 5px;
+    }
+    font-size: 12px;
     display: block;
     padding: 3px 20px;
     clear: both;
@@ -80,6 +104,7 @@
     line-height: @baseLineHeight;
     color: @dropdownLinkColor;
     white-space: nowrap;
+    border-bottom: 1px solid #1A1A1A;
   }
 }
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/assets/less/bootstrap/navs.less
----------------------------------------------------------------------
diff --git a/assets/less/bootstrap/navs.less b/assets/less/bootstrap/navs.less
index 01cd805..0013179 100644
--- a/assets/less/bootstrap/navs.less
+++ b/assets/less/bootstrap/navs.less
@@ -37,12 +37,9 @@
 .nav-header {
   display: block;
   padding: 3px 15px;
-  font-size: 11px;
-  font-weight: bold;
   line-height: @baseLineHeight;
   color: @grayLight;
   text-shadow: 0 1px 0 rgba(255,255,255,.5);
-  text-transform: uppercase;
 }
 // Space them out when they follow another list item (link)
 .nav li + .nav-header {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/assets/less/bootstrap/variables.less
----------------------------------------------------------------------
diff --git a/assets/less/bootstrap/variables.less b/assets/less/bootstrap/variables.less
index 31c131b..f52b2cb 100644
--- a/assets/less/bootstrap/variables.less
+++ b/assets/less/bootstrap/variables.less
@@ -119,12 +119,12 @@
 
 // Dropdowns
 // -------------------------
-@dropdownBackground:            @white;
+@dropdownBackground:            #2B2F33;
 @dropdownBorder:                rgba(0,0,0,.2);
-@dropdownDividerTop:            #e5e5e5;
-@dropdownDividerBottom:         @white;
+@dropdownDividerTop:            #1A1A1A;
+@dropdownDividerBottom:         #1A1A1A;
 
-@dropdownLinkColor:             @grayDark;
+@dropdownLinkColor:             #D9D9D9;
 @dropdownLinkColorHover:        @white;
 @dropdownLinkColorActive:       @white;
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/assets/less/fauxton.less b/assets/less/fauxton.less
index be517e6..3ac3208 100644
--- a/assets/less/fauxton.less
+++ b/assets/less/fauxton.less
@@ -569,12 +569,15 @@ table.databases {
     padding: 0px;
     bottom: 0px;
     top: 60px;
-    position: absolute;
+    position: fixed;
     overflow-x: hidden;
     overflow-y: auto;
-    left: @sidebarWidth;
+    left: @sidebarWidth+@navWidth;
     right: 0;
     .box-sizing(border-box);
+    .closeMenu & {
+      left: @sidebarWidth+@collapsedNavWidth;
+    }
   }
   > div.inner {
     display: block;
@@ -651,15 +654,20 @@ table.databases {
 .topmenu-defaults {
   height: 70px;
   padding: 12px 10px 0;
-  border-bottom: 1px solid @darkRed;
   .box-sizing(border-box);
 }
 
-#dashboard-upper-menu{
+.dashboard-upper-menu{
+  right: 0;
+  left: @sidebarWidth+@navWidth;
   position: fixed;
   z-index: 11;
+  display: block;
   .topmenu-defaults;
   background-color: #CBCBCB;
+  .closeMenu & {
+    left: @sidebarWidth+@collapsedNavWidth;
+  }
 }
 
 #dashboard-lower-content{
@@ -678,54 +686,53 @@ table.databases {
   }
 }
 
-#sidenav{
+.sidenav {
   padding: 0;
   header {
     width: @sidebarWidth;
-    .box-shadow(inset -7px 0 15px -6px #000);
-    background: transparent url('../img/linen.png') repeat 0 0;
-    .topmenu-defaults;
   }
-  nav {
-    .nav-list{
-      .divider {
-        border: none;
-      }
-      li.active a {
-        background-color: @darkRed;
-        color: #fff;
-      }
-      a{
-        display: block;
-        padding: 10px 5px 10px 15px;
-        color: #333333;
-        border-bottom: 1px solid #989898;
-        .divider {
-          background: none;
-          color: #ccc;
-          padding: 0 2px;
-        }
-      }
-      .nav-header{
-        background-color: #B2B2B2;
-        padding: 5px;
-        text-shadow: none;
-        color: #333333;
-        border-bottom: 1px solid #989898;
+  .nav-list{
+    .divider {
+      border: none;
+    }
+    li.active a {
+      background-color: @darkRed;
+      color: #fff;
+    }
+    > li > a{
+      padding: 10px 13px 10px 30px;
+      border-bottom: 1px solid #d3d7db;
+    }
+    .dropdown-menu {
+      a {
+        color: #d9d9d9;
       }
+    }
+    a{
+      display: block;
+      padding: 10px 5px 10px 15px;
+      color: #333333;
 
+      .divider {
+        background: none;
+        color: #ccc;
+        padding: 0 2px;
+      }
+    }
+    .nav-header{
+      padding: 0px;
+      text-shadow: none;
+      color: #333333;
+      margin-bottom: -4px;
     }
   }
 }
+
 #sidebar-content {
-.box-shadow(-7px 0 15px -6px #000);
   position: absolute;
-  bottom: 0px;
   top: 60px;
   width: @sidebarWidth;
   left: 0;
-  overflow-x: hidden;
-  overflow-y: auto;
   background-color: @secondarySidebar;
   > div.inner {
     display: block;
@@ -748,7 +755,7 @@ table.databases {
 #db-views-tabs-nav{
   position: fixed;
   z-index: 12;
-  margin-top: 31px;
+  margin-top: 19px;
   margin-bottom: 0;
   /*background-color: #f4f4f4;*/
   padding: 0 20px;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/84774bde/assets/less/variables.less
----------------------------------------------------------------------
diff --git a/assets/less/variables.less b/assets/less/variables.less
index 4876013..2377e6b 100644
--- a/assets/less/variables.less
+++ b/assets/less/variables.less
@@ -54,6 +54,7 @@
 @sidebarBG: #F2F2F2;
 @sidebarWidth: 330px;
 
+
 @NavIconActive: #ffffff;
 @NavIcon: @brown;