diff options
Diffstat (limited to 'r7r_repo/templates')
-rwxr-xr-x | r7r_repo/templates/.htaccess | 4 | ||||
-rw-r--r-- | r7r_repo/templates/src/home.html | 35 | ||||
-rw-r--r-- | r7r_repo/templates/src/master.html | 90 | ||||
-rw-r--r-- | r7r_repo/templates/src/setup.html | 53 |
4 files changed, 182 insertions, 0 deletions
diff --git a/r7r_repo/templates/.htaccess b/r7r_repo/templates/.htaccess new file mode 100755 index 0000000..19469bf --- /dev/null +++ b/r7r_repo/templates/.htaccess @@ -0,0 +1,4 @@ +<Files *> + Order Allow,Deny + Deny from all +</Files> diff --git a/r7r_repo/templates/src/home.html b/r7r_repo/templates/src/home.html new file mode 100644 index 0000000..bf9623a --- /dev/null +++ b/r7r_repo/templates/src/home.html @@ -0,0 +1,35 @@ +<ste:load name="master.html" /> +<ste:block name="content"> + <h2>Latest Packages</h2> + <table class="listtab fullwidth"> + <thead> + <tr> + <th>Package Name</th> + <th>Version</th> + <th>Description</th> + <th>Last update</th> + </tr> + </thead> + <tbody> + <ste:if> + <ste:set var="pkgs_n"><ste:arraylen array="latest_pkgs" /></ste:set> + ~{$pkgs_n|gt|0} + <ste:then> + <ste:foreach array="latest_pkgs" value="pkg"> + <tr> + <td><ste:escape>$pkg[name]</ste:escape></td> + <td><ste:escape>$pkg[version]</ste:escape></td> + <td><ste:escape>$pkg[description]</ste:escape></td> + <td><ste:date format="%d. %h. %Y, %H:%M:%S">$pkg[last_update]</ste:date></td> + </tr> + </ste:foreach> + </ste:then> + <ste:else> + <tr> + <td style="text-align: center; font-style: italic;" colspan="4">No Packages available.</td> + </tr> + </ste:else> + </ste:if> + </tbody> + </table> +</ste:block> diff --git a/r7r_repo/templates/src/master.html b/r7r_repo/templates/src/master.html new file mode 100644 index 0000000..a2dbd58 --- /dev/null +++ b/r7r_repo/templates/src/master.html @@ -0,0 +1,90 @@ +<ste:mktag name="menu_elem" mandatory="name|path"> + <li?{~{$menu|eq|$_tag_parameters[name]}| class="active"|}> + <a href="${rel_path_to_root}${_tag_parameters[path]}"><ste:tagcontent /></a> + </li> +</ste:mktag> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="Content-Style-Type" content="text/css" /> + <title><ste:escape>?{$title|$title - $repo[name]|$repo[name]}</ste:escape></title> + <link rel="stylesheet" type="text/css" media="screen" href="$rel_path_to_root/r7r_repo/css/common.css" /> + <link rel="stylesheet" type="text/css" media="screen" href="$rel_path_to_root/r7r_repo/css/main.css" /> +</head> +<body> + <div id="maincontainer"> + <div id="heading"> + <h1><ste:escape>$repo[name]</ste:escape></h1> + <span id="subheading"><ste:escape>$repo[description]</ste:escape></span> + </div> + <ul id="mainmenu"> + <ste:menu_elem name="home" path="">Home</ste:menu_elem> + <ste:if> + $user[logged_in] + <ste:then> + <ste:if> + $user[admin] + <ste:then> + <ste:menu_elem name="admin" path="/admin">Administration</ste:menu_elem> + <ste:menu_elem name="upload" path="/upload">Upload Package</ste:menu_elem> + </ste:then> + <ste:else> + ?{$repo[public]|<ste:menu_elem name="upload" path="/upload">Upload Package</ste:menu_elem>|} + </ste:else> + </ste:if> + <ste:menu_elem name="my_plugins" path="/my_plugins">My Plugins</ste:menu_elem> + <ste:menu_elem name="account" path="/account">My Account</ste:menu_elem> + <ste:menu_elem name="logout" path="/logout">Logout</ste:menu_elem> + </ste:then> + <ste:else> + ?{$repo[public]|<ste:menu_elem name="register" path="/register">Register</ste:menu_elem>|} + </ste:else> + </ste:if> + </ul> + <div id="contentwrapper"> + <div id="metabar"> + <div class="metabar_module"> + <h2>Repository Base URL</h2> + <input type="text" readonly="readonly" value="<ste:escape>$repo[baseurl]</ste:escape>" /> + </div> + <div class="metabar_module"> + <form action="$rel_path_to_root/search" method="POST" accept-charset="UTF-8"> + <h2>Search</h2> + <input type="text" name="searchterm" /><br /> + <input type="submit" /> + </form> + </div> + <div class="metabar_module"> + <ste:if> + $user[logged_in] + <ste:then> + Welcome, <strong><ste:escape>$user[name]</ste:escape></strong>! + </ste:then> + <ste:else> + <form action="$rel_path_to_root/login" method="POST" accept-charset="UTF-8"> + <h2>Login</h2> + <p> + <strong>Name:</strong><br /> + <input type="text" name="username" /> + </p> + <p> + <strong>Password:</strong><br /> + <input type="password" name="password" /> + </p> + <p><input type="submit" name="login" /></p> + ?{$repo[public]|No account? <a href="$rel_path_to_root/register">Register for a new account.</a>|} + </form> + </ste:else> + </ste:if> + </div> + <ste:block name="additional_metabar_modules" /> + </div> + <div id="content"> + <ste:block name="content" /> + </div> + </div> + <div id="footer"></div> + </div> +</body> +</html> diff --git a/r7r_repo/templates/src/setup.html b/r7r_repo/templates/src/setup.html new file mode 100644 index 0000000..c73abb4 --- /dev/null +++ b/r7r_repo/templates/src/setup.html @@ -0,0 +1,53 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="Content-Style-Type" content="text/css" /> + <title>Setup</title> + <link rel="stylesheet" type="text/css" media="screen" href="$rel_path_to_root/r7r_repo/css/common.css" /> + <link rel="stylesheet" type="text/css" media="screen" href="$rel_path_to_root/r7r_repo/css/setup.css" /> +</head> +<body> + <div id="maincontainer"> + <h1>Setup</h1> + <ste:if> + $error + <ste:then> + <div class="error"> + <ste:escape>$error</ste:escape> + </div> + </ste:then> + </ste:if> + <form action="$rel_path_to_root/setup" method="POST" accept-charset="UTF-8"> + <p> + <strong>Admin username</strong><br /> + <input type="text" name="admin_name" value="" /> + </p> + <p> + <strong>Admin initial password</strong><br /> + <input type="password" name="admin_password" /> + </p> + <p> + <strong>Repository name</strong><br /> + <input type="text" name="repo_name" /> + </p> + <p> + <strong>Repository description</strong><br /> + <input type="text" name="repo_description" /> + </p> + <p> + <strong>Repostory Base URL</strong><br /> + <input type="text" name="repo_baseurl" value="<ste:escape>$baseurl_predicted</ste:escape>"/> + </p> + <p> + <strong>Repository mode</strong><br /> + <select name="repo_mode"> + <option value="public" selected="selected">Public - Everyone (ie. registered users) is allowed to publish packages.</option> + <option value="private"> Private - Only administrators are allowed to publish packages.</option> + </select> + </p> + <input type="submit" name="send_data" /> + </form> + </div> +</body> +</html> |