diff options
| author | 2024-12-04 22:41:08 +0100 | |
|---|---|---|
| committer | 2024-12-04 22:41:08 +0100 | |
| commit | 79651b942de86e9d181ecf92cbbf12ad87b58cf2 (patch) | |
| tree | 9f5f7bd2fe649d066271f593f0f1aba98b420400 /app/views | |
| parent | b6f3bbe18525292ae38831344a4bd5e1b361b4e0 (diff) | |
improve api management (#7048)
* ... and sharing user queries by link (not all languages)
* Profile page: API mgm: better headline, better help text
* i18n
* i18n: " and sharing user queries"
* i18n: link to documentation + apps list
* Update app/i18n/it/conf.php
* Update app/i18n/it/conf.php
* Update app/i18n/it/conf.php
* Update app/i18n/it/conf.php
* Update app/i18n/it/conf.php
* Update app/i18n/it/conf.php
* Update app/i18n/it/conf.php
* Update app/i18n/it/admin.php
Co-authored-by: UserRoot-Luca <55756898+UserRoot-Luca@users.noreply.github.com>
* Update app/i18n/it/conf.php
* Update app/i18n/fr/admin.php
* i18n
* French doc cf. English
* Update app/i18n/it/conf.php
Co-authored-by: UserRoot-Luca <55756898+UserRoot-Luca@users.noreply.github.com>
* Update conf.php
---------
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: UserRoot-Luca <55756898+UserRoot-Luca@users.noreply.github.com>
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/helpers/configure/query.phtml | 80 | ||||
| -rw-r--r-- | app/views/user/profile.phtml | 14 |
2 files changed, 59 insertions, 35 deletions
diff --git a/app/views/helpers/configure/query.phtml b/app/views/helpers/configure/query.phtml index c32bf1e85..97ef0c480 100644 --- a/app/views/helpers/configure/query.phtml +++ b/app/views/helpers/configure/query.phtml @@ -20,54 +20,68 @@ <input type="text" class="w100" name="name" id="name" value="<?= $this->query->getName() ?>" /> <input type="hidden" name="query[token]" id="query_token" value="<?= $this->query->getToken() ?>" /> </div> + </div> + <div class="form-group"> <label class="group-name" for="description"><?= _t('conf.query.description') ?></label> <div class="group-controls"> <input type="text" class="w100" name="query[description]" id="description" value="<?= $this->query->getDescription() ?>" /> </div> + </div> + <div class="form-group"> <label class="group-name" for="imageUrl"><?= _t('conf.query.image_url') ?></label> <div class="group-controls"> <input type="text" class="w100" name="query[imageUrl]" id="imageUrl" value="<?= $this->query->getImageUrl() ?>" /> </div> </div> - <fieldset> - <legend><?= _t('conf.query.share') ?></legend> - <div class="form-group"> - <div class="group-controls"> - <label class="checkbox" for="shareRss"> - <input type="checkbox" name="query[shareRss]" id="shareRss" value="1" <?= $this->query->shareRss() ? 'checked="checked"' : ''?> /> - <?= _t('conf.query.filter.shareRss') ?> - </label> - <?php if ($this->query->sharedUrlRss() !== ''): ?> - <ul> - <li><a href="<?= $this->query->sharedUrlHtml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.html') ?></a></li> - <li><a href="<?= $this->query->sharedUrlRss() ?>"><?= _i('link') ?> <?= _t('conf.query.share.rss') ?></a></li> - <li><a href="<?= $this->query->sharedUrlGreader() ?>"><?= _i('link') ?> <?= _t('conf.query.share.greader') ?></a></li> - </ul> - <?php endif; ?> + <?php if (FreshRSS_Context::systemConf()->api_enabled) { ?> + <fieldset> + <legend><?= _t('conf.query.share') ?></legend> + <div class="form-group"> + <div class="group-controls"> + <label class="checkbox" for="shareRss"> + <input type="checkbox" name="query[shareRss]" id="shareRss" value="1" <?= $this->query->shareRss() ? 'checked="checked"' : ''?> /> + <?= _t('conf.query.filter.shareRss') ?> + </label> + <?php if ($this->query->sharedUrlRss() !== ''): ?> + <ul> + <li><a href="<?= $this->query->sharedUrlHtml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.html') ?></a></li> + <li><a href="<?= $this->query->sharedUrlRss() ?>"><?= _i('link') ?> <?= _t('conf.query.share.rss') ?></a></li> + <li><a href="<?= $this->query->sharedUrlGreader() ?>"><?= _i('link') ?> <?= _t('conf.query.share.greader') ?></a></li> + </ul> + <?php endif; ?> + </div> + <div class="group-controls"> + <label class="checkbox" for="shareOpml"> + <input type="checkbox" name="query[shareOpml]" id="shareOpml" value="1" <?= $this->query->shareOpml() && $this->query->safeForOpml() ? 'checked="checked"' : '' ?> + <?= $this->query->safeForOpml() ? '' : 'disabled="disabled"' ?> /> + <?= _t('conf.query.filter.shareOpml') ?> + </label> + <?php if ($this->query->sharedUrlOpml() !== ''): ?> + <ul> + <li><a href="<?= $this->query->sharedUrlOpml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.opml') ?></a></li> + </ul> + <?php endif; ?> + </div> + <p class="help"><?= _i('help') ?> <?= _t('conf.query.share.help') ?></a></p> + <p class="help"><?= _i('help') ?> <?= _t('conf.query.help') ?></a></p> </div> - <div class="group-controls"> - <label class="checkbox" for="shareOpml"> - <input type="checkbox" name="query[shareOpml]" id="shareOpml" value="1" <?= $this->query->shareOpml() && $this->query->safeForOpml() ? 'checked="checked"' : '' ?> - <?= $this->query->safeForOpml() ? '' : 'disabled="disabled"' ?> /> - <?= _t('conf.query.filter.shareOpml') ?> - </label> - <?php if ($this->query->sharedUrlOpml() !== ''): ?> - <ul> - <li><a href="<?= $this->query->sharedUrlOpml() ?>"><?= _i('link') ?> <?= _t('conf.query.share.opml') ?></a></li> - </ul> - <?php endif; ?> - </div> - <p class="help"><?= _i('help') ?> <?= _t('conf.query.share.help') ?></a></p> - <p class="help"><?= _i('help') ?> <?= _t('conf.query.help') ?></a></p> - </div> - <div class="form-group form-actions"> + <div class="form-group form-actions"> + <div class="group-controls"> + <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button> + </div> + </div> + </fieldset> + <?php } else { ?> + <div class="form-group"> + <label class="group-name"><?= _t('conf.query.share.disabled.title') ?></label> <div class="group-controls"> - <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button> + <?= _t('conf.query.share.disabled') ?> + <p class="help"><?= _i('help') ?> <?= _t('conf.query.help') ?></a></p> </div> </div> - </fieldset> + <?php } ?> <fieldset> <legend><?= _t('conf.query.filter') ?></legend> diff --git a/app/views/user/profile.phtml b/app/views/user/profile.phtml index 1c410334d..f0ae7b2fb 100644 --- a/app/views/user/profile.phtml +++ b/app/views/user/profile.phtml @@ -75,8 +75,9 @@ </div> </form> + + <h2><?= _t('conf.profile.api') ?></h2> <?php if (FreshRSS_Context::systemConf()->api_enabled) { ?> - <h2><?= _t('conf.profile.api') ?></h2> <form method="post" action="<?= _url('api', 'updatePassword') ?>"> <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> @@ -88,7 +89,8 @@ pattern=".{7,}" <?= cryptAvailable() ? '' : 'disabled="disabled" ' ?>/> <button type="button" class="btn toggle-password" data-toggle="apiPasswordPlain"><?= _i('key') ?></button> </div> - <p class="help"><?= _i('help') ?> <kbd><a href="../api/"><?= Minz_Url::display('/api/', 'html', true) ?></a></kbd></p> + <p class="help"><?= _i('help') ?> <?= _t('conf.profile.api.check_link', Minz_Url::display('/api/', 'html', true)) ?></p> + <p class="help"><?= _i('help') ?> <?= _t('conf.profile.api.documentation_link') ?></p> </div> </div> @@ -98,6 +100,14 @@ </div> </div> </form> + <?php } else { ?> + <div class="form-group"> + <label class="group-name"></label> + <div class="group-controls"> + <?= _t('conf.profile.api.disabled') ?> + <p class="help"><?= _i('help') ?> <?= _t('conf.profile.api.help') ?></p> + </div> + </div> <?php } ?> <?php if (!FreshRSS_Auth::hasAccess('admin')) { ?> |
