diff --git a/pillar/web/main/routes.py b/pillar/web/main/routes.py index 410babd1..1f6b8016 100644 --- a/pillar/web/main/routes.py +++ b/pillar/web/main/routes.py @@ -271,6 +271,12 @@ def error_403(): return render_template('errors/403_embed.html') +@blueprint.route('/join-agent') +def join_agent(): + """Custom page to support Agent 327 barbershop campaign""" + return render_template('join.html') + + # Shameful redirects @blueprint.route('/p/blender-cloud/') def redirect_cloud_blog(): diff --git a/src/templates/projects/view.jade b/src/templates/projects/view.jade index d52dfd74..7110524a 100644 --- a/src/templates/projects/view.jade +++ b/src/templates/projects/view.jade @@ -361,7 +361,13 @@ script. if (nodeId.substring(0, 2) == 'n_') { nodeId = nodeId.substr(2); } + + {% if subscription not in ['demo', 'subscriber', 'admin'] and project.url == 'agent-327' %} + var url = '/join-agent'; + {% else %} var url = '/nodes/' + nodeId + '/view'; + // var url = '/join-agent'; + {% endif %} loadNodeContent(url, nodeId); // Determine whether we should push the new state or not.