diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-09-25 15:03:59 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-09-25 15:03:59 +0200 |
commit | 6705e6c987b6e4a43bbb666c33d8fc8a0ef1a0a6 (patch) | |
tree | b815871f7f031633c400a33cf5d6245282d59955 /application/views | |
parent | 50230001eb5387b6b0ff7ce906d074ef4a530d11 (diff) | |
parent | ab98249a9a087745b29e5cb258ea0b624f12f64b (diff) |
Merge branch 'working'
Diffstat (limited to 'application/views')
-rw-r--r-- | application/views/file/file_info.php | 54 | ||||
-rw-r--r-- | application/views/file/html_header.php | 170 | ||||
-rw-r--r-- | application/views/file/nav_history.php | 2 | ||||
-rw-r--r-- | application/views/file/upload_form.php | 88 | ||||
-rw-r--r-- | application/views/file/upload_history.php | 46 | ||||
-rw-r--r-- | application/views/file/upload_history_thumbnails.php | 2 | ||||
-rw-r--r-- | application/views/footer.php | 9 | ||||
-rw-r--r-- | application/views/header.php | 48 | ||||
-rw-r--r--[-rwxr-xr-x] | application/views/index.html | 0 | ||||
-rw-r--r-- | application/views/user/apikeys.php | 62 | ||||
-rw-r--r-- | application/views/user/hash_password.php | 29 | ||||
-rw-r--r-- | application/views/user/invite.php | 38 | ||||
-rw-r--r-- | application/views/user/login.php | 14 | ||||
-rw-r--r-- | application/views/user/nav.php | 8 | ||||
-rw-r--r-- | application/views/user/profile.php | 42 | ||||
-rw-r--r-- | application/views/user/register.php | 50 | ||||
-rw-r--r-- | application/views/user/reset_password_form.php | 30 | ||||
-rw-r--r-- | application/views/user/reset_password_username_form.php | 18 |
18 files changed, 392 insertions, 318 deletions
diff --git a/application/views/file/file_info.php b/application/views/file/file_info.php index 82a3e4f81..6c2772a21 100644 --- a/application/views/file/file_info.php +++ b/application/views/file/file_info.php @@ -1,30 +1,32 @@ <div class="center"> <?php if($filedata): ?> - <table style="margin: auto"> - <tr> - <td class="title">ID</td> - <td class="text"><a href="<?php echo site_url($id); ?>/"><?php echo $id; ?></a></td> - </tr> - <tr> - <td class="title">Filename</td> - <td class="text"><?php echo htmlspecialchars($filedata["filename"]); ?></td> - </tr> - <tr> - <td class="title">Date of upload</td> - <td class="text"><?php echo date("r", $filedata["date"]); ?></td> - </tr> - <tr> - <td class="title">Date of removal</td> - <td class="text"><?php echo $timeout; ?></td> - </tr> - <tr> - <td class="title">Size</td> - <td class="text"><?php echo format_bytes($filedata["filesize"]); ?></td> - </tr> - <tr> - <td class="title">Mimetype</td> - <td class="text"><?php echo $filedata["mimetype"]; ?></td> - </tr> - </table> + <div class="table-responive"> + <table class="table" style="margin: auto"> + <tr> + <td class="title">ID</td> + <td class="text"><a href="<?php echo site_url($id); ?>/"><?php echo $id; ?></a></td> + </tr> + <tr> + <td class="title">Filename</td> + <td class="text"><?php echo htmlspecialchars($filedata["filename"]); ?></td> + </tr> + <tr> + <td class="title">Date of upload</td> + <td class="text"><?php echo date("r", $filedata["date"]); ?></td> + </tr> + <tr> + <td class="title">Date of removal</td> + <td class="text"><?php echo $timeout; ?></td> + </tr> + <tr> + <td class="title">Size</td> + <td class="text"><?php echo format_bytes($filedata["filesize"]); ?></td> + </tr> + <tr> + <td class="title">Mimetype</td> + <td class="text"><?php echo $filedata["mimetype"]; ?></td> + </tr> + </table> + </div> <?php endif; ?> </div> diff --git a/application/views/file/html_header.php b/application/views/file/html_header.php index c40c35bca..2c556720c 100644 --- a/application/views/file/html_header.php +++ b/application/views/file/html_header.php @@ -2,93 +2,95 @@ $force_full_html = true; include(FCPATH."application/views/header.php"); ?> - </div> +</div> - <script type="text/javascript"> - /* <![CDATA[ */ - window.lexers = <?php echo json_encode($lexers); ?>; - window.paste_base = '<?php echo site_url($id) ?>'; - /* ]]> */ - </script> +<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 } ?> +<?php if (isset($error_message)) { ?> +<div class="alert alert-danger" style="text-align: center; border-radius: 0;"> + <?php echo $error_message; ?> +</div> +<?php } ?> - <div class="container paste-container"> - <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 htmlspecialchars($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">×</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"> - <?php echo form_open("file/do_delete/", array("style" => "display: inline")); ?> - <input type="hidden" name="ids[<?php echo $id; ?>]" value="<?php echo $id; ?>"> - <button class="btn btn-danger pull-left" aria-hidden="true">Delete</button> - </form> - <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> - </div> - </div> - </li> - <li class="divider-vertical"></li> - <li><a href="<?php echo site_url('file/index?repaste='.$id); ?>" role="button">Repaste</a></li> - </ul> - <div class="btn-group pull-right" style="margin-top: 7px; margin-right:-10px;"> - <a id="linewrap" class="btn btn-small" rel="tooltip" title="Toggle wrapping of long lines">Linewrap</a> - <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 class="container paste-container"> + <div style="border:1px solid #ccc;"> + <div class="navbar navbar-default navbar-static-top navbar-paste"> + <ul class="nav navbar-nav navbar-left dont-float"> + <li><a href="#file-info" class="navbar-brand" data-toggle="modal"><?php echo $title ?></a></li> + <li class="divider"></li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="language-toggle"> + Language: <?php echo htmlspecialchars($current_highlight); ?> + <b class="caret"></b> + </a> + <div class="dropdown-menu" style="padding: 15px;"> + <form> + <input type="text" id="language" placeholder="Language" class="form-control"> + </form> + </div> + </li> + <li class="divider"></li> + <li> + <a href="#file-info" role="button" data-toggle="modal">Info</a> + </li> + <li class="divider"></li> + <li><a href="<?php echo site_url('file/index?repaste='.$id); ?>" role="button">Repaste</a></li> + </ul> + <div class="btn-group navbar-right" style="margin: 8px;"> + <a id="linewrap" class="btn btn-default" rel="tooltip" title="Toggle wrapping of long lines">Linewrap</a> + <a href="<?php echo site_url($id."/plain") ?>" class="btn btn-default" rel="tooltip" title="View as plain text">Plain</a> + <a href="<?php echo site_url($id) ?>" class="btn btn-default" 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-default" rel="tooltip" title="Render as Code">Code</a> + <?php } else { ?> + <a href="<?php echo site_url($id."/rmd") ?>" class="btn btn-default" rel="tooltip" title="Render as Markdown">Markdown</a> + <?php } ?> + </div> + </div> <!-- .navbar --> + <div id="file-info" class="modal fade" role="dialog" aria-labelledby="file-info" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal">×</button> + <h3 class="modal-title">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"> + <?php echo form_open("file/do_delete/", array("style" => "display: inline")); ?> + <input type="hidden" name="ids[<?php echo $id; ?>]" value="<?php echo $id; ?>"> + <button class="btn btn-danger pull-left" aria-hidden="true">Delete</button> + </form> + <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button> </div> </div> </div> - <div> + </div> <!-- .modal --> + <div> diff --git a/application/views/file/nav_history.php b/application/views/file/nav_history.php index 1a3e55c0b..bbb695fd6 100644 --- a/application/views/file/nav_history.php +++ b/application/views/file/nav_history.php @@ -1,4 +1,4 @@ -<ul class="nav nav-tabs"> +<ul class="nav nav-tabs nav-history"> <?php $nav = array( "List" => "file/upload_history", diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php index 21a2cc4e6..6fdc01cb9 100644 --- a/application/views/file/upload_form.php +++ b/application/views/file/upload_form.php @@ -1,39 +1,55 @@ -<?php if (user_logged_in()) { ?> -<div class="well"> - <div class="row-fluid"> - <div class="span12 text-upload-form"> +<?php if (isset($user_logged_in) && $user_logged_in) { ?> +<div class="row"> + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-upload-form"> <?php echo form_open_multipart('file/do_paste'); ?> - <h2>Text paste</h2> - <textarea name="content" class="text-upload span12"><?php - if (isset($textarea_content)) { - echo $textarea_content; - } - ?></textarea><br> - <button type="submit" class="btn btn-primary">Paste it!</button> + <div class="panel panel-default"> + <div class="panel-heading"> + <h3 class="panel-title">Text paste</h3> + </div> + <div class="panel-body"> + <textarea name="content" class="form-control text-upload"> + <?php if (isset($textarea_content)) { + echo $textarea_content; + } ?> + </textarea><br> + <button type="submit" class="btn btn-primary">Paste it!</button> + </div> </form> </div> </div> - <div class="row-fluid"> - <div class="span6"> - <?php echo form_open_multipart('file/do_upload'); ?> - <h2>File upload</h2> +</div> +<div class="row"> + <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12"> + <?php echo form_open_multipart('file/do_upload'); ?> + <div class="panel panel-default"> + <div class="panel-heading"> + <h3 class="panel-title">File upload</h3> + </div> + <div class="panel-body"> <input class="file-upload" type="file" name="file[]" multiple="multiple"><br> <button type="submit" id="upload_button" class="btn btn-primary">Upload it!</button> - </form> + </div> </div> - <div class="span6 alert alert-block alert-info"> - <h4 class="alert-heading">Notice!</h4> - <p> - Uploads/pastes are <?php if ($upload_max_age > 0) { - echo "deleted after ".$upload_max_age." days"; - if ($small_upload_size > 0) { - echo " unless they are smaller than ".format_bytes($small_upload_size); - } - } else { - echo "stored forever"; - } ?>. Maximum upload size is <?php echo format_bytes($max_upload_size); ?>. - You can upload a maximum of <?php echo ini_get("max_file_uploads"); ?> files at once. - </p> + </form> + </div> + <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12"> + <div class="panel panel-info"> + <div class="panel-heading"> + <h3 class="panel-title">Notice!</h3> + </div> + <div class="panel-body"> + <p> + Uploads/pastes are <?php if ($upload_max_age > 0) { + echo "deleted after ".$upload_max_age." days"; + if ($small_upload_size > 0) { + echo " unless they are smaller than ".format_bytes($small_upload_size); + } + } else { + echo "stored forever"; + } ?>. Maximum upload size is <?php echo format_bytes($max_upload_size); ?>. + You can upload a maximum of <?php echo ini_get("max_file_uploads"); ?> files at once. + </p> + </div> </div> </div> </div> @@ -45,17 +61,17 @@ </script> <?php } else { ?> - <?php echo form_open('user/login'); ?> - <input type="text" name="username" placeholder="Username" autofocus /> - <input type="password" name="password" placeholder="Password" /> - <input type="submit" class="btn btn-primary" value="Login" name="process" style="margin-bottom: 9px" /> + <?php echo form_open('user/login', array('class' => 'form-inline')); ?> + <input type="text" name="username" placeholder="Username" autofocus class="form-control inline-input"/> + <input type="password" name="password" placeholder="Password" class="form-control inline-input"/> + <input type="submit" class="btn btn-primary" value="Login" name="process" /> <?php if(auth_driver_function_implemented("can_reset_password")) { ?> - <p style="display: inline"><?php echo anchor("user/reset_password", "Forgot your password?"); ?></p> + <p class="help-block"><?php echo anchor("user/reset_password", "Forgot your password?"); ?></p> <?php } ?> </form> <?php } ?> <div class="row"> - <div class="span6"> + <div class="col-lg-6"> <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> @@ -72,7 +88,7 @@ </dl> <p>If your upload is not detected as text, only <b>/<ID>/qr</b>, <b>/<ID>/plain</b> and <b>/<ID>/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="col-lg-6"> <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> <?php if(auth_driver_function_implemented("can_register_new_users")) { ?> diff --git a/application/views/file/upload_history.php b/application/views/file/upload_history.php index 344afc28a..634ad5935 100644 --- a/application/views/file/upload_history.php +++ b/application/views/file/upload_history.php @@ -1,30 +1,32 @@ <?php register_js_include("/data/js/jquery.tablesorter.min.js"); ?> <?php include 'nav_history.php'; ?> <?php echo form_open("file/do_delete") ?> - <table id="upload_history" class="table table-striped tablesorter"> - <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>Size</th> - </tr> - </thead> - <tbody> - <?php foreach($query as $key => $item): ?> + <div class="table-responsive"> + <table id="upload_history" class="table table-striped tablesorter"> + <thead> <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 class="wrap"><?php echo htmlspecialchars($item["filename"]); ?></td> - <td><?php echo $item["mimetype"] ?></td> - <td class="nowrap"><?php echo date("r", $item["date"]); ?><span class="hidden">t=<?php echo $item["date"]; ?></span></td> - <td><?php echo $item["filesize"] ?></td> + <th><input type="checkbox" name="all-ids" id="history-all"></th> + <th>ID</th> + <th>Filename</th> + <th>Mimetype + <th>Date</th> + <th>Size</th> </tr> - <?php endforeach; ?> - </tbody> - </table> + </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 class="wrap"><?php echo htmlspecialchars($item["filename"]); ?></td> + <td><?php echo $item["mimetype"] ?></td> + <td class="nowrap"><?php echo date("r", $item["date"]); ?><span class="hidden">t=<?php echo $item["date"]; ?></span></td> + <td><?php echo $item["filesize"] ?></td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + </div> <input class="btn btn-danger" type="submit" value="Delete checked" name="process"> </form> diff --git a/application/views/file/upload_history_thumbnails.php b/application/views/file/upload_history_thumbnails.php index f21ffcb23..bcafc44ca 100644 --- a/application/views/file/upload_history_thumbnails.php +++ b/application/views/file/upload_history_thumbnails.php @@ -2,7 +2,7 @@ <?php echo form_open("file/do_delete/", array("id" => "delete_form", "style" => "display: inline")); ?> <button class="btn btn-danger" id="delete_button" style="display: none">Delete selected</button> </form> - <button class="btn" id="toggle_delete_mode" style="display: inline">Delete mode</button> + <button class="btn btn-default" id="toggle_delete_mode" style="display: inline">Delete mode</button> </div> <?php include 'nav_history.php'; ?> diff --git a/application/views/footer.php b/application/views/footer.php index 0383e195e..e748cd4e3 100644 --- a/application/views/footer.php +++ b/application/views/footer.php @@ -17,9 +17,16 @@ if (is_cli_client() && !isset($force_full_html)) { </ul> </div> </footer> + +<?php +$CI = &get_instance(); +if ($CI->config->item("environment") == "development" && property_exists($CI, "email")) { + echo $CI->email->print_debugger(); +} +?> <?php echo include_js("/data/js/jquery-2.0.3.min.js"); ?> <?php echo include_js("/data/js/jquery-ui-1.10.3.custom.min.js"); ?> -<?php echo include_js("/data/js/bootstrap-2.3.2.min.js"); ?> +<?php echo include_js("/data/js/bootstrap.min.js"); ?> <?php echo include_js("/data/js/script.js"); ?> <?php echo include_registered_js(); ?> </body> diff --git a/application/views/header.php b/application/views/header.php index ba6d6ae9d..75f51664a 100644 --- a/application/views/header.php +++ b/application/views/header.php @@ -14,7 +14,7 @@ if (is_cli_client() && !isset($force_full_html)) { <meta name="author" content=""> <link href="<?php echo link_with_mtime("/data/css/ui-lightness/jquery-ui-1.10.3.custom.min.css"); ?>" rel="stylesheet"> - <link href="<?php echo link_with_mtime("/data/css/bootstrap-2.3.2.min.css"); ?>" rel="stylesheet"> + <link href="<?php echo link_with_mtime("/data/css/bootstrap.min.css"); ?>" rel="stylesheet"> <link href="<?php echo link_with_mtime("/data/css/style.css"); ?>" rel="stylesheet"> <?php if (file_exists(FCPATH."data/local/style.css")) { @@ -32,10 +32,16 @@ if (is_cli_client() && !isset($force_full_html)) { <?php if (file_exists(FCPATH."data/local/header.inc.php")) { include FCPATH."data/local/header.inc.php"; }?> - <div class="navbar navbar-fixed-top navbar-inverse"> - <div class="navbar-inner"> - <div class="container"> - <a class="brand" href="<?php echo site_url(); ?>"><?php + <nav class="navbar navbar-fixed-top navbar-inverse" role="navigation"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="<?php echo site_url(); ?>"><?php if (file_exists(FCPATH."data/local/logo.svg")) { echo '<img src="'.link_with_mtime("/data/local/logo.svg").'" style="height: 20px"> FileBin'; } else { @@ -43,34 +49,36 @@ if (is_cli_client() && !isset($force_full_html)) { } ?> </a> + </div> + <div class="collapse navbar-collapse navbar-ex1-collapse"> <?php if(!isset($GLOBALS["is_error_page"])) { ?> - <ul class="nav pull-right"> - <?php if(user_logged_in()) { ?> - <li><a href="<?php echo site_url("/user/logout"); ?>">Logout</a></li> + <ul class="nav navbar-nav navbar-right"> + <?php if (isset($user_logged_in) && $user_logged_in) { ?> + <li><a class="navbar-link" 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;"> + <div class="dropdown-menu" style="padding: 5px;"> <?php if(auth_driver_function_implemented("can_reset_password")) { ?> <p><?php echo anchor("user/reset_password", "Forgot your password?"); ?></p> <?php } ?> - <?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> + <?php echo form_open("user/login", array("class" => "form-signin")); ?> + <input type="text" name="username" placeholder="Username" class="form-control"> + <input type="password" name="password" placeholder="Password" class="form-control"> + <button type="submit" name="process" class="btn btn-default btn-block">Login</button> </form> </div> </li> <?php } ?> </ul> <?php }; ?> - <ul class="nav"> - <?php if(user_logged_in()) { ?> - <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> + <ul class="nav navbar-nav"> + <?php if (isset($user_logged_in) && $user_logged_in) { ?> + <li><a href="<?php echo site_url("file/index") ?>"><span class="glyphicon glyphicon-pencil"></span> New</a></li> + <li><a href="<?php echo site_url("file/upload_history") ?>"><span class="glyphicon glyphicon-book"></span> History</a></li> <li class="dropdown"> <a href="<?php echo site_url("user/index"); ?>" class="dropdown-toggle" data-toggle="dropdown"> - <i class="icon-user icon-white"></i> Account <b class="caret"></b> + <span class="glyphicon glyphicon-user"></span> Account <b class="caret"></b> </a> <ul class="dropdown-menu"> <?php include "user/nav.php"; ?> @@ -80,14 +88,14 @@ if (is_cli_client() && !isset($force_full_html)) { </ul> </div> </div> - </div> + </nav> <div id="navbar-height"></div> <div class="container"> <?php if (isset($alerts)) { foreach ($alerts as $alert) { ?> - <div class="alert alert-block alert-<?php echo $alert["type"]; ?>" style="text-align: center"> + <div class="alert alert-dismissable alert-<?php echo $alert["type"]; ?>" style="text-align: center"> <button type="button" class="close" data-dismiss="alert">×</button> <?php echo $alert["message"]; ?> </div> diff --git a/application/views/index.html b/application/views/index.html index c942a79ce..c942a79ce 100755..100644 --- a/application/views/index.html +++ b/application/views/index.html diff --git a/application/views/user/apikeys.php b/application/views/user/apikeys.php index aa268d678..872eb9ef0 100644 --- a/application/views/user/apikeys.php +++ b/application/views/user/apikeys.php @@ -1,36 +1,38 @@ <h2>API keys</h2> -<table class="table table-striped"> - <thead> - <tr> - <th>#</th> - <th>Key</th> - <th style="width: 30%;">Comment</th> - <th>Created on</th> - <th></th> - </tr> - </thead> - <tbody> - <?php $i = 1; ?> - <?php foreach($query as $key => $item): ?> +<div class="table-responsive"> + <table class="table table-striped"> + <thead> <tr> - <td><?php echo $i++; ?></td> - <td><?php echo $item["key"]; ?></td> - <td><?php echo htmlentities($item["comment"]); ?></td> - <td><?php echo date("Y/m/d H:i", $item["created"]); ?></td> - <td> - <?php echo form_open("user/delete_apikey", array("style" => "margin-bottom: 0")); ?> - <?php echo form_hidden("key", $item["key"]); ?> - <button class="btn btn-danger btn-mini" type="submit">Delete</input> - </form> - </td> + <th>#</th> + <th>Key</th> + <th style="width: 30%;">Comment</th> + <th>Created on</th> + <th></th> </tr> - <?php endforeach; ?> - </tbody> -</table> + </thead> + <tbody> + <?php $i = 1; ?> + <?php foreach($query as $key => $item): ?> + <tr> + <td><?php echo $i++; ?></td> + <td><?php echo $item["key"]; ?></td> + <td><?php echo htmlentities($item["comment"]); ?></td> + <td><?php echo date("Y/m/d H:i", $item["created"]); ?></td> + <td> + <?php echo form_open("user/delete_apikey", array("style" => "margin-bottom: 0")); ?> + <?php echo form_hidden("key", $item["key"]); ?> + <button class="btn btn-danger btn-xs" type="submit">Delete</input> + </form> + </td> + </tr> + <?php endforeach; ?> + </tbody> + </table> +</div> <p> - <?php echo form_open('user/create_apikey', array("class" => "form-horizontal")); ?> - <input type="text" name="comment" placeholder="Comment" /> - <input class="btn btn-primary" type="submit" value="Create a new key" name="process" /> - </form> + <?php echo form_open('user/create_apikey', array("class" => "form-inline")); ?> + <input type="text" name="comment" placeholder="Comment" class="form-control" style="width: 200px;"/> + <input class="btn btn-primary" type="submit" value="Create a new key" name="process" /> +</form> </p> diff --git a/application/views/user/hash_password.php b/application/views/user/hash_password.php index d85d2810c..98bef9df5 100644 --- a/application/views/user/hash_password.php +++ b/application/views/user/hash_password.php @@ -1,6 +1,6 @@ <?php if (!empty($error)) { - echo "<p class='alert alert-error'>"; + echo "<p class='alert alert-danger'>"; echo implode("<br />\n", $error); echo "</p>"; } @@ -9,23 +9,28 @@ if ($hash) { echo "<p>Result (this hash uses a random salt, so it will be different each time you submit this form):<br />$hash</p>\n"; } ?> -<?php echo form_open('user/hash_password', array("class" => "form-horizontal")); ?> - <div class="control-group"> - <label class="control-label" for="inputPassword">Password</label> - <div class="controls"> - <input type="password" id="inputPassword" name="password" placeholder="Password"> +<?php echo form_open('user/hash_password'); ?> +<div class="row"> + <div class="form-group col-lg-10 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPassword" name="password" placeholder="Password" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <label class="control-label" for="inputPassword">Confirm password</label> - <div class="controls"> - <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation"> +<div class="row"> + <div class="form-group col-lg-10 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Confirm password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <div class="controls"> +<div class="row"> + <div class="form-group col-lg-10 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> <button type="submit" class="btn btn-primary" name="process">Hash it</button> </div> </div> diff --git a/application/views/user/invite.php b/application/views/user/invite.php index eba77ead0..d3e2fb7a6 100644 --- a/application/views/user/invite.php +++ b/application/views/user/invite.php @@ -1,4 +1,4 @@ -<div class="alert alert-block"> +<div class="alert alert-warning"> <p> <b>Watch out!</b> </p> @@ -10,25 +10,27 @@ </div> <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): ?> +<div class="table-responsive"> + <table class="table table-striped"> + <thead> <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> + <th>#</th> + <th style="width: 70%;">Key</th> + <th>Created on</th> </tr> - <?php endforeach; ?> - </tbody> -</table> + </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> +</div> <p> <?php echo form_open('user/create_invitation_key'); ?> diff --git a/application/views/user/login.php b/application/views/user/login.php index 761965c94..3e30d53bd 100644 --- a/application/views/user/login.php +++ b/application/views/user/login.php @@ -1,24 +1,24 @@ <?php if (isset($login_error)) { ?> - <div class="alert alert-error">The entered credentials are invalid.</div> + <div class="alert alert-danger">The entered credentials are invalid.</div> <?php } ?> -<?php echo form_open('user/login', array("class" => "form-horizontal")); ?> - <div class="control-group"> +<?php echo form_open('user/login', array("class" => "form-horizontal login-page")); ?> + <div class="form-group"> <label class="control-label" for="inputUsername">Username</label> <div class="controls"> - <input type="text" id="inputUsername" name="username" placeholder="Username"> + <input type="text" id="inputUsername" name="username" placeholder="Username" class="form-control"> </div> </div> - <div class="control-group"> + <div class="form-group"> <label class="control-label" for="inputPassword">Password</label> <div class="controls"> - <input type="password" id="inputPassword" name="password" placeholder="Password"> + <input type="password" id="inputPassword" name="password" placeholder="Password" class="form-control"> </div> </div> - <div class="control-group"> + <div class="form-group"> <div class="controls"> <button type="submit" class="btn btn-primary" name="process">Login</button> </div> diff --git a/application/views/user/nav.php b/application/views/user/nav.php index 90f76e05e..49c7aa988 100644 --- a/application/views/user/nav.php +++ b/application/views/user/nav.php @@ -1,11 +1,11 @@ <?php if(auth_driver_function_implemented("can_register_new_users")) { ?> -<li><a href="<?php echo site_url("user/invite") ?>"><i class="icon-plus icon-black"></i> Invite</a></li> +<li><a href="<?php echo site_url("user/invite") ?>"><span class="glyphicon glyphicon-plus"></span> Invite</a></li> <?php } ?> -<li><a href="<?php echo site_url("user/profile") ?>"><i class="icon-user icon-black"></i> Profile</a></li> -<li><a href="<?php echo site_url("user/apikeys") ?>"><i class="icon-tags icon-black"></i> API keys</a></li> +<li><a href="<?php echo site_url("user/profile") ?>"><span class="glyphicon glyphicon-user"></span> Profile</a></li> +<li><a href="<?php echo site_url("user/apikeys") ?>"><span class="glyphicon glyphicon-tags"></span> API keys</a></li> <?php if(auth_driver_function_implemented("can_reset_password")) { ?> -<li><a href="<?php echo site_url("user/reset_password") ?>"><i class="icon-lock icon-black"></i> Change password</a></li> +<li><a href="<?php echo site_url("user/reset_password") ?>"><span class="glyphicon glyphicon-lock"></span> Change password</a></li> <?php } ?> diff --git a/application/views/user/profile.php b/application/views/user/profile.php index bcd740612..74d786d3f 100644 --- a/application/views/user/profile.php +++ b/application/views/user/profile.php @@ -1,32 +1,40 @@ -<?php echo form_open("user/profile", array("class" => "form-horizontal")); ?> +<?php echo form_open("user/profile"); ?> - <div class="control-group"> - <label class="control-label" for="inputUsername">Username</label> - <div class="controls"> - <input type="text" id="inputUsername" name="username" placeholder="Username" disabled="disabled" value="<?php echo $profile_data["username"]; ?>"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputUsername">Username</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputUsername" name="username" placeholder="Username" disabled="disabled" value="<?php echo $profile_data["username"]; ?>" class="form-control"> </div> </div> +</div> - <?php if(auth_driver_function_implemented("get_email")) { ?> - <div class="control-group"> - <label class="control-label" for="inputEmail">Email</label> - <div class="controls"> - <input type="text" id="inputEmail" name="email" placeholder="Email" disabled="disabled" value="<?php echo $profile_data["email"]; ?>"> +<?php if($profile_data["email"] !== null) { ?> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputEmail">Email</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputEmail" name="email" placeholder="Email" disabled="disabled" value="<?php echo $profile_data["email"]; ?>" class="form-control"> </div> </div> - <?php } ?> +</div> +<?php } ?> - <div class="control-group"> - <label class="control-label" for="inputUploadIDLimits">Upload ID length limits</label> - <div class="controls"> - <input type="text" id="inputUploadIDLimits" name="upload_id_limits" placeholder="number-number" value="<?php echo $profile_data["upload_id_limits"]; ?>"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputUploadIDLimits">Upload ID length limits</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputUploadIDLimits" name="upload_id_limits" placeholder="number-number" value="<?php echo $profile_data["upload_id_limits"]; ?>" class="form-control"> <span class="help-block">Values have to be between 3 and 64 inclusive. Please remember that longer IDs don't protect your pastes from being found if you post the link somewhere a search enginge can see it.</span> </div> </div> +</div> - <div class="control-group"> - <div class="controls"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> <button type="submit" class="btn btn-primary" name="process">Save changes</button> </div> </div> +</div> </form> diff --git a/application/views/user/register.php b/application/views/user/register.php index c0050508b..af4558ff9 100644 --- a/application/views/user/register.php +++ b/application/views/user/register.php @@ -1,41 +1,51 @@ <?php if (!empty($error)) { - echo "<p class='alert alert-error'>"; + echo "<p class='alert alert-danger'>"; echo implode("<br />\n", $error); echo "</p>"; } ?> -<?php echo form_open('user/register/'.$key, array("class" => "form-horizontal")); ?> - <div class="control-group"> - <label class="control-label" for="inputUsername">Username</label> - <div class="controls"> - <input type="text" id="inputUsername" name="username" placeholder="Username" value="<?php echo $values["username"]; ?>"> +<?php echo form_open('user/register/'.$key); ?> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputUsername">Username</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputUsername" name="username" placeholder="Username" value="<?php echo $values["username"]; ?>" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <label class="control-label" for="inputEmail">Email</label> - <div class="controls"> - <input type="text" id="inputEmail" name="email" placeholder="Email" value="<?php echo $values["email"]; ?>"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputEmail">Email</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputEmail" name="email" placeholder="Email" value="<?php echo $values["email"]; ?>" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <label class="control-label" for="inputPassword">Password</label> - <div class="controls"> - <input type="password" id="inputPassword" name="password" placeholder="Password"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPassword" name="password" placeholder="Password" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <label class="control-label" for="inputPassword">Confirm password</label> - <div class="controls"> - <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Confirm password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <div class="controls"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> <button type="submit" class="btn btn-primary" name="process">Register</button> </div> </div> +</div> </form> diff --git a/application/views/user/reset_password_form.php b/application/views/user/reset_password_form.php index b93ad1370..9c8253189 100644 --- a/application/views/user/reset_password_form.php +++ b/application/views/user/reset_password_form.php @@ -1,27 +1,33 @@ <?php if (!empty($error)) { - echo "<p class='alert alert-error'>"; + echo "<p class='alert alert-danger'>"; echo implode("<br />\n", $error); echo "</p>"; } ?> -<?php echo form_open('user/reset_password/'.$key, array("class" => "form-horizontal")); ?> - <div class="control-group"> - <label class="control-label" for="inputPassword">Password</label> - <div class="controls"> - <input type="password" id="inputPassword" name="password" placeholder="Password"> +<?php echo form_open('user/reset_password/'.$key); ?> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPassword" name="password" placeholder="Password" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <label class="control-label" for="inputPassword">Confirm password</label> - <div class="controls"> - <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputPassword">Confirm password</label> + <div class="col-lg-5 col-md-5"> + <input type="password" id="inputPasswordConfirm" name="password_confirm" placeholder="Password confirmation" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <div class="controls"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> <button type="submit" class="btn btn-primary" name="process">Change password</button> </div> </div> +</div> </form> diff --git a/application/views/user/reset_password_username_form.php b/application/views/user/reset_password_username_form.php index 674a6441d..713cd4919 100644 --- a/application/views/user/reset_password_username_form.php +++ b/application/views/user/reset_password_username_form.php @@ -1,15 +1,19 @@ -<?php echo form_open('user/reset_password', array("class" => "form-horizontal")); ?> - <div class="control-group"> - <label class="control-label" for="inputUsername">Username</label> - <div class="controls"> - <input type="text" id="inputUsername" name="username" placeholder="Username" value="<?php echo isset($username) ? $username : ""; ?>"> +<?php echo form_open('user/reset_password'); ?> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <label class="control-label col-lg-2 col-md-2" for="inputUsername">Username</label> + <div class="col-lg-5 col-md-5"> + <input type="text" id="inputUsername" name="username" placeholder="Username" value="<?php echo isset($username) ? $username : ""; ?>" class="form-control"> </div> </div> +</div> - <div class="control-group"> - <div class="controls"> +<div class="row"> + <div class="form-group col-lg-8 col-md-10"> + <div class="col-lg-offset-2 col-lg-5 col-md-offset-2 col-md-5"> <button type="submit" class="btn btn-primary" name="process">Send mail</button> </div> </div> +</div> </form> |