From d7ce365eca55a962425e2f4cbaee241ef5c90f96 Mon Sep 17 00:00:00 2001
From: "rjk@greenend.org.uk" <>
Date: Sun, 23 Dec 2007 18:44:37 +0000
Subject: [PATCH] More web support for user rights: - choose/search greyed out
if don't have RIGHT_PLAY - edit link in new/recent omitted if don't have
RIGHT_PREFS - move buttons in manage greyed out if not movable
---
templates/disorder.css | 8 ++++++++
templates/login.html | 2 +-
templates/new.html | 6 ++++--
templates/playing.html | 50 ++++++++++++++++++++++++++++++++------------------
templates/recent.html | 6 ++++--
templates/topbar.html | 10 ++++++++--
6 files changed, 57 insertions(+), 25 deletions(-)
diff --git a/templates/disorder.css b/templates/disorder.css
index dd1364c..809947c 100644
--- a/templates/disorder.css
+++ b/templates/disorder.css
@@ -382,6 +382,14 @@ a.activemenu:active,a.inactivemenu:active {
color: red
}
+span.invalidmenu {
+ text-decoration: none;
+ color: grey;
+ font-family: sans-serif;
+ font-weight: bold;
+ font-size: 14pt
+}
+
/* prefs **********************************************************************/
p.prefs_new,p.prefs_head {
diff --git a/templates/login.html b/templates/login.html
index 31dc6e8..9119a5f 100644
--- a/templates/login.html
+++ b/templates/login.html
@@ -95,7 +95,7 @@ USA
@label:login.password@ |
- |
|
@new{
@@ -52,12 +53,13 @@ USA
class=file
href="@url@?action=play&file=@urlquote{@file@}@&back=@urlquote{@thisurl@}@&nonce=@nonce@">@part{short}{title}@
@length@ |
+@right{prefs}{
![@label:choose.prefsverbose@ @label:choose.prefs@](@label:images.edit@) |
-
+ }@
}@
}@
diff --git a/templates/playing.html b/templates/playing.html
index 31eadfd..43811ae 100644
--- a/templates/playing.html
+++ b/templates/playing.html
@@ -190,17 +190,22 @@ USA
class=button src="@label:images.noscratch@"
title="@label:playing.removeverbose@"
alt="@label:playing.remove@">}@
+
@if{@arg:mgmt@}{
- @if{@isfirst@}
- {
+ @if{@or{@isfirst@}
+ {@not{@movable@}@}@}{
+
+ |
|
}
- { |
+ title="@label:playing.upverbose@" alt="">
+ }{
+
+ |
![](@label:images.upall@) }@
- @if{@islast@}
- { |
+ title="@label:playing.upverbose@" alt="@label:playing.up@">
+ }@
+
+ @if{@or{@islast@}
+ {@not{@movable@}@}@}{
+
+ |
+
+ |
+ }{
+
|
- }
- { |
-
- |
- ![]() }@
+ alt="@label:playing.downall@">
+ |
+
+ }@
+
}@
}@}@
diff --git a/templates/recent.html b/templates/recent.html
index 3d0650e..71e359a 100644
--- a/templates/recent.html
+++ b/templates/recent.html
@@ -37,7 +37,8 @@ USA
| @label:heading.album@ |
@label:heading.title@ |
@label:heading.length@ |
- |
+@right{prefs}{
+ | }@
@recent{
@@ -54,12 +55,13 @@ USA
@part{short}{title}@ |
@length@ |
+@right{prefs}{
![@label:choose.prefsverbose@ @label:choose.prefs@](@label:images.edit@) |
-
+ }@
}@
}@
diff --git a/templates/topbar.html b/templates/topbar.html
index 3776234..4935829 100644
--- a/templates/topbar.html
+++ b/templates/topbar.html
@@ -8,15 +8,21 @@
+@right{play}{
@label:sidebar.choose@
+ title="@label:sidebar.chooseverbose@">@label:sidebar.choose@}{
+ }@
+@right{play}{
+ title="@label:sidebar.searchverbose@">@label:sidebar.search@}{
+ }@