summaryrefslogtreecommitdiffstats
path: root/application/views
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-10-22 15:42:07 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-10-22 22:36:55 +0200
commitde02b8cb514a95c100d0ec11ab469acfc687ca00 (patch)
tree9c09a70f4ac2b582ae80dd6e065f700ef460ed11 /application/views
parent36f0185d8c950933099268c69081cabc084545c9 (diff)
switch design to bootstrap; minor fixes along the way
Initial-work-by: Oliver Mader <b52@reaktor42.de> Additional-work-by: Markus Cisler <mrkscslr@gmail.com> Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/views')
-rw-r--r--application/views/file/footer.php3
-rw-r--r--application/views/file/header.php28
-rw-r--r--application/views/file/html_footer.php6
-rw-r--r--application/views/file/html_header.php131
-rw-r--r--application/views/file/upload_form.php131
-rw-r--r--application/views/file/upload_history.php53
-rw-r--r--application/views/footer.php8
-rw-r--r--application/views/header.php51
l---------application/views/user/footer.php1
l---------application/views/user/header.php1
-rw-r--r--application/views/user/invite.php44
-rw-r--r--application/views/user/login.php8
-rw-r--r--application/views/user/register.php4
13 files changed, 280 insertions, 189 deletions
diff --git a/application/views/file/footer.php b/application/views/file/footer.php
deleted file mode 100644
index eda863585..000000000
--- a/application/views/file/footer.php
+++ /dev/null
@@ -1,3 +0,0 @@
- </div>
-</body>
-</html>
diff --git a/application/views/file/header.php b/application/views/file/header.php
deleted file mode 100644
index 3029e4579..000000000
--- a/application/views/file/header.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
- <title><?php echo isset($title) ? $title : ''; ?></title>
- <link rel="stylesheet" type="text/css" href="<?php echo link_with_mtime("/data/default.css"); ?>" media="screen" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- <meta name="robots" content="noindex,nofollow" />
-</head>
-
-<body>
- <div class="top">
- <?php echo anchor('file/index', 'New'); ?> |
- <?php echo anchor('file/upload_history', 'History'); ?> |
- <?php echo anchor('user/invite', 'Invite'); ?>
-
- <?php if(!isset($is_error_page)) { ?>
- <div class="right">
- <?php if(isset($username) && $username) { ?>
- <?=anchor("user/logout", "Logout"); ?>
- <?php } else { ?>
- <?=anchor("user/login", "Login"); ?>
- <?php } ?>
- </div>
- <?php } ?>
- </div>
-
- <div class="content">
diff --git a/application/views/file/html_footer.php b/application/views/file/html_footer.php
index ddc460a39..a2a1cfec2 100644
--- a/application/views/file/html_footer.php
+++ b/application/views/file/html_footer.php
@@ -1,5 +1,7 @@
</td>
</tr>
</table>
- </body>
-</html>
+ </div>
+ </div>
+
+<?php include(FCPATH."application/views/footer.php");
diff --git a/application/views/file/html_header.php b/application/views/file/html_header.php
index 60db38238..67e9d0cca 100644
--- a/application/views/file/html_header.php
+++ b/application/views/file/html_header.php
@@ -1,52 +1,85 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title><?php echo $title; ?></title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <link rel="stylesheet" type="text/css" href="<?php echo link_with_mtime("/data/paste.css"); ?>" />
-<?php if (file_exists(FCPATH."/data/paste-$current_highlight.css")) {?>
- <link rel="stylesheet" type="text/css" href="<?php echo link_with_mtime("/data/paste-$current_highlight.css"); ?>" />
-<?php } ?>
- </head>
- <body>
- <div class="top_bar">
- <a class="raw_link no" href="<?php echo site_url(); ?>">New</a> |
- <a class="raw_link no" href="<?php echo site_url($id); ?>">Raw</a> |
- <a class="raw_link no" href="<?php echo site_url($id."/plain"); ?>">Plain</a> |
- <a class="raw_link no" href="<?php echo site_url($id."/info"); ?>">Info</a> |
- Currently: <?php echo $current_highlight; ?> |
- Timeout: <?php echo $timeout; ?>
- <div style="float:right;">
- <a class="raw_link no" href="<?php echo site_url($id)."/"; ?>">Code</a> |
- <a class="raw_link no" href="<?php echo site_url($id."/rmd"); ?>">Render Markdown</a>
- </div>
+<?php include(FCPATH."application/views/header.php"); ?>
+
</div>
-<script type="text/javascript">
-/* <![CDATA[ */
-function update_anchor_highlight() {
- var anchor = window.location.hash.substr(1);
- var element = document.getElementById("highlight_line");
- if (element) {
- element.parentNode.removeChild(element);
- }
- anchor = document.getElementById(anchor);
- if (!anchor) {
- return;
- }
- var newElement = document.createElement("div");
- newElement.setAttribute("id", "highlight_line");
- newElement.textContent=" ";
- anchor.parentNode.insertBefore(newElement, anchor.nextSibling);
-}
+ <script type="text/javascript">
+ /* <![CDATA[ */
+ window.lexers = <?php echo json_encode($lexers); ?>;
+ window.paste_base = '<?php echo site_url($id) ?>';
+ /* ]]> */
+ </script>
+
+ <?php if (isset($error_message)) { ?>
+ <div class="alert alert-block alert-error" style="text-align: center">
+ <?php echo $error_message; ?>
+ </div>
+ <?php } ?>
-if ("onhashchange" in window) {
- window.onload = function () {
- update_anchor_highlight();
- }
- window.onhashchange = function () {
- update_anchor_highlight();
- }
-}
-/* ]]> */
-</script>
+ <div class="container" style="padding-top:40px;background:#eee;padding:3px;">
+ <div style="border:1px solid #ccc;">
+ <div class="navbar navbar-static-top">
+ <div class="navbar-inner" style="box-shadow: none;">
+ <ul class="nav">
+ <li><a href="#file-info" class="brand" data-toggle="modal"><?php echo $title ?></a></li>
+ <li class="divider-vertical"></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="language-toggle">
+ Language: <?php echo $current_highlight; ?>
+ <b class="caret"></b>
+ </a>
+ <div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">
+ <form>
+ <input type="text" id="language" placeholder="Language" class="input-medium">
+ </form>
+ </div>
+ </li>
+ <li class="divider-vertical"></li>
+ <li>
+ <a href="#file-info" role="button" data-toggle="modal">Info</a>
+ <div id="file-info" class="modal hide fade">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+ <h3>Paste Information</h3>
+ </div>
+ <div class="modal-body">
+ <table class="table">
+ <tr>
+ <td style="border:0;">Filename:</td>
+ <td style="border:0;"><?php echo htmlspecialchars($filedata["filename"]) ?></td>
+ </tr>
+ <tr>
+ <td>Size:</td>
+ <td><?php echo format_bytes($filedata["filesize"]) ?></td>
+ </tr>
+ <tr>
+ <td>Mimetype:</td>
+ <td><?php echo $filedata["mimetype"] ?></td>
+ </tr>
+ <tr>
+ <td>Uploaded:</td>
+ <td><?php echo date("r", $filedata["date"]) ?></td>
+ </tr>
+ <tr>
+ <td>Removal:</td>
+ <td><?php echo $timeout ?></td>
+ </tr>
+ </table>
+ </div>
+ <div class="modal-footer">
+ <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
+ </div>
+ </div>
+ </li>
+ </ul>
+ <div class="btn-group pull-right" style="margin-top: 7px; margin-right:-10px;">
+ <a href="<?php echo site_url($id."/plain") ?>" class="btn btn-small" rel="tooltip" title="View as plain text">Plain</a>
+ <a href="<?php echo site_url($id) ?>" class="btn btn-small" rel="tooltip" title="View as raw file (org. mime type)">Raw</a>
+ <?php if ($current_highlight === 'rmd') { ?>
+ <a href="<?php echo site_url($id)."/" ?>" class="btn btn-small" rel="tooltip" title="Render as Code">Code</a>
+ <?php } else { ?>
+ <a href="<?php echo site_url($id."/rmd") ?>" class="btn btn-small" rel="tooltip" title="Render as Markdown">Markdown</a>
+ <?php } ?>
+ </div>
+ </div>
+ </div>
+ <div id="paste-container">
diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php
index 20fb1a3d8..d92cbfb5c 100644
--- a/application/views/file/upload_form.php
+++ b/application/views/file/upload_form.php
@@ -1,67 +1,72 @@
-<? if ($username) { ?>
-<div class="center">
- <?php echo form_open_multipart('file/do_upload'); ?>
- <p>
- File: <input type="file" id="file" name="file" size="30" />
- <input type="submit" value="Upload" id="upload_button" name="process" />
- </p>
- </form>
- <p><b>OR</b></p>
- <?php echo form_open_multipart('file/do_paste'); ?>
- <p>
- <textarea id="textarea" name="content" cols="80" rows="20"></textarea><br />
- <input type="submit" value="Paste" name="process" />
- </p>
- </form>
- <script type="text/javascript">
- /* <![CDATA[ */
- var max_upload_size = "<?php echo $max_upload_size; ?>";
- /* ]]> */
- </script>
- <script type="text/javascript" src="<?php echo link_with_mtime("/data/js/upload_form.js"); ?>"></script>
-</div>
-<? } else { ?>
-You have to <?=anchor("user/login", "log in"); ?> to be able to upload/paste.
-<div id="login-form">
- <?=form_open("user/login"); ?>
- <input type="text" name="username" />
- <input type="password" name="password" />
- <input type="submit" value="Login" name="process" />
- </form>
+<?php if (isset($username) && $username) { ?>
+<div class="well">
+ <div class="row-fluid">
+ <div class="span6">
+ <div style="border-right:1px solid #ddd;padding-right:25px;">
+ <?php echo form_open_multipart('file/do_paste'); ?>
+ <h2>Text paste</h2>
+ <textarea name="content" style="width:98%; height:300px;"></textarea>
+ <button type="submit" class="btn btn-primary">Paste it!</button>
+ </form>
+ </div>
+ </div>
+ <div class="span6">
+ <?php echo form_open_multipart('file/do_upload'); ?>
+ <h2>File upload</h2>
+ <input id="file" type="file" name="file"><br>
+ <button type="submit" id="upload_button" class="btn btn-primary">Upload it!</button>
+ </form>
+ <div class="alert alert-block alert-info">
+ <h4 class="alert-heading">Notice!</h4>
+ <p>
+ Uploads/pastes are deleted after <?php echo $upload_max_age; ?> days
+ <?php if($small_upload_size > 0) {
+ echo "unless they are smaller than ".format_bytes($small_upload_size);
+ } ?>. Maximum upload size is <?php echo format_bytes($max_upload_size); ?>
+ </p>
+ </div>
+ </div>
+ </div>
</div>
-<? } ?>
-<br />
-<p>Uploads/pastes are deleted after <?php echo $upload_max_age; ?> days<?php if($small_upload_size > 0): ?>
- unless they are smaller than <?php echo format_bytes($small_upload_size); ?>
- <?php endif; ?>. Maximum upload size is <?php echo format_bytes($max_upload_size); ?></p>
-<h2>Features</h2>
-<p>For shell uploading/pasting and download information for the client go to <a href="<?php echo site_url("file/client"); ?>"><?php echo site_url("file/client"); ?></a></p>
-<p>You can use the <?php echo anchor("file/upload_history", "history"); ?> to find old uploads.</p>
-<p>How to link your pastes:</p>
-<ul>
- <li><span class="example">/&lt;ID&gt;/</span> automatically highlight the paste</li>
- <li><span class="example">/&lt;ID&gt;</span> set the detected MIME type and let the browser do the rest</li>
- <li><span class="example">/&lt;ID&gt;/plain</span> force the MIME type to be text/plain</li>
- <li><span class="example">/&lt;ID&gt;/&lt;file extension&gt;</span> override auto detection and use the supplied file extension or language name for highlighting</li>
- <li><span class="example">/&lt;ID&gt;/qr</span> display a qr code containing a link to <span class="example">/&lt;ID&gt;/</span></li>
- <li><span class="example">/&lt;ID&gt;/rmd</span> convert markdown to HTML</li>
- <li><span class="example">/&lt;ID&gt;/ascii</span> convert text with ANSI (shell) escape codes to HTML</li>
- <li><span class="example">/&lt;ID&gt;/info</span> display some information about the ID</li>
-</ul>
-<p>If your upload is not detected as text, only
-<span class="example">/&lt;ID&gt;/qr</span>,
-<span class="example">/&lt;ID&gt;/plain</span> and
-<span class="example">/&lt;ID&gt;/info</span>
-will work as above and all others will simply return the file with the detected MIME type.</p>
-<h2>Information</h2>
-<p>This website's primary goal is aiding developers, power users, students and alike in solving problems, debugging software, sharing their configuration, etc. It is not intended to distribute confidential or harmful information, scripts or software.</p>
-
-<p>If you believe you deserve an account, ask someone who is already using this service to <?=anchor("user/invite", "invite"); ?> you.</p>
+<script type="text/javascript">
+ /* <![CDATA[ */
+ var max_upload_size = "<?php echo $max_upload_size; ?>";
+ /* ]]> */
+</script>
+<script type="text/javascript" src="<?php echo link_with_mtime("/data/js/upload_form.js"); ?>"></script>
-<?php if($contact_me_url) {?><p>If you experience any problems feel free to <a href="<?php echo $contact_me_url; ?>">contact me</a>.</p>
-<br /><?php }; ?>
-<div class="small">
- <p>Icons by <a href="http://p.yusukekamiyamane.com/">Yusuke Kamiyamane</a></p>
- <p>This service is provided without warranty of any kind and may not be used to distribute copyrighted content.</p>
+<?php } else { ?>
+ <?php echo form_open('user/login'); ?>
+ <input type="text" name="username" placeholder="Username" />
+ <input type="password" name="password" placeholder="Password" />
+ <input type="submit" class="btn btn-primary" value="Login" name="process" style="margin-bottom: 9px" />
+ </form>
+<?php } ?>
+<div class="row">
+ <div class="span6">
+ <div class="page-header"><h1>Features</h1></div>
+ <p>For shell uploading/pasting and download information for the client go to <a href="<?php echo site_url("file/client"); ?>"><?php echo site_url("file/client"); ?></a></p>
+ <p>You can use the <?php echo anchor("file/upload_history", "history"); ?> to find old uploads.</p>
+ <h3>How to link your pastes:</h3>
+ <dl class="dl-horizontal">
+ <dt>/&lt;ID&gt;/</dt><dd>automatically highlight the paste</dd>
+ <dt>/&lt;ID&gt;</dt><dd>set the detected MIME type and let the browser do the rest</dd>
+ <dt>/&lt;ID&gt;/plain</dt><dd>force the MIME type to be text/plain</dd>
+ <dt>/&lt;ID&gt;/&lt;file extension&gt;</dt><dd>override auto detection and use the supplied file extension or language name for highlighting</dd>
+ <dt>/&lt;ID&gt;/qr</dt><dd>display a qr code containing a link to <span class="example">/&lt;ID&gt;/</span></dd>
+ <dt>/&lt;ID&gt;/rmd</dt><dd>convert markdown to HTML</dd>
+ <dt>/&lt;ID&gt;/ascii</dt><dd>convert text with ANSI (shell) escape codes to HTML</dd>
+ <dt>/&lt;ID&gt;/info</dt><dd>display some information about the ID</dd>
+ </dl>
+ <p>If your upload is not detected as text, only <b>/&lt;ID&gt;/qr</b>, <b>/&lt;ID&gt;/plain</b> and <b>/&lt;ID&gt;/info</b> will work as above and all others will simply return the file with the detected MIME type.</p>
+ </div>
+ <div class="span6">
+ <div class="page-header"><h1>Information</h1></div>
+ <p>This website's primary goal is aiding developers, power users, students and alike in solving problems, debugging software, sharing their configuration, etc. It is not intended to distribute confidential or harmful information, scripts or software.</p>
+ <p>If you believe you deserve an account, ask someone who is already using this service to <a href="http://test.paste.xinu.at/index.php/user/invite">invite</a> you.</p>
+ <?php if(isset($contact_me_url) && $contact_me_url) { ?>
+ <p>If you experience any problems feel free to <a href="<?php echo $contact_me_url; ?>">contact me</a>.</p>
+ <?php } ?>
+ </div>
</div>
diff --git a/application/views/file/upload_history.php b/application/views/file/upload_history.php
index 41b055792..2f09240a1 100644
--- a/application/views/file/upload_history.php
+++ b/application/views/file/upload_history.php
@@ -1,28 +1,31 @@
-<?php echo form_open("file/do_delete"); ?>
- <table class="results">
- <tr>
- <th></th>
- <th>ID</th>
- <th>Filename</th>
- <th>Mimetype
- <th>Date</th>
- <th>Hash</th>
- <th>Size</th>
- </tr>
-
- <?php foreach($query as $key => $item): ?>
- <tr class="<?php echo even_odd(); ?>">
- <td><input type="checkbox" name="ids[<?php echo $item["id"]; ?>]" value="<?php echo $item["id"]; ?>" /></td>
- <td><a href="<?php echo site_url("/".$item["id"]); ?>/"><?php echo $item["id"]; ?></a></td>
- <td><?php echo htmlspecialchars($item["filename"]); ?></td>
- <td><?php echo $item["mimetype"]; ?></td>
- <td><?php echo $item["date"]; ?></td>
- <td><?php echo $item["hash"]; ?></td>
- <td><?php echo $item["filesize"]; ?></td>
- </tr>
- <?php endforeach; ?>
- </table>
- <input type="submit" value="Delete checked" name="process" />
+<?php echo form_open("file/do_delete") ?>
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th><input type="checkbox" name="all-ids" id="history-all"></th>
+ <th>ID</th>
+ <th>Filename</th>
+ <th>Mimetype
+ <th>Date</th>
+ <th>Hash</th>
+ <th>Size</th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach($query as $key => $item): ?>
+ <tr>
+ <td><input type="checkbox" name="ids[<?php echo $item["id"] ?>]" value="<?php echo $item["id"] ?>" class="delete-history"></td>
+ <td><a href="<?php echo site_url("/".$item["id"]) ?>/"><?php echo $item["id"] ?></a></td>
+ <td><?php echo htmlspecialchars($item["filename"]); ?></td>
+ <td><?php echo $item["mimetype"] ?></td>
+ <td><?php echo $item["date"] ?></td>
+ <td><?php echo $item["hash"] ?></td>
+ <td><?php echo $item["filesize"] ?></td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <input class="btn btn-danger" type="submit" value="Delete checked" name="process">
</form>
<p>Total sum of your distinct uploads: <?php echo $total_size; ?>.</p>
diff --git a/application/views/footer.php b/application/views/footer.php
new file mode 100644
index 000000000..92b305999
--- /dev/null
+++ b/application/views/footer.php
@@ -0,0 +1,8 @@
+ </div>
+
+ <script src="<?php echo link_with_mtime("/data/js/jquery-1.8.2.min.js"); ?>"></script>
+ <script src="<?php echo link_with_mtime("/data/js/jquery-ui-1.8.23.custom.min.js"); ?>"></script>
+ <script src="<?php echo link_with_mtime("/data/js/bootstrap-2.1.1.min.js"); ?>"></script>
+ <script src="<?php echo link_with_mtime("/data/js/script.js"); ?>"></script>
+</body>
+</html>
diff --git a/application/views/header.php b/application/views/header.php
new file mode 100644
index 000000000..4f2c46e79
--- /dev/null
+++ b/application/views/header.php
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <title><?php echo isset($title) ? $title : 'FileBin'; ?></title>
+ <meta name="robots" content="noindex,nofollow" />
+ <meta name="description" content="">
+ <meta name="author" content="">
+
+ <link href="<?php echo link_with_mtime("/data/css/ui-lightness/jquery-ui-1.8.23.custom.css"); ?>" rel="stylesheet">
+ <link href="<?php echo link_with_mtime("/data/css/bootstrap-2.1.1.min.css"); ?>" rel="stylesheet">
+ <link href="<?php echo link_with_mtime("/data/css/bootstrap-responsive-2.1.1.min.css"); ?>" rel="stylesheet">
+ <link href="<?php echo link_with_mtime("/data/css/style.css"); ?>" rel="stylesheet">
+</head>
+
+<body>
+ <div class="navbar navbar-fixed-top navbar-inverse">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="brand" href="<?php echo site_url(); ?>">FileBin</a>
+ <?php if(!isset($GLOBALS["is_error_page"])) { ?>
+ <ul class="nav pull-right">
+ <?php if(isset($username) && $username) { ?>
+ <li><a href="<?php echo site_url("/user/logout"); ?>">Logout</a></li>
+ <?php } else { ?>
+ <li class="dropdown">
+ <a class="dropdown-toggle" href="#" data-toggle="dropdown">Login <b class="caret"></b></a>
+ <div class="dropdown-menu" style="padding: 15px;">
+ <?php echo form_open("user/login"); ?>
+ <input type="text" name="username" placeholder="Username" class="input-medium">
+ <input type="password" name="password" placeholder="Password" class="input-medium">
+ <button type="submit" name="process" class="btn btn-primary pull-right">Login</button>
+ </form>
+ </div>
+ </li>
+ <?php } ?>
+ </ul>
+ <?php }; ?>
+ <ul class="nav">
+ <?php if(isset($username) && $username) { ?>
+ <li><a href="<?php echo site_url("file/index") ?>"><i class="icon-pencil icon-white"></i> New</a></li>
+ <li><a href="<?php echo site_url("file/upload_history") ?>"><i class="icon-book icon-white"></i> History</a></li>
+ <li><a href="<?php echo site_url("user/invite") ?>"><i class="icon-plus icon-white"></i> Invite</a></li>
+ <?php } ?>
+ </ul>
+ </div>
+ </div>
+ </div>
+
+ <div class="container">
diff --git a/application/views/user/footer.php b/application/views/user/footer.php
deleted file mode 120000
index e3a4d3fca..000000000
--- a/application/views/user/footer.php
+++ /dev/null
@@ -1 +0,0 @@
-../file/footer.php \ No newline at end of file
diff --git a/application/views/user/header.php b/application/views/user/header.php
deleted file mode 120000
index 7b5e4d759..000000000
--- a/application/views/user/header.php
+++ /dev/null
@@ -1 +0,0 @@
-../file/header.php \ No newline at end of file
diff --git a/application/views/user/invite.php b/application/views/user/invite.php
index 5be8b48a3..eba77ead0 100644
--- a/application/views/user/invite.php
+++ b/application/views/user/invite.php
@@ -1,15 +1,37 @@
-<?php echo form_open('user/create_invitation_key'); ?>
- <input type="submit" value="Create new key" name="process" />
-</form>
+<div class="alert alert-block">
+ <p>
+ <b>Watch out!</b>
+ </p>
+ <p>
+ You are free to invite anyone you want to, but please keep in
+ mind that if this person violates the rules and is banned, your
+ account will also be disabled.
+ </p>
+</div>
-<p>
-You are free to invite anyone you want to, but please keep in
-mind that if this person violates the rules and is banned, your account will also be disabled.
-</p>
+<h2>Unused invitation keys</h2>
+<table class="table table-striped">
+ <thead>
+ <tr>
+ <th>#</th>
+ <th style="width: 70%;">Key</th>
+ <th>Created on</th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php $i = 1; ?>
+ <?php foreach($query as $key => $item): ?>
+ <tr>
+ <td><?php echo $i++; ?></td>
+ <td><?php echo anchor("user/register/".$item["key"], $item["key"]) ?></td>
+ <td><?php echo date("Y/m/d H:i", $item["date"]) ?></td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+</table>
-<p>Unused invitation keys:</p>
<p>
-<?php foreach($query as $key => $item): ?>
- <?php echo anchor("user/register/".$item["key"], $item["key"]); ?><br />
-<?php endforeach; ?>
+ <?php echo form_open('user/create_invitation_key'); ?>
+ <input class="btn btn-primary btn-large" type="submit" value="Create a new key" name="process" />
+ </form>
</p>
diff --git a/application/views/user/login.php b/application/views/user/login.php
index ca6f01b88..21264a404 100644
--- a/application/views/user/login.php
+++ b/application/views/user/login.php
@@ -1,7 +1,7 @@
<?php
-if (isset($login_error)) {
- echo '<font style="color: rgb(238, 51, 51);">The entered credentials are invalid.</font>';
-} ?>
+if (isset($login_error)) { ?>
+ <div class="alert alert-error">The entered credentials are invalid.</div>
+<?php } ?>
<?php echo form_open('user/login'); ?>
<table>
@@ -14,5 +14,5 @@ if (isset($login_error)) {
<td><input type="password" name="password" /></td>
</tr>
</table>
- <input type="submit" value="Login" name="process" />
+ <input type="submit" class="btn btn-primary" value="Login" name="process" />
</form>
diff --git a/application/views/user/register.php b/application/views/user/register.php
index 78af46e96..2b15175a3 100644
--- a/application/views/user/register.php
+++ b/application/views/user/register.php
@@ -7,10 +7,10 @@
<table>
<tr>
<td>Username</td>
- <td> <input type="text" name="username" value="<?=$values["username"]; ?>" /></td>
+ <td> <input type="text" name="username" value="<?php echo $values["username"]; ?>" /></td>
</tr><tr>
<td>Email</td>
- <td> <input type="text" name="email" value="<?=$values["email"]; ?>" /></td>
+ <td> <input type="text" name="email" value="<?php echo $values["email"]; ?>" /></td>
</tr><tr>
<td>Password</td>
<td> <input type="password" name="password" /></td>