diff options
Diffstat (limited to 'tmpl')
-rw-r--r-- | tmpl/base.tmpl | 64 | ||||
-rw-r--r-- | tmpl/bylaws.tmpl | 0 | ||||
-rw-r--r-- | tmpl/index.tmpl | 19 | ||||
-rw-r--r-- | tmpl/login.tmpl | 18 | ||||
-rw-r--r-- | tmpl/logout.tmpl | 9 | ||||
-rw-r--r-- | tmpl/profile.tmpl | 24 | ||||
-rw-r--r-- | tmpl/register.tmpl | 30 | ||||
-rw-r--r-- | tmpl/tasks.tmpl | 29 | ||||
-rw-r--r-- | tmpl/validate.tmpl | 19 | ||||
-rw-r--r-- | tmpl/validation_email.tmpl | 9 |
10 files changed, 221 insertions, 0 deletions
diff --git a/tmpl/base.tmpl b/tmpl/base.tmpl new file mode 100644 index 0000000..b0fa3f3 --- /dev/null +++ b/tmpl/base.tmpl @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8" ?> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>{% block title %}{% endblock %}</title> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> + <meta http-equiv="x-ua-compatible" content="ie=edge" /> + {% block head_css_standard %} + <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css" /> + <link rel="stylesheet" href="bower_components/tether/dist/css/tether.min.css" /> + <link rel="stylesheet" href="css/mcoop.css" /> + {% endblock %} + {% block head_extra %}{% endblock %} + </head> + <body> + <nav class="navbar navbar-dark bg-dark navbar-expand-lg"> + <a class="navbar-brand" href="/">mcoop</a> + <div class="collapse navbar-collapse"> + <ul class="navbar-nav mr-auto p-2"> + <li class="nav-item"><a class="nav-link" href="tasks.php">Tasks</a></li> + <!--<li class="nav-item"><a class="nav-link" href="proposals.php">Proposals</a></li> + <li class="nav-item"><a class="nav-link" href="bylaws.php">Articles/Bylaws</a></li>--> + <li class="nav-item"><a class="nav-link" href="members.php">Members</a></li> + <!--<li class="nav-item"><a class="nav-link" href="directors.php">Directors</a></li>--> + </ul> + </div> + <ul class="navbar-nav ml-auto p-2"> + {% if sess_info.login_member %} + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="navbar_profile_dropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ sess_info.login_member.display_name | escape }}</a> + <div class="dropdown-menu" aria-labelledby="navbar_profile_dropdown"> + <a class="dropdown-item" href="profile.php">Profile</a> + <a class="dropdown-item" href="logout.php">Logout</a> + </div> + </li> + {% else %} + <li class="nav-item ml-auto"><a class="nav-link" href="login.php">Login</a></li> + <li class="nav-item ml-auto"><a class="nav-link" href="register.php">Register</a></li> + {% endif %} + </ul> + </nav> + <div class="container-fluid"> + {% block alerts %} + {% for alert in danger_alerts %} + <div class="alert alert-danger"> + {{ alert | raw }} + </div> + {% endfor %} + {% for alert in success_alerts %} + <div class="alert alert-success"> + {{ alert | raw }} + </div> + {% endfor %} + {% endblock %} + + <div class="main_container"> +{% block page_contents %}{% endblock %} + </div> + </div> + {% block body_js %}<script src="bower_components/jquery/dist/jquery.min.js"></script> + <script src="bower_components/tether/dist/js/tether.min.js"></script> + <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script> + {%- endblock %} + </body> +</html> diff --git a/tmpl/bylaws.tmpl b/tmpl/bylaws.tmpl new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tmpl/bylaws.tmpl diff --git a/tmpl/index.tmpl b/tmpl/index.tmpl new file mode 100644 index 0000000..cea7e90 --- /dev/null +++ b/tmpl/index.tmpl @@ -0,0 +1,19 @@ +{% extends "base.tmpl" %} + +{% block title %}{{ sitename | escape }}{% endblock %} + +{% block page_contents %} + <div class="row"> + <div class="col-12"><h3>Welcome to {{ sitename | escape }}</h3></div> + <div class="col-12"><hr style="border: 1px solid rgba(0, 0, 0, 1)"/></div> + <div class="col-12"><p>This is a sample mcoop install, the intent of mcoop is to be used to manage small Co-Operatives, so far there aren't many features but here's a TODO list for some of the intended features</p></div> + <ul> + <li class="col-12">Allow both the Co-Operative and members to post bounties in terms of shares (or dividend credits) on specific tasks and let other members claim them once they've done an amount of work on the task.</li> + <li class="col-12">For Co-Operatives mostly focused on development allow automatic dividend credit distribution based on contributions to the Co-Operatives repositories, distributing x credits/month with the distribution based on kloc/person in commits or similar metrics (requires integration with VCSes -- also see Section 35 of C37-3, also worth noting that normal business with the Co-Operative should also yield dividend credits)</li> + <li class="col-12">Manage details of the directors and public-facing members for the public site ala. a simple CMS, or just integrate the list directly into mcoop and use it as your Co-Op's public site</li> + </ul> + <div class="alert alert-warning"> + Disclaimer: Mainline is not an actual Co-Operative and isn't registered, the author is just interested in them and wanted to create a management webapp that might eventually be used by real Co-Operatives. + </div> + </div> +{% endblock %} diff --git a/tmpl/login.tmpl b/tmpl/login.tmpl new file mode 100644 index 0000000..de3a6e9 --- /dev/null +++ b/tmpl/login.tmpl @@ -0,0 +1,18 @@ +{% extends "base.tmpl" %} + +{% block title %}Login{% endblock %} + +{% block page_contents %} + <div class="row"> + <div class="col-12"><h2>Login</h2></div> + <div class="col-12"><hr style="border: 1px solid rgba(0, 0, 0, 1)"/></div> + </div> + <form action="login.php" method="post"> + <div class="row"> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">Username<span style="color: red">*</span></div> + <div class="col-12 col-sm-8 col-md-9 col-lg-10"><input type="text" name="username" /></div> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">Password <span style="color: red">*</span></div> + <div class="col-12 col-sm-8 col-md-9 col-lg-10"><input type="password" name="passwd" /></div> + <div class="col-12"><button class="btn btn-success" type="submit">Login</button></div> + </div> +{% endblock %} diff --git a/tmpl/logout.tmpl b/tmpl/logout.tmpl new file mode 100644 index 0000000..a507ed0 --- /dev/null +++ b/tmpl/logout.tmpl @@ -0,0 +1,9 @@ +{% extends "base.tmpl" %} + +{% block title %}Logout{% endblock %} + +{% block page_contents %} +<div class="d-flex flex-row"> + <div class="d-flex justify-content-center col-12"><h5>Successfully Logged Out</h4></div> +</div> +{% endblock %} diff --git a/tmpl/profile.tmpl b/tmpl/profile.tmpl new file mode 100644 index 0000000..92bb780 --- /dev/null +++ b/tmpl/profile.tmpl @@ -0,0 +1,24 @@ +{% extends "base.tmpl" %} + +{% block title %}Profile{% endblock %} + +{% block page_contents %} + <div class="row"> + <div class="col-12"><h2>Edit Profile</h2></div> + <div class="col-12"><hr style="border: 1px solid rgba(0, 0, 0, 1)"/></div> + </div> + <form action="profile.php" method="post"> + <div class="row"> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">Username</div> + <div class="col-12 col-sm-8 col-md-9 col-lg-10">{{ sess_info.login_member.username }}</div> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">Email</div> + <div class="col-12 col-sm-8 col-md-9 col-lg-10"><input type="email" name="email" value="{{ sess_info.login_member.email | escape('html_attr') }}" /></div> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">Full name</div> + <div class="col-12 col-sm-8 col-md-9 col-lg-10"><input type="text" name="fullname" value="{{ sess_info.login_member.full_name | escape('html_attr') }}" /></div> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">Old Password</div> + <div class="col-12 col-sm-8 col-md-9 col-lg-10"><input type="password" name="old_passwd" /></div> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">New Password</div> + <div class="col-12 col-sm-8 col-md-9 col-lg-10"><input type="password" name="new_passwd" /></div> + <div class="col-12"><button class="btn btn-success" type="submit">Update</button></div> + </div> +{% endblock %} diff --git a/tmpl/register.tmpl b/tmpl/register.tmpl new file mode 100644 index 0000000..f0878e9 --- /dev/null +++ b/tmpl/register.tmpl @@ -0,0 +1,30 @@ +{% extends "base.tmpl" %} + +{% block title %}Register{% endblock %} + +{% block body_js %} +<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl=en"></script> + {{- parent() }} +{% endblock %} + +{% block page_contents %} + <div class="row"> + <div class="col-12"><h2>Register for basic membership here</h2></div> + <div class="col-12"><hr style="border: 1px solid rgba(0, 0, 0, 1)"/></div> + <div class="col-12"><p>this doesn't register you as a full member, you have to confirm your email address and start <a href="contribute.xhtml">Contributing</a> first</p></div> + </div> + <form action="register.php" method="post"> + <div class="row"> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">Username<span style="color: red">*</span></div> + <div class="col-12 col-sm-8 col-md-9 col-lg-10"><input type="text" name="username" /></div> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">Email Address <span style="color: red">*</span></div> + <div class="col-12 col-sm-8 col-md-9 col-lg-10"><input type="email" name="email" /></div> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">Password <span style="color: red">*</span></div> + <div class="col-12 col-sm-8 col-md-9 col-lg-10"><input type="password" name="passwd" /></div> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">Full Name</div> + <div class="col-12 col-sm-8 col-md-9 col-lg-10"><input name="fullname" /></div> + <div class="offset-sm-2 col-11"><div class="g-recaptcha" data-sitekey="6Le5mkIUAAAAAKBvBdwIqcWd9vVMV2t9YhGxfMGb"></div></div> + <div class="col-12"><button class="btn btn-success" type="submit">Register</button></div> + </div> + </form> +{% endblock %} diff --git a/tmpl/tasks.tmpl b/tmpl/tasks.tmpl new file mode 100644 index 0000000..070e002 --- /dev/null +++ b/tmpl/tasks.tmpl @@ -0,0 +1,29 @@ +{% extends "base.tmpl" %} + +{% block title %}Tasks{% endblock %} + +{% block head_extra %} +<script src="js/tasks.js"></script> +{% endblock %} + +{% block page_contents %} + <div class="row"> + <div class="col-12"><h2>Task Search</h2></div> + <div class="col-12"><button class="btn btn-secondary" onclick="get_all_tasks()" name="view_all">View All Tasks</button></div> + <div class="col-12"><hr style="border: 1px solid rgba(0, 0, 0, 1)"/></div> + </div> + <div id="table_container" class="hidden_results_table"> + <table id="results_table" class="table"> + <thead><tr> + <td>ID</td> + <td>Title</td> + <td>State</td> + <td>Admin</td> + <td>Available Credits</td> + </tr></thead> + <tbody id="results_tbody"> + + </tbody> + </thead> + </div> +{% endblock %} diff --git a/tmpl/validate.tmpl b/tmpl/validate.tmpl new file mode 100644 index 0000000..ae32718 --- /dev/null +++ b/tmpl/validate.tmpl @@ -0,0 +1,19 @@ +{% extends "base.tmpl" %} + +{% block title %}Validate Email{% endblock %} + +{% block page_contents %} + <div class="row"> + <div class="col-12"><h2>Validate Email Address</h2></div> + <div class="col-12"><hr style="border: 1px solid rgba(0, 0, 0, 1)"/></div> + <div class="col-12"><p>If for whatever reason you can't click on the link in the email you can manually enter your username and the validation code here to validate your email address, the validation code is everything to the right of vcode= (excluding the '=') in the url</p></div> + </div> + <form action="validate.php" method="get"> + <div class="row"> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">Username</div> + <div class="col-12 col-sm-8 col-md-9 col-lg-10"><input type="text" name="un" /></div> + <div class="col-12 col-sm-4 col-md-3 col-lg-2">Validation Code</div> + <div class="col-12 col-sm-8 col-md-3 col-lg-10"><input type="text" name="vcode" /></div> + <div class="col-12"><button class="btn btn-success" type="submit">Validate Email</button></div> + </div> +{% endblock %} diff --git a/tmpl/validation_email.tmpl b/tmpl/validation_email.tmpl new file mode 100644 index 0000000..35076a4 --- /dev/null +++ b/tmpl/validation_email.tmpl @@ -0,0 +1,9 @@ +Hello {{ email }}, + +Thank you for registering at {{ website_name }}, to verify your email address please visit the following URL: +{{ vurl | raw }} + +If you didn't create an account you can either do nothing, in which case the person that tried registering with your email address will continue having limited access to the website until they change their email address, or request a deactivation at: +{{ deactivate_url | raw }} + +Deactivated accounts are deleted automatically after 28 days unless a reactivation is requested. |