diff options
| author | 2017-12-17 20:28:04 +0100 | |
|---|---|---|
| committer | 2017-12-17 20:28:04 +0100 | |
| commit | 60f56539c3f30fd3f7ba4f2a3570f7029ac93e5f (patch) | |
| tree | 1e78bfac7042dceb63898e2215db8fb0c1d7745d /app/views | |
| parent | ceda55c75b158fc1cf4813fe0f258527754b9289 (diff) | |
| parent | 0b1516af91792f86868689392f72ad4b6e32cdcf (diff) | |
Merge pull request #1720 from FreshRSS/dev
FreshRSS 1.9.0
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/sharing.phtml | 6 | ||||
| -rw-r--r-- | app/views/configure/system.phtml | 2 | ||||
| -rw-r--r-- | app/views/extension/index.phtml | 37 | ||||
| -rw-r--r-- | app/views/helpers/index/normal/entry_bottom.phtml | 9 | ||||
| -rw-r--r-- | app/views/subscription/bookmarklet.phtml | 4 | ||||
| -rw-r--r-- | app/views/update/index.phtml | 16 | ||||
| -rw-r--r-- | app/views/user/profile.phtml | 2 |
7 files changed, 69 insertions, 7 deletions
diff --git a/app/views/configure/sharing.phtml b/app/views/configure/sharing.phtml index ffcfb8b29..b0e6618fa 100644 --- a/app/views/configure/sharing.phtml +++ b/app/views/configure/sharing.phtml @@ -9,6 +9,8 @@ <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" /></div></div>' data-advanced='<div class="form-group" id="group-share-##key##"><label class="group-name">##label##</label><div class="group-controls"> <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" /> + <input type="hidden" id="share_##key##_method" name="share[##key##][method]" value="##method##" /> + <input type="hidden" id="share_##key##_field" name="share[##key##][field]" value="##field##" /> <div class="stick"> <input type="text" id="share_##key##_name" name="share[##key##][name]" class="extend" value="" placeholder="<?php echo _t('conf.sharing.share_name'); ?>" size="64" /> <input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?php echo _t('conf.sharing.share_url'); ?>" size="64" /> @@ -28,6 +30,8 @@ </label> <div class="group-controls"> <input type='hidden' id='share_<?php echo $key; ?>_type' name="share[<?php echo $key; ?>][type]" value='<?php echo $share->type(); ?>' /> + <input type='hidden' id='share_<?php echo $key; ?>_method' name="share[<?php echo $key; ?>][method]" value='<?php echo $share->method(); ?>' /> + <input type='hidden' id='share_<?php echo $key; ?>_field' name="share[<?php echo $key; ?>][field]" value='<?php echo $share->field(); ?>' /> <div class="stick"> <input type="text" id="share_<?php echo $key; ?>_name" name="share[<?php echo $key; ?>][name]" class="extend" value="<?php echo $share->name(); ?>" placeholder="<?php echo _t('conf.sharing.share_name'); ?>" size="64" data-leave-validation="<?php echo $share->name(); ?>"/> <?php if ($share->formType() === 'advanced') { ?> @@ -48,7 +52,7 @@ <div class="group-controls"> <select> <?php foreach (FreshRSS_Share::enum() as $share) { ?> - <option value='<?php echo $share->type(); ?>' data-form='<?php echo $share->formType(); ?>' data-help='<?php echo $share->help(); ?>'> + <option value='<?php echo $share->type(); ?>' data-form='<?php echo $share->formType(); ?>' data-help='<?php echo $share->help(); ?>' data-method='<?php echo $share->method(); ?>' data-field='<?php echo $share->field(); ?>'> <?php echo $share->name(true); ?> </option> <?php } ?> diff --git a/app/views/configure/system.phtml b/app/views/configure/system.phtml index 935b49fda..37b68c991 100644 --- a/app/views/configure/system.phtml +++ b/app/views/configure/system.phtml @@ -33,7 +33,7 @@ <div class="group-controls"> <?php $number = count(listUsers()); - echo _t($number > 1 ? 'admin.user.numbers' : 'admin.user.number', $number); + echo ($number > 1 ? _t('admin.user.numbers', $number) : _t('admin.user.number', $number)); ?> </div> </div> diff --git a/app/views/extension/index.phtml b/app/views/extension/index.phtml index 7cb16bfff..6439a0333 100644 --- a/app/views/extension/index.phtml +++ b/app/views/extension/index.phtml @@ -26,13 +26,46 @@ } ?> <?php - } + } - if (empty($this->extension_list['system']) && empty($this->extension_list['user'])) { + if (empty($this->extension_list['system']) && empty($this->extension_list['user'])) { ?> <p class="alert alert-warn"><?php echo _t('admin.extensions.empty_list'); ?></p> <?php } ?> </form> + + <?php if (!empty($this->available_extensions)) { ?> + <h2><?php echo _t('admin.extensions.community'); ?></h2> + <table> + <tr> + <th><?php echo _t('admin.extensions.name'); ?></th> + <th><?php echo _t('admin.extensions.version'); ?></th> + <th><?php echo _t('admin.extensions.author'); ?></th> + <th><?php echo _t('admin.extensions.description'); ?></th> + </tr> + <?php foreach ($this->available_extensions as $ext) { ?> + <tr> + <td><a href="<?php echo $ext['url']; ?>" target="_blank"><?php echo $ext['name']; ?></a></td> + <td><?php echo $ext['version']; ?></td> + <td><?php echo $ext['author']; ?></td> + <td> + <?php echo $ext['description']; ?> + <?php if (isset($this->extensions_installed[$ext['name']])) { ?> + <?php if (version_compare($this->extensions_installed[$ext['name']], $ext['version']) >= 0) { ?> + <span class="alert alert-success"> + <?php echo _t('admin.extensions.latest'); ?> + </span> + <?php } else if ($this->extensions_installed[$ext['name']] != $ext['version']) { ?> + <span class="alert alert-warn"> + <?php echo _t('admin.extensions.update'); ?> + </span> + <?php } ?> + <?php } ?> + </td> + </tr> + <?php } ?> + </table> + <?php } ?> </div> <?php $class = isset($this->extension) ? ' class="active"' : ''; ?> diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml index a9d5a80ca..bc23938b0 100644 --- a/app/views/helpers/index/normal/entry_bottom.phtml +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -52,7 +52,14 @@ $share_options['title'] = $title; $share->update($share_options); ?><li class="item share"> - <a target="_blank" rel="noreferrer" href="<?php echo $share->url(); ?>"><?php echo $share->name(); ?></a> + <?php if ('GET' === $share->method()) {?> + <a target="_blank" rel="noreferrer" href="<?php echo $share->url(); ?>"><?php echo $share->name(); ?></a> + <?php } else {?> + <a href="POST"><?php echo $share->name(); ?></a> + <form method="POST" data-url="<?php echo $share->url(); ?>"> + <input type="hidden" value="<?php echo $link; ?>" name="<?php echo $share->field(); ?>"/> + </form> + <?php } ?> </li><?php } ?></ul> diff --git a/app/views/subscription/bookmarklet.phtml b/app/views/subscription/bookmarklet.phtml index 162501be6..76ac700e0 100644 --- a/app/views/subscription/bookmarklet.phtml +++ b/app/views/subscription/bookmarklet.phtml @@ -10,4 +10,8 @@ <legend><?php echo _t('sub.firefox.title'); ?></legend> <p><?php echo _t('sub.firefox.documentation'); ?></p> <pre>browser.contentHandlers.types.number.uri → <?php echo Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true); ?>&url_rss=%s</pre> + + <legend><?php echo _t('sub.api.title'); ?></legend> + <p><?php echo _t('sub.api.documentation'); ?></p> + <pre><?php echo Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true); ?>&url_rss=%s</pre> </div>
\ No newline at end of file diff --git a/app/views/update/index.phtml b/app/views/update/index.phtml index da1bc7ef5..0599d5b0d 100644 --- a/app/views/update/index.phtml +++ b/app/views/update/index.phtml @@ -14,7 +14,21 @@ </p> <?php if (!empty($this->message)) { ?> - <p class="alert <?php echo $this->message['status'] === 'bad' ? 'alert-error' : 'alert-warn'; ?>"> + <?php + $class = 'alert-warn'; + switch ($this->message['status']) { + case 'bad': + $class = 'alert-error'; + break; + case 'latest': + $class = 'alert-success'; + break; + default: + $class = 'alert-warn'; + break; + } + ?> + <p class="alert <?php echo $class; ?>"> <span class="alert-head"><?php echo $this->message['title']; ?></span> <?php echo $this->message['body']; ?> </p> diff --git a/app/views/user/profile.phtml b/app/views/user/profile.phtml index f09c87765..7a63c0941 100644 --- a/app/views/user/profile.phtml +++ b/app/views/user/profile.phtml @@ -38,7 +38,7 @@ <input type="password" id="apiPasswordPlain" name="apiPasswordPlain" autocomplete="off" pattern=".{7,}" <?php echo cryptAvailable() ? '' : 'disabled="disabled" '; ?>/> <a class="btn toggle-password" data-toggle="apiPasswordPlain"><?php echo _i('key'); ?></a> </div> - <?php echo _i('help'); ?> <kbd><a href="../api/"><?php echo Minz_Url::display('/api/greader.php', 'html', true); ?></a></kbd> + <?php echo _i('help'); ?> <kbd><a href="../api/"><?php echo Minz_Url::display('/api/', 'html', true); ?></a></kbd> </div> </div> <?php } ?> |
