From 789e9922d15c792e116de521526aeb8c0528b65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 9 Jul 2015 15:43:11 +0200 Subject: [PATCH] Some improvements in the about dialog * Sponsors => Supporters * Links to individual About dialog tabs from start page * Slight rewording here and there * rel="noopener noreferrer" for external links --- SPONSORS.md => SUPPORTERS.md | 10 +++++----- setup.py | 2 +- src/octoprint/server/__init__.py | 2 +- src/octoprint/server/views.py | 2 +- src/octoprint/settings.py | 2 +- src/octoprint/static/js/app/viewmodels/about.js | 4 ++++ .../templates/dialogs/about/about.jinja2 | 17 +++++++++-------- .../templates/dialogs/about/sponsors.jinja2 | 1 - .../templates/dialogs/about/supporters.jinja2 | 1 + 9 files changed, 23 insertions(+), 18 deletions(-) rename SPONSORS.md => SUPPORTERS.md (88%) delete mode 100644 src/octoprint/templates/dialogs/about/sponsors.jinja2 create mode 100644 src/octoprint/templates/dialogs/about/supporters.jinja2 diff --git a/SPONSORS.md b/SUPPORTERS.md similarity index 88% rename from SPONSORS.md rename to SUPPORTERS.md index eac40941..0924ead6 100644 --- a/SPONSORS.md +++ b/SUPPORTERS.md @@ -1,4 +1,4 @@ -# Sponsors +# Supporters Development of this version of OctoPrint wouldn't have been possible without [financial support by the community](http://octoprint.org/support-octoprint/) - @@ -14,8 +14,8 @@ thanks to everyone who contributed! * E3D BigBox * Erik de Bruijn * Ernesto Martinez - * Exovite - * georgeroblesjr + * Exovite + * georgeroblesjr * Gregor Luetolf * Kale Stedman * Makespace Madrid @@ -26,6 +26,6 @@ thanks to everyone who contributed! * Samer Najia * Stefan Krister * Sven Mueller - * Tom + * Tom -and 321 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)! \ No newline at end of file +and 321 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)! diff --git a/setup.py b/setup.py index 6479414a..cdfca852 100644 --- a/setup.py +++ b/setup.py @@ -113,7 +113,7 @@ def get_cmdclass(): "octoprint/templates/_data": [ "AUTHORS.md", "CHANGELOG.md", - "SPONSORS.md", + "SUPPORTERS.md", "THIRDPARTYLICENSES.md", ] }, cmdclass["build_py"] if "build_py" in cmdclass else _build_py) diff --git a/src/octoprint/server/__init__.py b/src/octoprint/server/__init__.py index 75bfc579..963783dd 100644 --- a/src/octoprint/server/__init__.py +++ b/src/octoprint/server/__init__.py @@ -717,7 +717,7 @@ class Server(object): loaders = [app.jinja_loader, filesystem_loader] if octoprint.util.is_running_from_source(): root = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../..")) - allowed = ["AUTHORS.md", "CHANGELOG.md", "SPONSORS.md", "THIRDPARTYLICENSES.md"] + allowed = ["AUTHORS.md", "CHANGELOG.md", "SUPPORTERS.md", "THIRDPARTYLICENSES.md"] class SourceRootFilesystemLoader(jinja2.FileSystemLoader): def __init__(self, template_filter, prefix, *args, **kwargs): diff --git a/src/octoprint/server/views.py b/src/octoprint/server/views.py index 4b2583d9..ba32774b 100644 --- a/src/octoprint/server/views.py +++ b/src/octoprint/server/views.py @@ -188,7 +188,7 @@ def index(): thirdparty=(gettext("Third Party Licenses"), dict(template="dialogs/about/thirdparty.jinja2", _div="about_thirdparty", custom_bindings=False)), authors=(gettext("Authors"), dict(template="dialogs/about/authors.jinja2", _div="about_authors", custom_bindings=False)), changelog=(gettext("Changelog"), dict(template="dialogs/about/changelog.jinja2", _div="about_changelog", custom_bindings=False)), - sponsors=(gettext("Sponsors"), dict(template="dialogs/about/sponsors.jinja2", _div="about_sponsors", custom_bindings=False)) + supporters=(gettext("Supporters"), dict(template="dialogs/about/supporters.jinja2", _div="about_sponsors", custom_bindings=False)) ) # extract data from template plugins diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index b125c82e..ce203919 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -218,7 +218,7 @@ default_settings = { "section_octoprint", "server", "folders", "appearance", "logs", "plugin_pluginmanager", "plugin_softwareupdate" ], "usersettings": ["access", "interface"], - "about": ["about", "sponsors", "authors", "changelog", "license", "thirdparty", "plugin_pluginmanager"], + "about": ["about", "supporters", "authors", "changelog", "license", "thirdparty", "plugin_pluginmanager"], "generic": [] }, "disabled": { diff --git a/src/octoprint/static/js/app/viewmodels/about.js b/src/octoprint/static/js/app/viewmodels/about.js index 8ebf6b9f..73e0307e 100644 --- a/src/octoprint/static/js/app/viewmodels/about.js +++ b/src/octoprint/static/js/app/viewmodels/about.js @@ -31,6 +31,10 @@ $(function() { self.aboutContent.scrollTop(0); }); }; + + self.showTab = function(tab) { + $("a[href=#" + tab + "]", self.aboutTabs).tab("show"); + }; } OCTOPRINT_VIEWMODELS.push([ diff --git a/src/octoprint/templates/dialogs/about/about.jinja2 b/src/octoprint/templates/dialogs/about/about.jinja2 index 947c56ac..1569f2ca 100644 --- a/src/octoprint/templates/dialogs/about/about.jinja2 +++ b/src/octoprint/templates/dialogs/about/about.jinja2 @@ -5,17 +5,18 @@

