From 698ec51664b875431f23470c4621983f6965f951 Mon Sep 17 00:00:00 2001 From: Aaron Williamson Date: Wed, 6 Mar 2013 08:53:53 -0500 Subject: Minimal viable stache. --- stashbox/templates/admin_folder.html | 13 +++++++++ stashbox/templates/admin_users.html | 32 +++++++++++++++++++++ stashbox/templates/base.html | 55 ++++++++++++++++++++++++++++++++++-- stashbox/templates/folder_edit.html | 14 +++++++++ stashbox/templates/index.html | 35 ++++++++++++----------- stashbox/templates/user_add.html | 25 ++++++++++++++++ stashbox/templates/user_edit.html | 10 +++++++ stashbox/templates/useradd.html | 25 ---------------- stashbox/templates/usersadmin.html | 25 ---------------- 9 files changed, 165 insertions(+), 69 deletions(-) create mode 100644 stashbox/templates/admin_folder.html create mode 100644 stashbox/templates/admin_users.html create mode 100644 stashbox/templates/folder_edit.html create mode 100644 stashbox/templates/user_add.html create mode 100644 stashbox/templates/user_edit.html delete mode 100644 stashbox/templates/useradd.html delete mode 100644 stashbox/templates/usersadmin.html (limited to 'stashbox/templates') diff --git a/stashbox/templates/admin_folder.html b/stashbox/templates/admin_folder.html new file mode 100644 index 0000000..b3e8d42 --- /dev/null +++ b/stashbox/templates/admin_folder.html @@ -0,0 +1,13 @@ +$def with (users, form_update) + +
+
+

Update folder

+
+ +
+ $:form_update.render_css() +
+ +
+ diff --git a/stashbox/templates/admin_users.html b/stashbox/templates/admin_users.html new file mode 100644 index 0000000..d51602b --- /dev/null +++ b/stashbox/templates/admin_users.html @@ -0,0 +1,32 @@ +$def with (users, form) + +
+

Users

+ + + + + + + $for user in users: + + + + + +
UserPassword
$user.username$user.password +
+ +
+
+ +
+ +
+

Add a user

+ +
+ $:form.render_css() +
+ +
diff --git a/stashbox/templates/base.html b/stashbox/templates/base.html index 7171658..e6dc781 100644 --- a/stashbox/templates/base.html +++ b/stashbox/templates/base.html @@ -3,12 +3,61 @@ $def with (page) - Shareguard - + Mustache + + + + -$:page + +
+ + $if context['messages']: +
+
+ $for message in context['messages']: +
+ + $message +
+
+ $ context['messages'] = [] +
+ +
+ $:page +
+ +
+ + + diff --git a/stashbox/templates/folder_edit.html b/stashbox/templates/folder_edit.html new file mode 100644 index 0000000..70dbadc --- /dev/null +++ b/stashbox/templates/folder_edit.html @@ -0,0 +1,14 @@ +$def with (users, form_update, form_new_user) + +
+ +
+
+

Update folder

+
+ +
+ $:form_update.render_css() +
+ +
diff --git a/stashbox/templates/index.html b/stashbox/templates/index.html index 9c59de9..e219959 100644 --- a/stashbox/templates/index.html +++ b/stashbox/templates/index.html @@ -1,37 +1,40 @@ -$def with (boxes, form) +$def with (folders, form) -
+
-

Existing folders

+

Existing folders

-
- - +
+ - $for box in boxes: + $for folder in folders: - - + + +
Folder Owner Users
$box['name']$box['owner']$folder['name']$folder['owner'] + ${", ".join(folder['users'])} + - ${", ".join(box['users'])} + $ folder_id = folder['id'] + + +
-
-
+
-

Add a folder

+

Add a folder

-
- $:form.render() + + $:form.render_css()
-
diff --git a/stashbox/templates/user_add.html b/stashbox/templates/user_add.html new file mode 100644 index 0000000..a916386 --- /dev/null +++ b/stashbox/templates/user_add.html @@ -0,0 +1,25 @@ +$def with (users, form) + +
+ + + + + + + $for user in users: + + + + +
UserPassword
$user.username$user.password
+ +
+ +
+ +
+ $:form.render() +
+ +
diff --git a/stashbox/templates/user_edit.html b/stashbox/templates/user_edit.html new file mode 100644 index 0000000..da41862 --- /dev/null +++ b/stashbox/templates/user_edit.html @@ -0,0 +1,10 @@ +$def with (form) + +
+

Edit user

+ +
+ $:form.render_css() +
+ +
diff --git a/stashbox/templates/useradd.html b/stashbox/templates/useradd.html deleted file mode 100644 index a916386..0000000 --- a/stashbox/templates/useradd.html +++ /dev/null @@ -1,25 +0,0 @@ -$def with (users, form) - -
- - - - - - - $for user in users: - - - - -
UserPassword
$user.username$user.password
- -
- -
- -
- $:form.render() -
- -
diff --git a/stashbox/templates/usersadmin.html b/stashbox/templates/usersadmin.html deleted file mode 100644 index a916386..0000000 --- a/stashbox/templates/usersadmin.html +++ /dev/null @@ -1,25 +0,0 @@ -$def with (users, form) - -
- - - - - - - $for user in users: - - - - -
UserPassword
$user.username$user.password
- -
- -
- -
- $:form.render() -
- -
-- cgit v1.2.3