summaryrefslogtreecommitdiff
path: root/share/www
diff options
context:
space:
mode:
Diffstat (limited to 'share/www')
-rw-r--r--share/www/database.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/share/www/database.html b/share/www/database.html
index 5a6f301f..23d76262 100644
--- a/share/www/database.html
+++ b/share/www/database.html
@@ -39,7 +39,12 @@ specific language governing permissions and limitations under the License.
$(function() {
if (page.redirecting) return;
$("h1 strong").text(page.db.name);
- var viewPath = (page.viewName || "_all_docs").replace(/^_design\//, "_view/");
+ var viewPath = page.viewName || "_all_docs";
+ if (/^_design\//.test(viewPath)) {
+ var parts = viewPath.split("/");
+ parts.splice(2, 0, "_view");
+ viewPath = parts.join("/");
+ }
if (viewPath != "_temp_view" && viewPath != "_design_docs") {
$("h1 a.raw").attr("href", "/" + encodeURIComponent(page.db.name) +
"/" + viewPath);