shorten plugin list action buttons

This commit is contained in:
Andrew Dolgov 2021-03-04 16:44:21 +03:00
parent cb4b730e42
commit f398fea414
7 changed files with 36 additions and 32 deletions

View File

@ -808,26 +808,32 @@ class Pref_Prefs extends Handler_Protected {
<input disabled='1' dojoType='dijit.form.CheckBox' <?= $is_checked ?> type='checkbox'><?= htmlspecialchars($about[1]) ?> <input disabled='1' dojoType='dijit.form.CheckBox' <?= $is_checked ?> type='checkbox'><?= htmlspecialchars($about[1]) ?>
</label> </label>
<?php if (count($tmppluginhost->get_all($plugin)) > 0) {
if (in_array($name, $system_enabled)) { ?>
<button dojoType='dijit.form.Button' title="<?= __("Clear data") ?>"
onclick='Helpers.Plugins.clearPluginData("<?= htmlspecialchars($name) ?>")'>
<i class='material-icons'>clear</i></button>
<?php }
} ?>
<?php if ($about[4] ?? false) { ?>
<button dojoType='dijit.form.Button' class='alt-info' title="<?= __("More info...") ?>"
onclick='window.open("<?= htmlspecialchars($about[4]) ?>")'>
<i class='material-icons'>help</i></button>
<?php } ?>
<?php if ($_SESSION["access_level"] >= 10) { ?> <?php if ($_SESSION["access_level"] >= 10) { ?>
<button style="display : none" <button style="display : none" class='alt-warning' title="<?= __("Update") ?>"
data-update-btn-for-plugin="<?= htmlspecialchars($name) ?>" dojoType='dijit.form.Button' data-update-btn-for-plugin="<?= htmlspecialchars($name) ?>" dojoType='dijit.form.Button'
onclick='Helpers.Plugins.update("<?= htmlspecialchars($name) ?>")'> onclick='Helpers.Plugins.update("<?= htmlspecialchars($name) ?>")'>
<?= \Controls\icon("update") ?> <?= \Controls\icon("update") ?>
<?= __("Update") ?>
</button> </button>
<?php } ?> <?php } ?>
<?php if ($about[4] ?? false) { ?>
<button dojoType='dijit.form.Button' class='alt-info'
onclick='window.open("<?= htmlspecialchars($about[4]) ?>")'>
<i class='material-icons'>open_in_new</i> <?= __("More info...") ?></button>
<?php } ?>
<?php if ($_SESSION["access_level"] >= 10 && $is_local) { ?> <?php if ($_SESSION["access_level"] >= 10 && $is_local) { ?>
<button dojoType='dijit.form.Button' <button dojoType='dijit.form.Button' title="<?= __("Uninstall") ?>"
onclick='Helpers.Plugins.uninstall("<?= htmlspecialchars($name) ?>")'> onclick='Helpers.Plugins.uninstall("<?= htmlspecialchars($name) ?>")'>
<?= \Controls\icon("delete") ?> <?= \Controls\icon("delete") ?>
<?= __("Uninstall") ?>
</button> </button>
<?php } ?> <?php } ?>
@ -876,34 +882,32 @@ class Pref_Prefs extends Handler_Protected {
</input> </input>
</label> </label>
<?php if ($_SESSION["access_level"] >= 10) { ?>
<button style="display : none"
data-update-btn-for-plugin="<?= htmlspecialchars($name) ?>" dojoType='dijit.form.Button'
onclick='Helpers.Plugins.update("<?= htmlspecialchars($name) ?>")'>
<?= \Controls\icon("update") ?>
<?= __("Update") ?>
</button>
<?php } ?>
<?php if (count($tmppluginhost->get_all($plugin)) > 0) { <?php if (count($tmppluginhost->get_all($plugin)) > 0) {
if (in_array($name, $system_enabled) || in_array($name, $user_enabled)) { ?> if (in_array($name, $system_enabled) || in_array($name, $user_enabled)) { ?>
<button dojoType='dijit.form.Button' <button dojoType='dijit.form.Button' title="<?= __("Clear data") ?>"
onclick='Helpers.Plugins.clearPluginData("<?= htmlspecialchars($name) ?>")'> onclick='Helpers.Plugins.clearPluginData("<?= htmlspecialchars($name) ?>")'>
<i class='material-icons'>clear</i> <?= __("Clear data") ?></button> <i class='material-icons'>clear</i></button>
<?php } <?php }
} ?> } ?>
<?php if ($about[4] ?? false) { ?> <?php if ($about[4] ?? false) { ?>
<button dojoType='dijit.form.Button' class='alt-info' <button dojoType='dijit.form.Button' class='alt-info' title="<?= __("More info...") ?>"
onclick='window.open("<?= htmlspecialchars($about[4]) ?>")'> onclick='window.open("<?= htmlspecialchars($about[4]) ?>")'>
<i class='material-icons'>open_in_new</i> <?= __("More info...") ?></button> <i class='material-icons'>help</i></button>
<?php } ?>
<?php if ($_SESSION["access_level"] >= 10) { ?>
<button style="display : none" class='alt-warning' title="<?= __("Update") ?>"
data-update-btn-for-plugin="<?= htmlspecialchars($name) ?>" dojoType='dijit.form.Button'
onclick='Helpers.Plugins.update("<?= htmlspecialchars($name) ?>")'>
<?= \Controls\icon("update") ?>
</button>
<?php } ?> <?php } ?>
<?php if ($_SESSION["access_level"] >= 10 && $is_local) { ?> <?php if ($_SESSION["access_level"] >= 10 && $is_local) { ?>
<button dojoType='dijit.form.Button' <button dojoType='dijit.form.Button' title="<?= __("Uninstall") ?>"
onclick='Helpers.Plugins.uninstall("<?= htmlspecialchars($name) ?>")'> onclick='Helpers.Plugins.uninstall("<?= htmlspecialchars($name) ?>")'>
<?= \Controls\icon("delete") ?> <?= \Controls\icon("delete") ?>
<?= __("Uninstall") ?>
</button> </button>
<?php } ?> <?php } ?>
@ -986,7 +990,7 @@ class Pref_Prefs extends Handler_Protected {
<?= __("Enable selected plugins") ?> <?= __("Enable selected plugins") ?>
</button> </button>
<?php if ($_SESSION["access_level"] >= 10) { ?> <?php if ($_SESSION["access_level"] >= 10) { ?>
<button class="update-all-plugins-btn" style="display : none" dojoType='dijit.form.Button' onclick="Helpers.Plugins.update()"> <button class="update-all-plugins-btn alt-warning" style="display : none" dojoType='dijit.form.Button' onclick="Helpers.Plugins.update()">
<?= \Controls\icon("update") ?> <?= \Controls\icon("update") ?>
<?= __("Update local plugins") ?> <?= __("Update local plugins") ?>
</button> </button>

View File

@ -1506,7 +1506,7 @@ body.ttrss_prefs fieldset.prefs .help-text-bottom {
margin-top: 10px; margin-top: 10px;
} }
body.ttrss_prefs fieldset.plugin label.description { body.ttrss_prefs fieldset.plugin label.description {
width: 600px; width: 550px;
margin-right: 150px; margin-right: 150px;
display: inline-block; display: inline-block;
} }

View File

@ -1506,7 +1506,7 @@ body.ttrss_prefs fieldset.prefs .help-text-bottom {
margin-top: 10px; margin-top: 10px;
} }
body.ttrss_prefs fieldset.plugin label.description { body.ttrss_prefs fieldset.plugin label.description {
width: 600px; width: 550px;
margin-right: 150px; margin-right: 150px;
display: inline-block; display: inline-block;
} }

View File

@ -1506,7 +1506,7 @@ body.ttrss_prefs fieldset.prefs .help-text-bottom {
margin-top: 10px; margin-top: 10px;
} }
body.ttrss_prefs fieldset.plugin label.description { body.ttrss_prefs fieldset.plugin label.description {
width: 600px; width: 550px;
margin-right: 150px; margin-right: 150px;
display: inline-block; display: inline-block;
} }

View File

@ -96,7 +96,7 @@ body.ttrss_prefs {
fieldset.plugin { fieldset.plugin {
label.description { label.description {
width : 600px; width : 550px;
margin-right : 150px; margin-right : 150px;
display : inline-block; display : inline-block;

View File

@ -1507,7 +1507,7 @@ body.ttrss_prefs fieldset.prefs .help-text-bottom {
margin-top: 10px; margin-top: 10px;
} }
body.ttrss_prefs fieldset.plugin label.description { body.ttrss_prefs fieldset.plugin label.description {
width: 600px; width: 550px;
margin-right: 150px; margin-right: 150px;
display: inline-block; display: inline-block;
} }

View File

@ -1507,7 +1507,7 @@ body.ttrss_prefs fieldset.prefs .help-text-bottom {
margin-top: 10px; margin-top: 10px;
} }
body.ttrss_prefs fieldset.plugin label.description { body.ttrss_prefs fieldset.plugin label.description {
width: 600px; width: 550px;
margin-right: 150px; margin-right: 150px;
display: inline-block; display: inline-block;
} }