From ad5bd3d3f1d4a59a9ea5755c591e76746afdb035 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 4 Sep 2014 14:57:26 +0200 Subject: [PATCH] Add sample humanstxt plugin. That plugin shows an simple example how add additional urlmappings and additional templates to the project. --- app/plugins/humanstxt/humanstxt.coffee | 31 +++++++++++++++++++ .../humanstxt/templates/humanstxt.html | 10 ++++++ 2 files changed, 41 insertions(+) create mode 100644 app/plugins/humanstxt/humanstxt.coffee create mode 100644 app/plugins/humanstxt/templates/humanstxt.html diff --git a/app/plugins/humanstxt/humanstxt.coffee b/app/plugins/humanstxt/humanstxt.coffee new file mode 100644 index 00000000..2b42b38a --- /dev/null +++ b/app/plugins/humanstxt/humanstxt.coffee @@ -0,0 +1,31 @@ +### +# Copyright (C) 2014 Andrey Antukh +# Copyright (C) 2014 Jesús Espino Garcia +# Copyright (C) 2014 David Barragán Merino +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +# File: plugins/humanstxt/humanstxt.coffee +### + +# Simple plugin example that extends the urlmappings +# and add additional template. + +taiga = @.taiga +module = angular.module("taigaPlugins") + +configure = ($routeProvider) -> + $routeProvider.when("/humans.txt", {"templateUrl": "/plugins/humanstxt/templates/humanstxt.html"}) + +module.config(["$routeProvider", configure]) diff --git a/app/plugins/humanstxt/templates/humanstxt.html b/app/plugins/humanstxt/templates/humanstxt.html new file mode 100644 index 00000000..63ee509c --- /dev/null +++ b/app/plugins/humanstxt/templates/humanstxt.html @@ -0,0 +1,10 @@ +

Team

+ +
    +
  • Andrey Antukh «niwi@niwi.be»
  • +
  • Jesus Espino Garcia «jespinog@gmail.com»
  • +
  • David Barragán Merino «bameda@dbarragan.com»
  • +
  • Xavi Julian «xavier.julian@kaleidos.net»
  • +
  • Alejandro Alonso «alejandro.alonso@kaleidos.net»
  • +
+