Servlet-context fixes

This commit is contained in:
Simon Brooke 2018-07-22 09:24:37 +01:00
parent 3463292e3c
commit b7ddc0a443
9 changed files with 9 additions and 16 deletions

View file

@ -63,9 +63,6 @@
<!-- content: put your main page content into this block --> <!-- content: put your main page content into this block -->
{% endblock %} {% endblock %}
</div> </div>
<p>
User: {{user}}
</p>
<br clear="both"/> <br clear="both"/>
</div> </div>
{% block foot %} {% block foot %}

View file

@ -3,7 +3,7 @@
<p> <p>
Use this form to request someone to phone you to discuss your concerns about independence. Use this form to request someone to phone you to discuss your concerns about independence.
</p> </p>
<form action="call-me" method="post"> <form action="{{servlet-context}}/call-me" method="post">
{% csrf-field %} {% csrf-field %}
<p class="widget"> <p class="widget">
<label for="name">Your name</label> <label for="name">Your name</label>

View file

@ -1,7 +1,4 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-followuprequests-Followuprequests.html generated 2018-07-17T07:58:11.329Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %} {% block back-links %}
<div> <div>
@ -31,7 +28,7 @@ Add a new Followuprequest
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<form id='list-followuprequests-Followuprequests' class='list' action='{{servlet-context}}/list-followuprequests-Followuprequests' method='POST'> <form id='issue-expert-list' class='list' action='{{servlet-context}}/issue-expert/list' method='POST'>
{% csrf-field %} {% csrf-field %}
<input id='offset' name='offset' type='hidden' value='{{params.offset|default:0}}'/> <input id='offset' name='offset' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='hidden' value='{{params.limit|default:50}}'/> <input id='limit' name='limit' type='hidden' value='{{params.limit|default:50}}'/>

View file

@ -11,7 +11,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<form action="login" method="post"> <form action="{{servlet-context}}/login" method="post">
{% csrf-field %} {% csrf-field %}
<h2> <h2>
Or use a test username and password Or use a test username and password

View file

@ -2,6 +2,6 @@
{% block big-links %} {% block big-links %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{{motd|safe}} {{content|safe}}
{% endblock %} {% endblock %}

View file

@ -5,7 +5,7 @@
{% block big-links %} {% block big-links %}
{% for role in roles %} {% for role in roles %}
<div class="big-link-container"> <div class="big-link-container">
<a href="roles/{{role.link|lower}}" class="big-link" id="big-link">{{role.name}}</a> <a href="{{servlet-context}}/roles/{{role.link|lower}}" class="big-link" id="big-link">{{role.name}}</a>
</div> </div>
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}

View file

@ -49,9 +49,9 @@
(defn about-page [] (defn about-page []
(layout/render "about.html" {:title (layout/render "md.html" {:title
(str "About " (:site-title env)) (str "About " (:site-title env))
:motd (md-to-html-string (slurp (io/resource "about.md")))})) :content (md-to-html-string (slurp (io/resource "about.md")))}))
(defn call-me-page [request] (defn call-me-page [request]

View file

@ -115,7 +115,7 @@
(defn handle-logout (defn handle-logout
[request] [request]
(let [r (response/found "home")] (let [r (response/found (str (:servlet-context request) "/home"))]
(assoc r :session (dissoc (:session r) :user)))) (assoc r :session (dissoc (:session r) :user))))
@ -123,5 +123,4 @@
(defroutes logged-in-routes (defroutes logged-in-routes
(GET "/logout" request (handle-logout request)) (GET "/logout" request (handle-logout request))
(GET "/profile" request (route/restricted (profile-page request))) (GET "/profile" request (route/restricted (profile-page request)))
(GET "/app" [request] (route/restricted (app-page request))) (GET "/app" [request] (route/restricted (app-page request))))
)