diff options
Diffstat (limited to 'views/staff')
| -rw-r--r-- | views/staff/_header.ejs | 2 | ||||
| -rw-r--r-- | views/staff/_nav.ejs | 8 | ||||
| -rw-r--r-- | views/staff/index.ejs | 6 | ||||
| -rw-r--r-- | views/staff/media/index.ejs | 7 | ||||
| -rw-r--r-- | views/staff/media/show.ejs | 7 | ||||
| -rw-r--r-- | views/staff/media/show_404.ejs | 9 | ||||
| -rw-r--r-- | views/staff/plans/_form.ejs | 149 | ||||
| -rw-r--r-- | views/staff/plans/edit.ejs | 13 | ||||
| -rw-r--r-- | views/staff/plans/index.ejs | 65 | ||||
| -rw-r--r-- | views/staff/plans/new.ejs | 13 | ||||
| -rw-r--r-- | views/staff/projects/index.ejs | 7 | ||||
| -rw-r--r-- | views/staff/projects/show.ejs | 9 | ||||
| -rw-r--r-- | views/staff/projects/show_404.ejs | 7 | ||||
| -rw-r--r-- | views/staff/subscriptions/index.ejs | 36 | ||||
| -rw-r--r-- | views/staff/subscriptions/show.ejs | 12 | ||||
| -rw-r--r-- | views/staff/users/index.ejs | 7 | ||||
| -rw-r--r-- | views/staff/users/media.ejs | 13 | ||||
| -rw-r--r-- | views/staff/users/show.ejs | 7 | ||||
| -rw-r--r-- | views/staff/users/show_404.ejs | 14 |
19 files changed, 317 insertions, 74 deletions
diff --git a/views/staff/_header.ejs b/views/staff/_header.ejs index 3bbf4f1..a73c12e 100644 --- a/views/staff/_header.ejs +++ b/views/staff/_header.ejs @@ -1,7 +1,7 @@ <!doctype html> <html> <head> - <title>vvalls | staff</title> + <title>VValls | staff</title> [[ include ../partials/meta ]] <link rel="stylesheet" href="/assets/javascripts/vendor/bower_components/jquery-jsonview/dist/jquery.jsonview.css"></script> <link rel="stylesheet" href="/assets/stylesheets/staff.css"></script> diff --git a/views/staff/_nav.ejs b/views/staff/_nav.ejs new file mode 100644 index 0000000..e79ff69 --- /dev/null +++ b/views/staff/_nav.ejs @@ -0,0 +1,8 @@ +<nav> + <a href="/staff">home</a> + <a href="/staff/users">users</a> + <a href="/staff/projects">projects</a> + <a href="/staff/media">media</a> + <a href="/staff/plans">plans</a> + <a href="/staff/subscriptions">subscriptions</a> +</nav>
\ No newline at end of file diff --git a/views/staff/index.ejs b/views/staff/index.ejs index 5ca7269..1b73641 100644 --- a/views/staff/index.ejs +++ b/views/staff/index.ejs @@ -2,11 +2,7 @@ <h1>Staff Area</h1> - <nav> - <a href="/staff/users">users</a> - <a href="/staff/projects">projects</a> - <a href="/staff/media">media</a> - </nav> + [[ include _nav ]] <hr> diff --git a/views/staff/media/index.ejs b/views/staff/media/index.ejs index 516af2d..3805c8e 100644 --- a/views/staff/media/index.ejs +++ b/views/staff/media/index.ejs @@ -2,12 +2,7 @@ <h1>Media</h1> - <nav> - <a href="/staff">home</a> - <a href="/staff/users">users</a> - <a href="/staff/projects">projects</a> - <a href="/staff/media">media</a> - </nav> +[[ include ../_nav ]] <hr> diff --git a/views/staff/media/show.ejs b/views/staff/media/show.ejs index 76dcd32..9d05cb9 100644 --- a/views/staff/media/show.ejs +++ b/views/staff/media/show.ejs @@ -2,12 +2,7 @@ <h1>Media: [[- media.type ]]</h1> - <nav> - <a href="/staff">home</a> - <a href="/staff/users">users</a> - <a href="/staff/projects">projects</a> - <a href="/staff/media">media</a> - </nav> +[[ include ../_nav ]] <hr> diff --git a/views/staff/media/show_404.ejs b/views/staff/media/show_404.ejs index f07cef2..c6bac6f 100644 --- a/views/staff/media/show_404.ejs +++ b/views/staff/media/show_404.ejs @@ -2,13 +2,8 @@ <h1>Media not found</h1> - <nav> - <a href="/staff">home</a> - <a href="/staff/users">users</a> - <a href="/staff/projects">projects</a> - <a href="/staff/media">media</a> - </nav> - +[[ include ../_nav ]] + <hr> [[ include ../_footer ]] diff --git a/views/staff/plans/_form.ejs b/views/staff/plans/_form.ejs new file mode 100644 index 0000000..ae5ca5a --- /dev/null +++ b/views/staff/plans/_form.ejs @@ -0,0 +1,149 @@ +<input type="hidden" id="_csrf" name="_csrf" value="[[- token ]]"> + +<ul> + +<li class="section_break"> + <h3>New Plan</h3> +</li> + +<li> + <label for="plan_name">Name</label> + <div><input id="plan_name" name="name" type="text" value="[[- plan.name ]]"></div> +</li> + +<li> + <label for="plan_slug">Slug</label> + <div><input id="plan_slug" name="slug" type="text" value="[[- plan.slug ]]"></div> +</li> + +<!-- - - - - --> + +<li class="section_break"> + <h3>Plan Pricing</h3> +</li> + +<li> + <label for="plan_monthly_price">Monthly Price</label> + <div><input id="plan_monthly_price" name="monthly_price" type="number" value="[[- plan.monthly_price ]]"></div> +</li> + +<li> + <label for="plan_yearly_price">Yearly Price</label> + <div><input id="plan_yearly_price" name="yearly_price" type="number" value="[[- plan.yearly_price ]]"></div> +</li> + +<p> + <i>Note:</i> Pricing should be in cents, i.e. a price of $10.00 should be entered as 1000. +</p> + +<!-- - - - - --> + +<li class="section_break"> + <h3>Additional Template Pricing</h3> +</li> + +<li> + <label for="plan_basic_layout_monthly_price">Basic Template Price (Monthly)</label> + <div><input id="plan_basic_layout_monthly_price" name="basic_layout_monthly_price" type="number" value="[[- plan.basic_layout_monthly_price ]]"></div> +</li> + +<li> + <label for="plan_basic_layout_yearly_price">Basic Template Price (Yearly)</label> + <div><input id="plan_basic_layout_yearly_price" name="basic_layout_yearly_price" type="number" value="[[- plan.basic_layout_yearly_price ]]"></div> +</li> + +<li> + <label for="plan_pro_layout_monthly_price">Pro Template Price (Monthly)</label> + <div><input id="plan_pro_layout_monthly_price" name="pro_layout_monthly_price" type="number" value="[[- plan.pro_layout_monthly_price ]]"></div> +</li> + +<li> + <label for="plan_pro_layout_yearly_price">Pro Template Price (Yearly)</label> + <div><input id="plan_pro_layout_yearly_price" name="pro_layout_yearly_price" type="number" value="[[- plan.pro_layout_yearly_price ]]"></div> +</li> + +<!-- - - - - --> + +<li class="section_break"> + <h3>Per-Plan Template Limits</h3> +</li> + +<li> + <label for="plan_basic_layout_limit">Basic Template Limit</label> + <div><input id="plan_basic_layout_limit" name="basic_layout_limit" type="number" value="[[- plan.basic_layout_limit ]]"></div> +</li> + +<li> + <label for="plan_pro_layout_limit">Pro Template Limit</label> + <div><input id="plan_pro_layout_limit" name="pro_layout_limit" type="number" value="[[- plan.pro_layout_limit ]]"></div> +</li> + +<!-- - - - - --> + +<li class="section_break"> + <h3>Per-Plan Project Limits</h3> +</li> + +<li> + <label for="plan_stock_project_limit">Stock Project Limit</label> + <div><input id="plan_stock_project_limit" name="stock_project_limit" type="number" value="[[- plan.stock_project_limit ]]"></div> +</li> + +<li> + <label for="plan_basic_project_limit">Basic Project Limit</label> + <div><input id="plan_basic_project_limit" name="basic_project_limit" type="number" value="[[- plan.basic_project_limit ]]"></div> +</li> + +<li> + <label for="plan_pro_project_limit">Pro Layout Limit</label> + <div><input id="plan_pro_project_limit" name="pro_project_limit" type="number" value="[[- plan.pro_project_limit ]]"></div> +</li> + +<!-- - - - - --> + +<li class="section_break"> + <h3>Permissions</h3> +</li> + +<div> +<li> + <input name="permissions_basic_editor" type="hidden" value="0"> + <input id="plan_permissions_basic_editor" name="permissions_basic_editor" type="checkbox" value="1" [[ if (plan.permissions.basic_editor) { ]]checked[[ } ]]> + <label for="plan_permissions_basic_editor">Basic Editor</label> +</li> + +<li> + <input name="permissions_pro_editor" type="hidden" value="0"> + <input id="plan_permissions_pro_editor" name="permissions_pro_editor" type="checkbox" value="1" [[ if (plan.permissions.pro_editor) { ]]checked[[ } ]]> + <label for="plan_permissions_pro_editor">Pro Editor</label> +</li> + +<li> + <input name="permissions_solids" type="hidden" value="0"> + <input id="plan_permissions_solids" name="permissions_solids" type="checkbox" value="1" [[ if (plan.permissions.solids) { ]]checked[[ } ]]> + <label for="plan_permissions_solids">3D Objects</label> +</li> + +<li> + <input name="permissions_collaborators" type="hidden" value="0"> + <input id="plan_permissions_collaborators" name="permissions_collaborators" type="checkbox" value="1" [[ if (plan.permissions.collaborators) { ]]checked[[ } ]]> + <label for="plan_permissions_collaborators">Collaborators</label> +</li> + +<li> + <input name="permissions_no_logo" type="hidden" value="0"> + <input id="plan_permissions_no_logo" name="permissions_no_logo" type="checkbox" value="1" [[ if (plan.permissions.no_logo) { ]]checked[[ } ]]> + <label for="plan_permissions_no_logo">No Logo</label> +</li> + +<p> + These permissions should harmonize with the restrictions on layouts set above. +</p> + +</div> + +<li> + <input type="submit" value="Save Changes"> +</li> + +</ul> diff --git a/views/staff/plans/edit.ejs b/views/staff/plans/edit.ejs new file mode 100644 index 0000000..9848873 --- /dev/null +++ b/views/staff/plans/edit.ejs @@ -0,0 +1,13 @@ +[[ include ../_header ]] + + <h1>Edit Plan</h1> + +[[ include ../_nav ]] + + <hr> + +<form action="" method="post"> +[[- include _form ]] +</form> + +[[ include ../_footer ]] diff --git a/views/staff/plans/index.ejs b/views/staff/plans/index.ejs new file mode 100644 index 0000000..16fcf14 --- /dev/null +++ b/views/staff/plans/index.ejs @@ -0,0 +1,65 @@ +[[ include ../_header ]] + + <h1>Plans</h1> + +[[ include ../_nav ]] + + <hr> + +<table> + <tr> + <td> + </td> + [[ plans.forEach(function(plan){ ]] + <td style="text-align:right; min-width: 100px;"> + <b style="text-transform:uppercase">[[- plan.name ]]</b> + </td> + [[ }) ]] + </tr> + + <tr class="editLinks"> + <td> + <a href="/staff/plans/new">New Plan</a> + </td> + [[ plans.forEach(function(plan){ ]] + <td style="text-align:right"> + [<a href="/staff/plans/[[- plan.slug ]]">edit</a>] + </td> + [[ }) ]] + </tr> + + [[ fields.forEach(function(field){ ]] + <tr> + <td style="text-transform:capitalize">[[- field.replace(/_/g," ") ]]</td> + [[ plans.forEach(function(plan){ ]] + <td style="text-align:right"> + [[ if (field.indexOf("_price") != -1) { ]] + [[- plan[field] == 0 ? "" : "$" + (plan[field]/100).toFixed(2) ]] + [[ } else { ]] + [[- plan[field] ]] + [[ } ]] + </td> + [[ }) ]] + </tr> + [[ }) ]] + + <tr> + <td style="border-bottom: 1px dotted #888;" colspan='10'></td> + </tr> + + [[ permissions.forEach(function(permission){ ]] + <tr> + <td style="text-transform:capitalize">[[- permission.replace(/_/g," ") ]]</td> + [[ plans.forEach(function(plan){ ]] + <td style="text-align:right"> + [[- plan.permissions[permission] ? "<b>x</b>" : " " ]] + </td> + [[ }) ]] + </tr> + [[ }) ]] +</table> +<br clear="all"> + + <hr> + +[[ include ../_footer ]] diff --git a/views/staff/plans/new.ejs b/views/staff/plans/new.ejs new file mode 100644 index 0000000..297d3d6 --- /dev/null +++ b/views/staff/plans/new.ejs @@ -0,0 +1,13 @@ +[[ include ../_header ]] + + <h1>New Plan</h1> + +[[ include ../_nav ]] + + <hr> + +<form action="" method="post"> +[[- include _form ]] +</form> + +[[ include ../_footer ]] diff --git a/views/staff/projects/index.ejs b/views/staff/projects/index.ejs index 482ea25..e4ba469 100644 --- a/views/staff/projects/index.ejs +++ b/views/staff/projects/index.ejs @@ -2,12 +2,7 @@ <h1>Projects</h1> - <nav> - <a href="/staff">home</a> - <a href="/staff/users">users</a> - <a href="/staff/projects">projects</a> - <a href="/staff/media">media</a> - </nav> +[[ include ../_nav ]] <hr> diff --git a/views/staff/projects/show.ejs b/views/staff/projects/show.ejs index 1034b31..b090a41 100644 --- a/views/staff/projects/show.ejs +++ b/views/staff/projects/show.ejs @@ -2,13 +2,8 @@ <h1>[[- project.name ]]</h1> - <nav> - <a href="/staff">home</a> - <a href="/staff/users">users</a> - <a href="/staff/projects">projects</a> - <a href="/staff/media">media</a> - </nav> - +[[ include ../_nav ]] + <hr> <table> diff --git a/views/staff/projects/show_404.ejs b/views/staff/projects/show_404.ejs index 70320c0..f5e1658 100644 --- a/views/staff/projects/show_404.ejs +++ b/views/staff/projects/show_404.ejs @@ -2,12 +2,7 @@ <h1>Project not found</h1> - <nav> - <a href="/staff">home</a> - <a href="/staff/users">users</a> - <a href="/staff/projects">projects</a> - <a href="/staff/media">media</a> - </nav> +[[ include ../_nav ]] <hr> diff --git a/views/staff/subscriptions/index.ejs b/views/staff/subscriptions/index.ejs new file mode 100644 index 0000000..d1c0588 --- /dev/null +++ b/views/staff/subscriptions/index.ejs @@ -0,0 +1,36 @@ +[[ include ../_header ]] + + <h1>Users</h1> + +[[ include ../_nav ]] + + <hr> + +[[ include ../_pagination ]] + +<table id="users"> +[[ subscriptions.forEach(function(subscription){ ]] + <tr> + <td> + <a href="/staff/subscriptions/[[- subscription._id ]]"><div style="background-image:url([[- subscription.user.photo ]])" class="avatar"></div></a> + </td> + <td> + <a href="/staff/subscriptions/[[- subscription._id ]]">[[- subscription.user.username ]]</a> + </td> + <td> + [[- subscription.user.displayName ]] + </td> + <td class="editLinks"> + <a href="/profile/[[- user.username ]]">[view profile]</a> + </td> + <td> + [[- subscription.user.last_seen ]] + </td> + </tr> +[[ }) ]] +</table> + + +[[ include ../_pagination ]] + +[[ include ../_footer ]] diff --git a/views/staff/subscriptions/show.ejs b/views/staff/subscriptions/show.ejs new file mode 100644 index 0000000..e2839a6 --- /dev/null +++ b/views/staff/subscriptions/show.ejs @@ -0,0 +1,12 @@ +[[ include ../_header ]] + <h1>User: [[- subscription.user.username ]]</h1> + +[[ include ../_nav ]] + + <hr> + +<pre> +info to show.. +- link to recurly profile +- link to vvalls profile +- subscription tier + add-ons diff --git a/views/staff/users/index.ejs b/views/staff/users/index.ejs index f14d666..1795dde 100644 --- a/views/staff/users/index.ejs +++ b/views/staff/users/index.ejs @@ -2,12 +2,7 @@ <h1>Users</h1> - <nav> - <a href="/staff">home</a> - <a href="/staff/users">users</a> - <a href="/staff/projects">projects</a> - <a href="/staff/media">media</a> - </nav> +[[ include ../_nav ]] <hr> diff --git a/views/staff/users/media.ejs b/views/staff/users/media.ejs index c1097dd..8927c00 100644 --- a/views/staff/users/media.ejs +++ b/views/staff/users/media.ejs @@ -1,15 +1,10 @@ [[ include ../_header ]] - <h1>User Media: [[- profile.username ]]</h1> +<h1>User Media: [[- profile.username ]]</h1> - <nav> - <a href="/staff">home</a> - <a href="/staff/users">users</a> - <a href="/staff/projects">projects</a> - <a href="/staff/media">media</a> - </nav> - - <hr> +[[ include ../_nav ]] + +<hr> [[ include ../_pagination ]] [[ include ../_gallery ]] diff --git a/views/staff/users/show.ejs b/views/staff/users/show.ejs index 8e9b447..4ce1d9a 100644 --- a/views/staff/users/show.ejs +++ b/views/staff/users/show.ejs @@ -1,12 +1,7 @@ [[ include ../_header ]] <h1>User: [[- profile.username ]]</h1> - <nav> - <a href="/staff">home</a> - <a href="/staff/users">users</a> - <a href="/staff/projects">projects</a> - <a href="/staff/media">media</a> - </nav> +[[ include ../_nav ]] <hr> diff --git a/views/staff/users/show_404.ejs b/views/staff/users/show_404.ejs index bcd0271..11663fa 100644 --- a/views/staff/users/show_404.ejs +++ b/views/staff/users/show_404.ejs @@ -1,13 +1,9 @@ [[ include ../_header ]] - <h1>User not found</h1> - <nav> - <a href="/staff">home</a> - <a href="/staff/users">users</a> - <a href="/staff/projects">projects</a> - <a href="/staff/media">media</a> - </nav> - - <hr> +<h1>User not found</h1> + +[[ include ../_nav ]] + +<hr> [[ include ../_footer ]] |
