diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/addBm.php | 11 | ||||
-rw-r--r-- | templates/bookmarklet.php | 8 | ||||
-rw-r--r-- | templates/part.nofeeds.php | 11 | ||||
-rw-r--r-- | templates/settings.php | 7 |
4 files changed, 34 insertions, 3 deletions
diff --git a/templates/addBm.php b/templates/addBm.php new file mode 100644 index 000000000..e9132ca57 --- /dev/null +++ b/templates/addBm.php @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Subsribe - News - ownCloud</title> + </head> + <body> + <div class="message"><h1>Saved!</h1></div> + <a href="javascript:self.close()" >Close the window</a> + </body> +</html>
\ No newline at end of file diff --git a/templates/bookmarklet.php b/templates/bookmarklet.php new file mode 100644 index 000000000..31a654b86 --- /dev/null +++ b/templates/bookmarklet.php @@ -0,0 +1,8 @@ +<?php + +function createBookmarklet() { + $l = OC_L10N::get('news'); + echo '<small>' . $l->t('Drag this to your browser bookmarks and click on it whenever you want to subscribe to a webpage quickly:') . '</small>' + . '<a class="button bookmarklet" href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OCP\Util::linkToAbsolute('bookmarks', 'addBm.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=230px,width=230px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">' + . $l->t('Subscribe') . '</a>'; +} diff --git a/templates/part.nofeeds.php b/templates/part.nofeeds.php index 3a9c14b14..c1e639321 100644 --- a/templates/part.nofeeds.php +++ b/templates/part.nofeeds.php @@ -2,7 +2,16 @@ <div id="firstrun"> <?php echo $l->t('You have no feeds in your reader.') ?> <div id="selections"> - <input type="button" id="addfeedbtn" value="<?php echo $l->t('Add feed') ?>" /> + <input type="button" id="addfeedbtn" value="<?php echo $l->t('Add feed') ?>" /><br /> <input type="button" id="importopmlbtn" value="<?php echo $l->t('Import OPML') ?>" /> </div> + <div> + <?php + require_once(OC_App::getAppPath('news') .'/templates/bookmarklet.php'); + echo $l->t('Or... '); + ?> + <div> + <?php createBookmarklet(); ?> + </div> + </div> </div>
\ No newline at end of file diff --git a/templates/settings.php b/templates/settings.php index 94b8fc2f6..b063fc1ed 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -7,7 +7,10 @@ <?php echo $l->t(' or '); ?><a href='#' class="settings" id="cloudlink"><?php echo $l->t('cloud');?></a>. </span> <input type="file" id="file_upload_start" name="files[]" /> - <input style="float: right" id="importbtn" type="submit" value="<?php echo $l->t('Import');?>" /></dd> + <input style="float: right" id="importbtn" type="submit" value="<?php echo $l->t('Import');?>" /> + </dd> <dt><?php echo $l->t('Export feeds'); ?></dt> - <dd></dd> + <dd> + <button id="exportbtn" title="<?php echo $l->t('Download OPML'); ?>">Download OPML</button> + </dd> </dl>
\ No newline at end of file |