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/file | |
parent | 50230001eb5387b6b0ff7ce906d074ef4a530d11 (diff) | |
parent | ab98249a9a087745b29e5cb258ea0b624f12f64b (diff) |
Merge branch 'working'
Diffstat (limited to 'application/views/file')
-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 |
6 files changed, 192 insertions, 170 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'; ?> |