From 6d1bfadf04d406dfc048ebb57c6f20cb9782dda6 Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Thu, 9 Feb 2017 19:47:41 +0100 Subject: [PATCH 1/5] Use toggle buttons for page settings --- blueprints/external_links.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/blueprints/external_links.yaml b/blueprints/external_links.yaml index c4701fc..3c12e9a 100644 --- a/blueprints/external_links.yaml +++ b/blueprints/external_links.yaml @@ -19,9 +19,9 @@ form: fields: header.external_links.process: type: toggle + toggleable: true label: PLUGINS.EXTERNAL_LINKS.PROCESS highlight: 1 - '@config-default': plugins.external_links.process options: 1: PLUGIN_ADMIN.YES 0: PLUGIN_ADMIN.NO @@ -30,8 +30,8 @@ form: header.external_links.title: type: toggle + toggleable: true label: PLUGINS.EXTERNAL_LINKS.TITLE - '@config-default': plugins.external_links.title options: 1: PLUGIN_ADMIN.YES 0: PLUGIN_ADMIN.NO @@ -40,8 +40,8 @@ form: header.external_links.no_follow: type: toggle + toggleable: true label: PLUGINS.EXTERNAL_LINKS.NO_FOLLOW - '@config-default': plugins.external_links.no_follow options: 1: PLUGIN_ADMIN.YES 0: PLUGIN_ADMIN.NO @@ -51,6 +51,7 @@ form: header.external_links.target: type: select size: large + toggleable: true label: PLUGINS.EXTERNAL_LINKS.TARGET '@config-default': plugins.external_links.target placeholder: _blank @@ -68,6 +69,7 @@ form: type: select size: large classes: fancy + toggleable: true label: PLUGINS.EXTERNAL_LINKS.MODE help: PLUGINS.EXTERNAL_LINKS.MODE_HELP '@config-default': plugins.external_links.mode @@ -75,4 +77,4 @@ form: active: PLUGINS.EXTERNAL_LINKS.MODE_ACTIVE passive: PLUGINS.EXTERNAL_LINKS.MODE_PASSIVE validate: - type: string \ No newline at end of file + type: string From 3e641df454831ffa6cde46ad17a0f704c34e6566 Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Thu, 9 Feb 2017 19:52:01 +0100 Subject: [PATCH 2/5] :bookmark: Use tabs in admin panel settings --- blueprints.yaml | 299 ++++++++++++++++++++++++------------------------ languages.yaml | 37 +++--- 2 files changed, 172 insertions(+), 164 deletions(-) diff --git a/blueprints.yaml b/blueprints.yaml index 1979cc2..53ee2ab 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,173 +1,178 @@ -name: External Links -version: 1.4.4 +name: "External Links" +version: "1.4.4" description: "This plugin adds small icons to external and mailto links, informing users the link will take them to a new site or open their email client." -icon: external-link +icon: "external-link" author: - name: Sommerregen - email: sommerregen@benjamin-regler.de -homepage: https://github.com/sommerregen/grav-plugin-external-links -keywords: [external, links, filter, formatter, plugin] -docs: https://github.com/sommerregen/grav-plugin-external-links/blob/master/README.md -bugs: https://github.com/sommerregen/grav-plugin-external-links/issues -license: MIT/GPL + name: "Sommerregen" + email: "sommerregen@benjamin-regler.de" +homepage: "https://github.com/sommerregen/grav-plugin-external-links" +keywords: ["external", "links", "filter", "formatter", "plugin"] +docs: "https://github.com/sommerregen/grav-plugin-external-links/blob/master/README.md" +bugs: "https://github.com/sommerregen/grav-plugin-external-links/issues" +license: "MIT/GPL" form: validation: strict - fields: - global: - type: section - title: PLUGINS.EXTERNAL_LINKS.GLOBAL_CONFIG - underline: 1 - fields: - enabled: - type: toggle - label: PLUGINS.EXTERNAL_LINKS.PLUGIN_STATUS - highlight: 1 - default: 0 - options: - 1: PLUGIN_ADMIN.ENABLED - 0: PLUGIN_ADMIN.DISABLED - validate: - type: bool - - built_in_css: - type: toggle - label: PLUGINS.EXTERNAL_LINKS.BUILTIN_CSS - highlight: 1 - default: 1 - options: - 1: PLUGIN_ADMIN.YES - 0: PLUGIN_ADMIN.NO - validate: - type: bool - - weight: - type: text - size: x-small - label: PLUGINS.EXTERNAL_LINKS.WEIGHT - default: 0 - validate: - type: int - min: -100 - max: 100 - - default: - type: section - title: PLUGINS.EXTERNAL_LINKS.DEFAULT_CONFIG - underline: 1 + fields: + tabs: + type: tabs + active: 1 + class: subtle fields: - links: - type: section - title: PLUGINS.EXTERNAL_LINKS.LINKS.SECTION - text: PLUGINS.EXTERNAL_LINKS.LINKS.SECTION_HELP + external_links: + type: tab + title: PLUGINS.EXTERNAL_LINKS.PLUGIN_NAME fields: - links.www: + enabled: type: toggle - label: PLUGINS.EXTERNAL_LINKS.LINKS.WWW - help: PLUGINS.EXTERNAL_LINKS.LINKS.WWW_HELP - default: 0 + label: PLUGIN_ADMIN.PLUGIN_STATUS + help: PLUGINS.EXTERNAL_LINKS.STATUS_HELP + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + + built_in_css: + type: toggle + label: PLUGINS.EXTERNAL_LINKS.BUILTIN_CSS + highlight: 1 + default: 1 options: 1: PLUGIN_ADMIN.YES 0: PLUGIN_ADMIN.NO validate: type: bool - links.schemes: - type: selectize - size: large - label: PLUGINS.EXTERNAL_LINKS.LINKS.SCHEMES - help: PLUGINS.EXTERNAL_LINKS.LINKS.SCHEMES_HELP + weight: + type: text + size: x-small + label: PLUGINS.EXTERNAL_LINKS.WEIGHT + default: 0 validate: - type: commalist + type: int + min: -100 + max: 100 - exclude: - type: section - title: PLUGINS.EXTERNAL_LINKS.EXCLUDE.SECTION - text: PLUGINS.EXTERNAL_LINKS.EXCLUDE.SECTION_HELP + settings: + type: tab + title: PLUGINS.EXTERNAL_LINKS.SETTINGS fields: - exclude.classes: - type: selectize - size: large - label: PLUGINS.EXTERNAL_LINKS.EXCLUDE.CLASSES - help: PLUGINS.EXTERNAL_LINKS.EXCLUDE.CLASSES_HELP + links: + type: section + title: PLUGINS.EXTERNAL_LINKS.LINKS.SECTION + text: PLUGINS.EXTERNAL_LINKS.LINKS.SECTION_HELP + + fields: + links.www: + type: toggle + label: PLUGINS.EXTERNAL_LINKS.LINKS.WWW + help: PLUGINS.EXTERNAL_LINKS.LINKS.WWW_HELP + default: 0 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + links.schemes: + type: selectize + size: large + label: PLUGINS.EXTERNAL_LINKS.LINKS.SCHEMES + help: PLUGINS.EXTERNAL_LINKS.LINKS.SCHEMES_HELP + validate: + type: commalist + + exclude: + type: section + title: PLUGINS.EXTERNAL_LINKS.EXCLUDE.SECTION + text: PLUGINS.EXTERNAL_LINKS.EXCLUDE.SECTION_HELP + + fields: + exclude.classes: + type: selectize + size: large + label: PLUGINS.EXTERNAL_LINKS.EXCLUDE.CLASSES + help: PLUGINS.EXTERNAL_LINKS.EXCLUDE.CLASSES_HELP + validate: + type: commalist + + exclude.domains: + type: selectize + size: large + label: PLUGINS.EXTERNAL_LINKS.EXCLUDE.DOMAINS + help: PLUGINS.EXTERNAL_LINKS.EXCLUDE.DOMAINS_HELP + placeholder: "localhost/*, img.domain.com/*" + validate: + type: commalist + + content: + type: tab + title: PLUGINS.EXTERNAL_LINKS.CONTENT + + fields: + process: + type: toggle + label: PLUGINS.EXTERNAL_LINKS.PROCESS + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO validate: - type: commalist + type: bool - exclude.domains: - type: selectize - size: large - label: PLUGINS.EXTERNAL_LINKS.EXCLUDE.DOMAINS - help: PLUGINS.EXTERNAL_LINKS.EXCLUDE.DOMAINS_HELP - placeholder: "localhost/*, img.domain.com/*" + title: + type: toggle + label: PLUGINS.EXTERNAL_LINKS.TITLE + default: 0 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + no_follow: + type: toggle + label: PLUGINS.EXTERNAL_LINKS.NO_FOLLOW + default: 1 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO validate: - type: commalist + type: bool - specific: - type: section - title: PLUGINS.EXTERNAL_LINKS.SPECIFIC_CONFIG - underline: 1 + target: + type: select + size: large + label: PLUGINS.EXTERNAL_LINKS.TARGET + default: _blank + placeholder: _blank + selectize: + create: true + options: + _blank: PLUGINS.EXTERNAL_LINKS.TARGET_BLANK + _self: PLUGINS.EXTERNAL_LINKS.TARGET_SELF + _parent: PLUGINS.EXTERNAL_LINKS.TARGET_PARENT + _top: PLUGINS.EXTERNAL_LINKS.TARGET_TOP + validate: + type: string - fields: - process: - type: toggle - label: PLUGINS.EXTERNAL_LINKS.PROCESS - highlight: 1 - default: 1 - options: - 1: PLUGIN_ADMIN.YES - 0: PLUGIN_ADMIN.NO - validate: - type: bool - - title: - type: toggle - label: PLUGINS.EXTERNAL_LINKS.TITLE - default: 0 - options: - 1: PLUGIN_ADMIN.YES - 0: PLUGIN_ADMIN.NO - validate: - type: bool - - no_follow: - type: toggle - label: PLUGINS.EXTERNAL_LINKS.NO_FOLLOW - default: 1 - options: - 1: PLUGIN_ADMIN.YES - 0: PLUGIN_ADMIN.NO - validate: - type: bool - - target: - type: select - size: large - label: PLUGINS.EXTERNAL_LINKS.TARGET - default: _blank - placeholder: _blank - selectize: - create: true - options: - _blank: PLUGINS.EXTERNAL_LINKS.TARGET_BLANK - _self: PLUGINS.EXTERNAL_LINKS.TARGET_SELF - _parent: PLUGINS.EXTERNAL_LINKS.TARGET_PARENT - _top: PLUGINS.EXTERNAL_LINKS.TARGET_TOP - validate: - type: string - - mode: - type: select - size: large - classes: fancy - label: PLUGINS.EXTERNAL_LINKS.MODE - help: PLUGINS.EXTERNAL_LINKS.MODE_HELP - default: active - options: - active: PLUGINS.EXTERNAL_LINKS.MODE_ACTIVE - passive: PLUGINS.EXTERNAL_LINKS.MODE_PASSIVE - validate: - type: string + mode: + type: select + size: large + classes: fancy + label: PLUGINS.EXTERNAL_LINKS.MODE + help: PLUGINS.EXTERNAL_LINKS.MODE_HELP + default: active + options: + active: PLUGINS.EXTERNAL_LINKS.MODE_ACTIVE + passive: PLUGINS.EXTERNAL_LINKS.MODE_PASSIVE + validate: + type: string diff --git a/languages.yaml b/languages.yaml index 26829f0..81b1822 100644 --- a/languages.yaml +++ b/languages.yaml @@ -2,14 +2,15 @@ de: PLUGINS: EXTERNAL_LINKS: - GLOBAL_CONFIG: "Globale Einstellungen" - DEFAULT_CONFIG: "Standardeinstellungen für External Links" - SPECIFIC_CONFIG: "Globale und seitenspezifische Einstellungen" + PLUGIN_NAME: "External Links" PLUGIN_STATUS: "Plugin Status" - BUILTIN_CSS: "Verwende mitgeliefertes CSS" + PLUGIN_STATUS_HELP: "Aktiviere das Plugin oder schalte es komplett ab." + BUILTIN_CSS: "Verwende mitgeliefertes CSS" WEIGHT: "Ausführungsreihenfolge" - EXTERNAL_LINKS: "External Links" + + SETTINGS: "Einstellungen" + CONTENT: "Inhalt" EXCLUDE: SECTION: "Ausnahmen" @@ -52,14 +53,15 @@ de: en: PLUGINS: EXTERNAL_LINKS: - GLOBAL_CONFIG: "Global plugin configurations" - DEFAULT_CONFIG: "Default values for External Links configuration" - SPECIFIC_CONFIG: "Global and page specific configurations" + PLUGIN_NAME: "External Links" PLUGIN_STATUS: "Plugin status" - BUILTIN_CSS: "Use built in CSS" + STATUS_HELP: "Set to false to disable this plugin completely." + BUILTIN_CSS: "Use built in CSS" WEIGHT: "Order of execution" - EXTERNAL_LINKS: "External Links" + + SETTINGS: "Settings" + CONTENT: "Content" EXCLUDE: SECTION: "Exclusion" @@ -97,19 +99,20 @@ en: MODE_HELP: "active = process and parse all links; passive = parse links, but don't set CSS classes" MODE_ACTIVE: "Active - Process and parse all links" MODE_PASSIVE: "Passive - Parse links, but don't set CSS classes" - + # French fr: PLUGINS: EXTERNAL_LINKS: - GLOBAL_CONFIG: "Configuration globale du plugin" - DEFAULT_CONFIG: "Configuration des valeurs par défaut pour les liens externes" - SPECIFIC_CONFIG: "Configuration globale et de pages spécifiques" + PLUGIN_NAME: "Liens externes" PLUGIN_STATUS: "Statut du plugin" - BUILTIN_CSS: "Utiliser les CSS intégrés" + STATUS_HELP: "Set to false to disable this plugin completely." + BUILTIN_CSS: "Utiliser les CSS intégrés" WEIGHT: "Ordre d'exécution" - EXTERNAL_LINKS: "Liens externes" + + SETTINGS: "Configuration" + CONTENT: "Contenu" EXCLUDE: SECTION: "Exclusion" @@ -147,4 +150,4 @@ fr: MODE_HELP: "actif = analyser et procéder pour tous les liens; passif = analyser les liens mais ne pas appliquer les classes CSS" MODE_ACTIVE: "Actif - Analyser et procéder pour tous les liens" MODE_PASSIVE: "Passif - Analyser les liens mais ne pas appliquer les classes CSS" - + From d527c54513a706076a9da239d880dfa326852cae Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Thu, 9 Feb 2017 19:53:36 +0100 Subject: [PATCH 3/5] Updated copyright --- LICENSE | 2 +- README.md | 2 +- external_links.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index e9bda35..581c4b1 100644 --- a/LICENSE +++ b/LICENSE @@ -27,7 +27,7 @@ using Grav External Links Plugin in any way. MIT LICENSE ----------- -Copyright (c) 2016 Benjamin Regler, https://github.com/sommerregen/grav-plugin-external-links +Copyright (c) 2017 Benjamin Regler, https://github.com/sommerregen/grav-plugin-external-links Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index ccff283..836538a 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ Thanks! ## License -Copyright (c) 2016 [Benjamin Regler][github]. See also the list of [contributors] who participated in this project. +Copyright (c) 2017 [Benjamin Regler][github]. See also the list of [contributors] who participated in this project. [Dual-licensed](LICENSE) for use under the terms of the [MIT][mit-license] or [GPLv3][gpl-license] licenses. diff --git a/external_links.php b/external_links.php index 595c793..ff72e2c 100644 --- a/external_links.php +++ b/external_links.php @@ -12,7 +12,7 @@ * @version 1.4.4 * @link * @author Benjamin Regler - * @copyright 2016, Benjamin Regler + * @copyright 2017, Benjamin Regler * @license MIT * @license GPLv3 */ From 910c8cd22d44a11809b14dc7a120164dac215ab1 Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Thu, 9 Feb 2017 20:00:48 +0100 Subject: [PATCH 4/5] :hotsprings: Fix missing translation string --- blueprints/external_links.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprints/external_links.yaml b/blueprints/external_links.yaml index 3c12e9a..d559976 100644 --- a/blueprints/external_links.yaml +++ b/blueprints/external_links.yaml @@ -13,7 +13,7 @@ form: fields: external_links: type: section - title: PLUGINS.EXTERNAL_LINKS.EXTERNAL_LINKS + title: PLUGINS.EXTERNAL_LINKS.PLUGIN_NAME underline: true fields: From 77cfe91ea15e23633d59368bcd56ebabe83ece7e Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Thu, 9 Feb 2017 20:01:21 +0100 Subject: [PATCH 5/5] :maple_leaf: Version Update - Release v1.5.0 --- CHANGELOG.md | 9 ++++++++- blueprints.yaml | 2 +- external_links.php | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53b60e5..65675d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ +# v1.5.0 +## 02/09/2017 + +2. [](#improved) + * Use tabs in admin panel settings for better user experience + * Use toggle buttons for page settings + # v1.4.4 -## 11/01/2017 +## 01/11/2017 3. [](#bugfix) * Fixed `CURLOPT_AUTOREFERER` constant diff --git a/blueprints.yaml b/blueprints.yaml index 53ee2ab..ff87ed6 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,5 @@ name: "External Links" -version: "1.4.4" +version: "1.5.0" description: "This plugin adds small icons to external and mailto links, informing users the link will take them to a new site or open their email client." icon: "external-link" author: diff --git a/external_links.php b/external_links.php index ff72e2c..b028c28 100644 --- a/external_links.php +++ b/external_links.php @@ -1,6 +1,6 @@ * @author Benjamin Regler * @copyright 2017, Benjamin Regler