1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2024-11-29 04:24:11 +01:00
OwncloudBookmarksOfficial/templates/addBookmarklet.php
ganomi ae81b9dcd2 This is a refactored / rewritten version of the bookmarks app using the app frameworks design and controller features.
Dependency Injection for user and db is used througout the controllers
The Routing features a consistent rest api
The Routing provides some legacy routes, so that for exampe the Android Bookmarks App still works.

There is a publicly available api that provides access to bookmarks per user.
(This is usefull in connection with the WP Plugin https://github.com/mario-nolte/oc2wp-bookmarks)
2014-11-26 12:24:18 +01:00

59 lines
2.1 KiB
PHP

<?php
OCP\Util::addscript('bookmarks', 'bookmarklet');
OCP\Util::addStyle('bookmarks', 'bookmarks');
$bookmarkExists = $_['bookmarkExists'];
?>
<div id="bookmarklet_form">
<form class="addBm" action="">
<script type="text/javascript" src="tag"></script>
<h1 style="display: block; float: left"><?php p($l->t('Add a bookmark')); ?></h1>
<span style="display: inline; float: right"><div id="add_form_loading" style="margin: 3px;"><img src="<?php print_unescaped(OCP\image_path("bookmarks", "loading.gif")); ?>"> </div></span>
<div style="color: red; clear: both; visibility: <?php
if ($bookmarkExists == false) {
print_unescaped('hidden');
}
?>">
<strong>
<?php p($l->t('This URL is already bookmarked! Overwrite?')); ?>
</strong>
</div>
<fieldset class="bm_desc">
<ul>
<li>
<input id="title" type="text" name="title" class="title" value="<?php p($_['title']); ?>"
placeholder="<?php p($l->t('The title of the page')); ?>" />
</li>
<li>
<input id="url" type="text" name="url" class="url_input" value="<?php p($_['url']); ?>"
placeholder="<?php p($l->t('The address of the page')); ?>" />
</li>
<li>
<ul class="tags" >
<?php foreach ($_['bookmark']['tags'] as $tag): ?>
<li><?php p($tag); ?></li>
<?php endforeach; ?>
</ul>
</li>
<li>
<textarea id="description" name="description" class="desc"
placeholder="<?php p($l->t('Description of the page')); ?>"><?php p($_['description']); ?></textarea>
</li>
<li>
<input type="submit" class="submit" value="<?php p($l->t("Save")); ?>" />
<input type="hidden" class="record_id" value="" name="record_id" />
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>">
</li>
</ul>
</fieldset>
</form>
</div>