Version {{ display_version }}

- OctoPrint is sponsored by a lot of awesome people. Please see "Sponsors" to the left. + Development of OctoPrint wouldn't be possible without its supporters.
+ If you enjoy OctoPrint, please consider supporting its ongoing development.

- © 2012-{{ now.strftime("%Y") }} The OctoPrint Authors + © 2012-{{ now.strftime("%Y") }} The OctoPrint Authors

@@ -33,16 +34,16 @@

- For a copy of the GNU Affero General Public License, see "OctoPrint License" + For a copy of the GNU Affero General Public License, see {{ templates.about.entries.license[0] }} to the left.

OctoPrint also utilizes various dependencies under terms of their - respective licenses, which can be found under "Third Party Licenses" to + respective licenses, which can be found under {{ templates.about.entries.thirdparty[0] }} to the left. Copyright of those dependencies lies with their respective authors

- "OctoPrint" is a registered trademark + "OctoPrint" is a registered trademark.

diff --git a/src/octoprint/templates/dialogs/about/sponsors.jinja2 b/src/octoprint/templates/dialogs/about/sponsors.jinja2 deleted file mode 100644 index 1870c618..00000000 --- a/src/octoprint/templates/dialogs/about/sponsors.jinja2 +++ /dev/null @@ -1 +0,0 @@ -{% filter markdown %}{% filter offset_markdown_headers(2) %}{% include "_data/SPONSORS.md" ignore missing %}{% endfilter %}{% endfilter %} diff --git a/src/octoprint/templates/dialogs/about/supporters.jinja2 b/src/octoprint/templates/dialogs/about/supporters.jinja2 new file mode 100644 index 00000000..3e6df586 --- /dev/null +++ b/src/octoprint/templates/dialogs/about/supporters.jinja2 @@ -0,0 +1 @@ +{% filter markdown %}{% filter offset_markdown_headers(2) %}{% include "_data/SUPPORTERS.md" ignore missing %}{% endfilter %}{% endfilter %}