summaryrefslogtreecommitdiff
path: root/share/www/database.html
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2009-03-10 17:15:06 +0000
committerChristopher Lenz <cmlenz@apache.org>2009-03-10 17:15:06 +0000
commit519037185db6ce37e4dbefb3b64e9024e55d0383 (patch)
treee0611c1fed113e3a6ec53b9f0dd485cda8a614a1 /share/www/database.html
parentd865942f5b19f88598df4f33b6e628ad78610c06 (diff)
Update the 'Raw view' link on the Futon database page to reflect the recent view URL change.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@752167 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/database.html')
-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);