Remove plugins and create modules/components/terms-of-service-and-privacy-policy-notice/
parent
b8173d129f
commit
2ee79aa983
|
@ -648,7 +648,6 @@ modules = [
|
|||
"taigaProject",
|
||||
"taigaUserSettings",
|
||||
"taigaFeedback",
|
||||
"taigaPlugins",
|
||||
"taigaIntegrations",
|
||||
"taigaComponents",
|
||||
# new modules
|
||||
|
|
|
@ -1343,6 +1343,9 @@
|
|||
"UNBLOCKED": "{{username}} has unblocked {{obj_name}}",
|
||||
"NEW_USER": "{{username}} has joined Taiga"
|
||||
},
|
||||
"LEGAL": {
|
||||
"TERMS_OF_SERVICE_AND_PRIVACY_POLICY_AD": "<span>By clicking \"Sign up\"', you agree to our <br /></span><a href=\"{{ termsOfServiceUrl }}\" title=\"See terms of service\" target=\"_blank\">terms of service</a><span> and </span><a href=\"{{ privacyPolicyUrl }}\" title=\"See privacy policy\" target=\"_blank\">privacy policy</a>."
|
||||
},
|
||||
"EXTERNAL_APP": {
|
||||
"PAGE_TITLE": "An external app requires authentication",
|
||||
"PAGE_DESCRIPTION": "An external app requires authentication",
|
||||
|
|
|
@ -16,16 +16,24 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File: plugins/humanshtml/humanshtml.coffee
|
||||
# File: modules/components/terms-of-service-and-privacy-policy-notice/terms-of-service-and-privacy-policy-notice.directive.coffee
|
||||
###
|
||||
|
||||
# Simple plugin example that extends the urlmappings
|
||||
# and add additional template.
|
||||
|
||||
taiga = @.taiga
|
||||
module = angular.module("taigaPlugins")
|
||||
TermsOfServiceAndPrivacyPolicyNoticeDirective = ($config) ->
|
||||
link = (scope, el, attrs) ->
|
||||
scope.privacyPolicyUrl = $config.get("privacyPolicyUrl")
|
||||
scope.termsOfServiceUrl = $config.get("termsOfServiceUrl")
|
||||
|
||||
configure = ($routeProvider) ->
|
||||
$routeProvider.when("/humans.html", {"templateUrl": "/plugins/humanshtml/templates/humans.html"})
|
||||
return {
|
||||
restrict: "AE",
|
||||
scope: {},
|
||||
link: link,
|
||||
templateUrl: "components/terms-of-service-and-privacy-policy-notice/terms-of-service-and-privacy-policy-notice.html"
|
||||
}
|
||||
|
||||
module.config(["$routeProvider", configure])
|
||||
angular.module("taigaComponents")
|
||||
.directive("tgTermsOfServiceAndPrivacyPolicyNotice", [
|
||||
"$tgConfig",
|
||||
TermsOfServiceAndPrivacyPolicyNoticeDirective
|
||||
])
|
|
@ -0,0 +1,5 @@
|
|||
p.register-text(
|
||||
ng-if="privacyPolicyUrl && termsOfServiceUrl"
|
||||
translate="LEGAL.TERMS_OF_SERVICE_AND_PRIVACY_POLICY_AD"
|
||||
translate-values="{termsOfServiceUrl: termsOfServiceUrl, privacyPolicyUrl: privacyPolicyUrl}"
|
||||
)
|
|
@ -1,25 +1,52 @@
|
|||
form.register-form
|
||||
p.form-header(translate="REGISTER_FORM.TITLE")
|
||||
fieldset
|
||||
input(type="text", tg-capslock, name="username", ng-model="dataRegister.username",
|
||||
data-required="true", data-maxlength="255", data-regexp="^[\\w.-]+$",
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_NAME' | translate}}")
|
||||
input(
|
||||
type="text"
|
||||
name="username"
|
||||
ng-model="dataRegister.username"
|
||||
data-required="true"
|
||||
data-maxlength="255"
|
||||
data-regexp="^[\\w.-]+$"
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_NAME' | translate}}"
|
||||
)
|
||||
|
||||
fieldset
|
||||
input(type="text", name="full_name", ng-model="dataRegister.full_name",
|
||||
data-required="true", data-maxlength="256",
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_FULL_NAME' | translate}}")
|
||||
input(
|
||||
type="text"
|
||||
name="full_name"
|
||||
ng-model="dataRegister.full_name"
|
||||
data-required="true"
|
||||
data-maxlength="256"
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_FULL_NAME' | translate}}"
|
||||
)
|
||||
|
||||
fieldset
|
||||
input(type="text", tg-capslock, name="email", ng-model="dataRegister.email",
|
||||
data-required="true", data-maxlength="255",
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_EMAIL' | translate}}")
|
||||
input(
|
||||
type="text"
|
||||
name="email"
|
||||
ng-model="dataRegister.email"
|
||||
data-required="true"
|
||||
data-maxlength="255"
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_EMAIL' | translate}}"
|
||||
)
|
||||
|
||||
fieldset
|
||||
input(type="password", tg-capslock, name="password", ng-model="dataRegister.password", data-required="true",
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_PASSWORD' | translate}}")
|
||||
input(
|
||||
type="password"
|
||||
name="password"
|
||||
tg-capslock
|
||||
ng-model="dataRegister.password"
|
||||
data-required="true"
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_PASSWORD' | translate}}"
|
||||
)
|
||||
|
||||
fieldset
|
||||
a.button-register.button-blackish.submit-button(type="submit", title="{{'REGISTER_FORM.ACTION_SIGN_UP' | translate}}", translate="REGISTER_FORM.ACTION_SIGN_UP")
|
||||
a.button-register.button-blackish.submit-button(
|
||||
type="submit"
|
||||
title="{{'REGISTER_FORM.ACTION_SIGN_UP' | translate}}"
|
||||
translate="REGISTER_FORM.ACTION_SIGN_UP"
|
||||
)
|
||||
|
||||
tg-terms-notice
|
||||
//- Only displays terms notice when terms plugin is loaded.
|
||||
tg-terms-of-service-and-privacy-policy-notice
|
||||
|
|
|
@ -1,31 +1,63 @@
|
|||
div.register-form-container(tg-register)
|
||||
|
||||
form.register-form
|
||||
fieldset
|
||||
input(type="text", name="username", ng-model="data.username", tg-capslock,
|
||||
data-required="true", data-maxlength="255", data-regexp="^[\\w.-]+$",
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_NAME' | translate}}")
|
||||
input(
|
||||
type="text"
|
||||
name="username"
|
||||
ng-model="data.username"
|
||||
data-required="true"
|
||||
data-maxlength="255"
|
||||
data-regexp="^[\\w.-]+$"
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_NAME' | translate}}"
|
||||
)
|
||||
|
||||
fieldset
|
||||
input(type="text", name="full_name", ng-model="data.full_name",
|
||||
data-required="true", data-maxlength="256",
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_FULL_NAME' | translate}}")
|
||||
input(
|
||||
type="text"
|
||||
name="full_name"
|
||||
ng-model="data.full_name"
|
||||
data-required="true"
|
||||
data-maxlength="256"
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_FULL_NAME' | translate}}"
|
||||
)
|
||||
|
||||
fieldset
|
||||
input(type="text", name="email", ng-model="data.email", tg-capslock,
|
||||
data-required="true", data-maxlength="255",
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_EMAIL' | translate}}")
|
||||
input(
|
||||
type="text"
|
||||
name="email"
|
||||
ng-model="data.email"
|
||||
data-required="true"
|
||||
data-maxlength="255"
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_EMAIL' | translate}}"
|
||||
)
|
||||
|
||||
fieldset
|
||||
input(type="password", name="password", ng-model="data.password", tg-capslock,
|
||||
data-required="true", data-minlength="4",
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_PASSWORD' | translate}}")
|
||||
input(
|
||||
type="password"
|
||||
name="password"
|
||||
tg-capslock
|
||||
ng-model="data.password"
|
||||
data-required="true"
|
||||
data-minlength="4"
|
||||
placeholder="{{'REGISTER_FORM.PLACEHOLDER_PASSWORD' | translate}}"
|
||||
)
|
||||
|
||||
fieldset
|
||||
button.button-register.button-gray.submit-button(type="submit", title="{{'REGISTER_FORM.ACTION_SIGN_UP' | translate}}", translate="REGISTER_FORM.ACTION_SIGN_UP")
|
||||
button.button-register.button-gray.submit-button(
|
||||
type="submit"
|
||||
title="{{'REGISTER_FORM.ACTION_SIGN_UP' | translate}}"
|
||||
translate="REGISTER_FORM.ACTION_SIGN_UP"
|
||||
)
|
||||
|
||||
fieldset(tg-github-login-button)
|
||||
|
||||
// Only displays terms notice when terms plugin is loaded.
|
||||
tg-terms-notice
|
||||
//- Only displays terms notice when terms plugin is loaded.
|
||||
tg-terms-of-service-and-privacy-policy-notice
|
||||
|
||||
a.register-text-top(href="", title="{{'REGISTER_FORM.TITLE_LINK_LOGIN' | translate}}", tg-nav="login", translate="REGISTER_FORM.LINK_LOGIN")
|
||||
a.register-text-top(i
|
||||
href=""
|
||||
title="{{'REGISTER_FORM.TITLE_LINK_LOGIN' | translate}}"
|
||||
tg-nav="login"
|
||||
translate="REGISTER_FORM.LINK_LOGIN"
|
||||
)
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<h2>Team</h2>
|
||||
|
||||
<ul>
|
||||
<li>Andrey Antukh «niwi@niwi.be»</li>
|
||||
<li>Jesus Espino Garcia «jespinog@gmail.com»</li>
|
||||
<li>David Barragán Merino «bameda@dbarragan.com»</li>
|
||||
<li>Xavi Julian «xavier.julian@kaleidos.net»</li>
|
||||
<li>Alejandro Alonso «alejandro.alonso@kaleidos.net»</li>
|
||||
</ul>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
###
|
||||
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
|
||||
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
|
||||
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File: pluggins/main.coffee
|
||||
###
|
||||
|
||||
module = angular.module("taigaPlugins", ["ngRoute"])
|
|
@ -1,53 +0,0 @@
|
|||
###
|
||||
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
|
||||
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
|
||||
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File: plugins/terms/terms.coffee
|
||||
###
|
||||
|
||||
taiga = @.taiga
|
||||
|
||||
module = angular.module("taigaPlugins")
|
||||
|
||||
template = _.template("""
|
||||
<p class="register-text">
|
||||
<span>By clicking "Sign up", you agree to our <br /></span>
|
||||
<a href="<%= termsUrl %>" title="See terms of service" target="_blank"> terms of service</a>
|
||||
<span> and</span>
|
||||
<a href="<%= privacyUrl %>" title="See privacy policy" target="_blank"> privacy policy.</a>
|
||||
</p>""")
|
||||
|
||||
|
||||
TermsNoticeDirective = ($config) ->
|
||||
privacyPolicyUrl = $config.get("privacyPolicyUrl")
|
||||
termsOfServiceUrl = $config.get("termsOfServiceUrl")
|
||||
|
||||
templateFn = ->
|
||||
if not (privacyPolicyUrl and termsOfServiceUrl)
|
||||
return ""
|
||||
|
||||
ctx = {termsUrl: termsOfServiceUrl, privacyUrl: privacyPolicyUrl}
|
||||
return template(ctx)
|
||||
|
||||
return {
|
||||
scope: {}
|
||||
restrict: "AE"
|
||||
template: templateFn
|
||||
}
|
||||
|
||||
|
||||
module.directive("tgTermsNotice", ["$tgConfig", TermsNoticeDirective])
|
21
gulpfile.js
21
gulpfile.js
|
@ -50,7 +50,6 @@ paths.jade = [
|
|||
|
||||
paths.htmlPartials = [
|
||||
paths.tmp + "partials/**/*.html",
|
||||
paths.tmp + "plugins/**/*.html",
|
||||
paths.tmp + "modules/**/*.html",
|
||||
"!" + paths.tmp + "partials/includes/**/*.html",
|
||||
"!" + paths.tmp + "/modules/**/includes/**/*.html"
|
||||
|
@ -82,7 +81,6 @@ paths.styles_dependencies = [
|
|||
paths.css = [
|
||||
paths.tmp + "styles/**/*.css",
|
||||
paths.tmp + "modules/**/*.css",
|
||||
paths.tmp + "plugins/**/*.css"
|
||||
];
|
||||
|
||||
paths.css_order = [
|
||||
|
@ -98,7 +96,6 @@ paths.css_order = [
|
|||
paths.tmp + "styles/modules/**/*.css",
|
||||
paths.tmp + "modules/**/*.css",
|
||||
paths.tmp + "styles/shame/*.css",
|
||||
paths.tmp + "plugins/**/*.css",
|
||||
paths.tmp + "themes/**/*.css"
|
||||
];
|
||||
|
||||
|
@ -130,9 +127,7 @@ paths.coffee_order = [
|
|||
paths.app + "coffee/modules/user-settings/*.coffee",
|
||||
paths.app + "coffee/modules/integrations/*.coffee",
|
||||
paths.app + "modules/**/*.module.coffee",
|
||||
paths.app + "modules/**/*.coffee",
|
||||
paths.app + "plugins/*.coffee",
|
||||
paths.app + "plugins/**/*.coffee"
|
||||
paths.app + "modules/**/*.coffee"
|
||||
];
|
||||
|
||||
paths.libs = [
|
||||
|
@ -485,17 +480,6 @@ gulp.task("copy-theme-images", function() {
|
|||
.pipe(gulp.dest(paths.dist + "/images/" + themes.current.name));
|
||||
});
|
||||
|
||||
gulp.task("copy-images-plugins", function() {
|
||||
return gulp.src(paths.app + "/plugins/**/images/*")
|
||||
.pipe(flatten())
|
||||
.pipe(gulp.dest(paths.dist + "/images/"));
|
||||
});
|
||||
|
||||
gulp.task("copy-plugin-templates", function() {
|
||||
return gulp.src(paths.app + "/plugins/**/templates/**/*.html")
|
||||
.pipe(gulp.dest(paths.dist + "/plugins/"));
|
||||
});
|
||||
|
||||
gulp.task("copy-extras", function() {
|
||||
return gulp.src(paths.extras + "/*")
|
||||
.pipe(gulp.dest(paths.dist + "/"));
|
||||
|
@ -506,8 +490,6 @@ gulp.task("copy", [
|
|||
"copy-theme-fonts",
|
||||
"copy-images",
|
||||
"copy-theme-images",
|
||||
"copy-images-plugins",
|
||||
"copy-plugin-templates",
|
||||
"copy-svg",
|
||||
"copy-theme-svg",
|
||||
"copy-extras"
|
||||
|
@ -527,7 +509,6 @@ gulp.task("express", function() {
|
|||
app.use("/svg", express.static(__dirname + "/dist/svg"));
|
||||
app.use("/partials", express.static(__dirname + "/dist/partials"));
|
||||
app.use("/fonts", express.static(__dirname + "/dist/fonts"));
|
||||
app.use("/plugins", express.static(__dirname + "/dist/plugins"));
|
||||
app.use("/locales", express.static(__dirname + "/dist/locales"));
|
||||
app.use("/maps", express.static(__dirname + "/dist/maps"));
|
||||
|
||||
|
|
Loading…
Reference in New Issue