From 59d14c35e06461ef273a784bb1a53ce4d9c1f0f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 09:07:26 +0100 Subject: [PATCH 01/32] adjust UI for REST framework --- .../static/css/rest_framework_tweaks.css | 133 ++++++++++++++++++ publications/static/js/popper.js | 6 + 2 files changed, 139 insertions(+) create mode 100644 publications/static/css/rest_framework_tweaks.css create mode 100644 publications/static/js/popper.js diff --git a/publications/static/css/rest_framework_tweaks.css b/publications/static/css/rest_framework_tweaks.css new file mode 100644 index 0000000..06536fe --- /dev/null +++ b/publications/static/css/rest_framework_tweaks.css @@ -0,0 +1,133 @@ +/* +https://github.com/encode/django-rest-framework/blob/master/rest_framework/static/rest_framework/css/bootstrap-tweaks.css +*/ + +ul.breadcrumb { + margin: 20px 0; + font-weight: bold; +} + +.breadcrumb li.active a { + color: #777; + padding: 0 10px; +} + +body a { + color: #158F9B; +} + +body a:hover { + color: #278189; +} + +.pagination>.disabled>a, +.pagination>.disabled>a:hover, +.pagination>.disabled>a:focus { + cursor: not-allowed; + pointer-events: none; +} + +.pager>.disabled>a, +.pager>.disabled>a:hover, +.pager>.disabled>a:focus { + pointer-events: none; +} + +.pager .next { + margin-left: 10px; +} + +html, body { + height: 100%; +} + +.wrapper { + position: relative; + top: 0; + left: 0; + padding-top: 60px; + margin: -60px 0; + min-height: 100%; +} + +.form-switcher { + margin-bottom: 0; +} + +.well { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.well .form-actions { + padding-bottom: 0; + margin-bottom: 0; +} + +.well form { + margin-bottom: 0; +} + +.nav-tabs { + border: 0; +} + +.nav-tabs>li { + float: right; +} + +.nav-tabs li a { + margin-right: 0; +} + +.nav-tabs>.active>a { + background: #F5F5F5; +} + +.nav-tabs>.active>a:hover { + background: #F5F5F5; +} + +.tabbable.first-tab-active .tab-content { + border-top-right-radius: 0; +} + +.page-header { + border-bottom: none; + padding-bottom: 0px; + margin: 0; +} + +/* custom general page styles */ +.hero-unit h1, .hero-unit h2 { + color: #A30000; +} + + +.request-info { + clear: both; +} + +.horizontal-checkbox label { + padding-top: 0; +} + +.horizontal-checkbox label { + padding-top: 0 !important; +} + +.horizontal-checkbox input { + float: left; + width: 20px; + margin-top: 3px; +} + +.modal-footer form { + margin-left: 5px; + margin-right: 5px; +} + +.pagination { + margin: 5px 0 10px 0; +} \ No newline at end of file diff --git a/publications/static/js/popper.js b/publications/static/js/popper.js new file mode 100644 index 0000000..1fb2256 --- /dev/null +++ b/publications/static/js/popper.js @@ -0,0 +1,6 @@ +/** + * @popperjs/core v2.11.6 - MIT License + */ + +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}var i=Math.max,a=Math.min,s=Math.round;function f(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function c(){return!/^((?!chrome|android).)*safari/i.test(f())}function p(e,o,i){void 0===o&&(o=!1),void 0===i&&(i=!1);var a=e.getBoundingClientRect(),f=1,p=1;o&&r(e)&&(f=e.offsetWidth>0&&s(a.width)/e.offsetWidth||1,p=e.offsetHeight>0&&s(a.height)/e.offsetHeight||1);var u=(n(e)?t(e):window).visualViewport,l=!c()&&i,d=(a.left+(l&&u?u.offsetLeft:0))/f,h=(a.top+(l&&u?u.offsetTop:0))/p,m=a.width/f,v=a.height/p;return{width:m,height:v,top:h,right:d+m,bottom:h+v,left:d,x:d,y:h}}function u(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function l(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function h(e){return p(d(e)).left+u(e).scrollLeft}function m(e){return t(e).getComputedStyle(e)}function v(e){var t=m(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function y(e,n,o){void 0===o&&(o=!1);var i,a,f=r(n),c=r(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,r=s(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(n),m=d(n),y=p(e,c,o),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(f||!f&&!o)&&(("body"!==l(n)||v(m))&&(g=(i=n)!==t(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:u(i)),r(n)?((b=p(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):m&&(b.x=h(m))),{x:y.left+g.scrollLeft-b.x,y:y.top+g.scrollTop-b.y,width:y.width,height:y.height}}function g(e){var t=p(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function b(e){return"html"===l(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||d(e)}function w(e){return["html","body","#document"].indexOf(l(e))>=0?e.ownerDocument.body:r(e)&&v(e)?e:w(b(e))}function x(e,n){var r;void 0===n&&(n=[]);var o=w(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],v(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(x(b(s)))}function O(e){return["table","td","th"].indexOf(l(e))>=0}function j(e){return r(e)&&"fixed"!==m(e).position?e.offsetParent:null}function E(e){for(var n=t(e),i=j(e);i&&O(i)&&"static"===m(i).position;)i=j(i);return i&&("html"===l(i)||"body"===l(i)&&"static"===m(i).position)?n:i||function(e){var t=/firefox/i.test(f());if(/Trident/i.test(f())&&r(e)&&"fixed"===m(e).position)return null;var n=b(e);for(o(n)&&(n=n.host);r(n)&&["html","body"].indexOf(l(n))<0;){var i=m(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var D="top",A="bottom",L="right",P="left",M="auto",k=[D,A,L,P],W="start",B="end",H="viewport",T="popper",R=k.reduce((function(e,t){return e.concat([t+"-"+W,t+"-"+B])}),[]),S=[].concat(k,[M]).reduce((function(e,t){return e.concat([t,t+"-"+W,t+"-"+B])}),[]),V=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function C(e){return e.split("-")[0]}function N(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function I(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _(e,r,o){return r===H?I(function(e,n){var r=t(e),o=d(e),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,f=0,p=0;if(i){a=i.width,s=i.height;var u=c();(u||!u&&"fixed"===n)&&(f=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:f+h(e),y:p}}(e,o)):n(r)?function(e,t){var n=p(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(r,o):I(function(e){var t,n=d(e),r=u(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=i(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=i(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-r.scrollLeft+h(e),c=-r.scrollTop;return"rtl"===m(o||n).direction&&(f+=i(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:f,y:c}}(d(e)))}function F(e,t,o,s){var f="clippingParents"===t?function(e){var t=x(b(e)),o=["absolute","fixed"].indexOf(m(e).position)>=0&&r(e)?E(e):e;return n(o)?t.filter((function(e){return n(e)&&N(e,o)&&"body"!==l(e)})):[]}(e):[].concat(t),c=[].concat(f,[o]),p=c[0],u=c.reduce((function(t,n){var r=_(e,n,s);return t.top=i(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=i(r.left,t.left),t}),_(e,p,s));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function U(e){return e.split("-")[1]}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?C(o):null,a=o?U(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case D:t={x:s,y:n.y-r.height};break;case A:t={x:s,y:n.y+n.height};break;case L:t={x:n.x+n.width,y:f};break;case P:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?z(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case W:t[c]=t[c]-(n[p]/2-r[p]/2);break;case B:t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}function Y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function J(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,a=r.strategy,s=void 0===a?e.strategy:a,f=r.boundary,c=void 0===f?"clippingParents":f,u=r.rootBoundary,l=void 0===u?H:u,h=r.elementContext,m=void 0===h?T:h,v=r.altBoundary,y=void 0!==v&&v,g=r.padding,b=void 0===g?0:g,w=Y("number"!=typeof b?b:G(b,k)),x=m===T?"reference":T,O=e.rects.popper,j=e.elements[y?x:m],E=F(n(j)?j:j.contextElement||d(e.elements.popper),c,l,s),P=p(e.elements.reference),M=X({reference:P,element:O,strategy:"absolute",placement:i}),W=I(Object.assign({},O,M)),B=m===T?W:P,R={top:E.top-B.top+w.top,bottom:B.bottom-E.bottom+w.bottom,left:E.left-B.left+w.left,right:B.right-E.right+w.right},S=e.modifiersData.offset;if(m===T&&S){var V=S[i];Object.keys(R).forEach((function(e){var t=[L,A].indexOf(e)>=0?1:-1,n=[D,A].indexOf(e)>=0?"y":"x";R[e]+=V[n]*t}))}return R}var K={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,L].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function fe(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var ce={start:"end",end:"start"};function pe(e){return e.replace(/start|end/g,(function(e){return ce[e]}))}function ue(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=void 0===f?S:f,p=U(r),u=p?s?R:R.filter((function(e){return U(e)===p})):k,l=u.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=u);var d=l.reduce((function(t,n){return t[n]=J(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[C(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var le={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,y=C(v),g=f||(y===v||!h?[fe(v)]:function(e){if(C(e)===M)return[];var t=fe(e);return[pe(e),t,pe(t)]}(v)),b=[v].concat(g).reduce((function(e,n){return e.concat(C(n)===M?ue(t,{placement:n,boundary:p,rootBoundary:u,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,x=t.rects.popper,O=new Map,j=!0,E=b[0],k=0;k=0,S=R?"width":"height",V=J(t,{placement:B,boundary:p,rootBoundary:u,altBoundary:l,padding:c}),q=R?T?L:P:T?A:D;w[S]>x[S]&&(q=fe(q));var N=fe(q),I=[];if(i&&I.push(V[H]<=0),s&&I.push(V[q]<=0,V[N]<=0),I.every((function(e){return e}))){E=B,j=!1;break}O.set(B,I)}if(j)for(var _=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},F=h?3:1;F>0;F--){if("break"===_(F))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function de(e,t,n){return i(e,a(t,n))}var he={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=void 0===o||o,f=n.altAxis,c=void 0!==f&&f,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.padding,h=n.tether,m=void 0===h||h,v=n.tetherOffset,y=void 0===v?0:v,b=J(t,{boundary:p,rootBoundary:u,padding:d,altBoundary:l}),w=C(t.placement),x=U(t.placement),O=!x,j=z(w),M="x"===j?"y":"x",k=t.modifiersData.popperOffsets,B=t.rects.reference,H=t.rects.popper,T="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,R="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(k){if(s){var q,N="y"===j?D:P,I="y"===j?A:L,_="y"===j?"height":"width",F=k[j],X=F+b[N],Y=F-b[I],G=m?-H[_]/2:0,K=x===W?B[_]:H[_],Q=x===W?-H[_]:-B[_],Z=t.elements.arrow,$=m&&Z?g(Z):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[N],ne=ee[I],re=de(0,B[_],$[_]),oe=O?B[_]/2-G-re-te-R.mainAxis:K-re-te-R.mainAxis,ie=O?-B[_]/2+G+re+ne+R.mainAxis:Q+re+ne+R.mainAxis,ae=t.elements.arrow&&E(t.elements.arrow),se=ae?"y"===j?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(q=null==S?void 0:S[j])?q:0,ce=F+ie-fe,pe=de(m?a(X,F+oe-fe-se):X,F,m?i(Y,ce):Y);k[j]=pe,V[j]=pe-F}if(c){var ue,le="x"===j?D:P,he="x"===j?A:L,me=k[M],ve="y"===M?"height":"width",ye=me+b[le],ge=me-b[he],be=-1!==[D,P].indexOf(w),we=null!=(ue=null==S?void 0:S[M])?ue:0,xe=be?ye:me-B[ve]-H[ve]-we+R.altAxis,Oe=be?me+B[ve]+H[ve]-we-R.altAxis:ge,je=m&&be?function(e,t,n){var r=de(e,t,n);return r>n?n:r}(xe,me,Oe):de(m?xe:ye,me,m?Oe:ge);k[M]=je,V[M]=je-me}t.modifiersData[r]=V}},requiresIfExists:["offset"]};var me={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=C(n.placement),f=z(s),c=[P,L].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return Y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,k))}(o.padding,n),u=g(i),l="y"===f?D:P,d="y"===f?A:L,h=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],m=a[f]-n.rects.reference[f],v=E(i),y=v?"y"===f?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,w=p[l],x=y-u[c]-p[d],O=y/2-u[c]/2+b,j=de(w,O,x),M=f;n.modifiersData[r]=((t={})[M]=j,t.centerOffset=j-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&N(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ve(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ye(e){return[D,L,A,P].some((function(t){return e[t]>=0}))}var ge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=J(t,{elementContext:"reference"}),s=J(t,{altBoundary:!0}),f=ve(a,r),c=ve(s,o,i),p=ye(f),u=ye(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}},be=Z({defaultModifiers:[ee,te,oe,ie]}),we=[ee,te,oe,ie,ae,le,he,me,ge],xe=Z({defaultModifiers:we});e.applyStyles=ie,e.arrow=me,e.computeStyles=oe,e.createPopper=xe,e.createPopperLite=be,e.defaultModifiers=we,e.detectOverflow=J,e.eventListeners=ee,e.flip=le,e.hide=ge,e.offset=ae,e.popperGenerator=Z,e.popperOffsets=te,e.preventOverflow=he,Object.defineProperty(e,"__esModule",{value:!0})})); +//# sourceMappingURL=popper.min.js.map From f77bf46a17a6887026a24c4372f38b777d36ae3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 09:07:41 +0100 Subject: [PATCH 02/32] fix for problem install backports.zoneinfo on Pyton 3.10.x https://stackoverflow.com/questions/71712258/error-could-not-build-wheels-for-backports-zoneinfo-which-is-required-to-insta --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 831864d..3e75167 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ arrow==1.2.3 asgiref==3.5.2 -backports.zoneinfo==0.2.1 +backports.zoneinfo==0.2.1;python_version<"3.9" blessed==1.19.1 beautifulsoup4==4.11.1 certifi==2022.9.24 From 4354d7d4bcaac69dcb4e80a554129bc204231bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 09:34:03 +0100 Subject: [PATCH 03/32] fix indentation --- publications/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publications/views.py b/publications/views.py index ad8d742..c40d7cf 100644 --- a/publications/views.py +++ b/publications/views.py @@ -105,7 +105,7 @@ def delete_account(request): def change_useremail(request): email_new = request.POST.get('email_new', False) currentuser = request.user - email_old = currentuser.email + email_old = currentuser.email if email_new: currentuser.email = email_new From e88c1b86870ed0689c60cdadfbca60b348503b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 09:34:19 +0100 Subject: [PATCH 04/32] ignore output dir of manage.py collectstatic --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 2a4e088..cb0b8f4 100644 --- a/.gitignore +++ b/.gitignore @@ -134,3 +134,5 @@ geodjango/ tests-ui/screenshots/ + +static/ From cfba81d408b4cd9494ab23d58cd8b9fec5caa793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 09:34:27 +0100 Subject: [PATCH 05/32] makemigrations --- .../0004_ojsservers_subscription_and_more.py | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 publications/migrations/0004_ojsservers_subscription_and_more.py diff --git a/publications/migrations/0004_ojsservers_subscription_and_more.py b/publications/migrations/0004_ojsservers_subscription_and_more.py new file mode 100644 index 0000000..0705d85 --- /dev/null +++ b/publications/migrations/0004_ojsservers_subscription_and_more.py @@ -0,0 +1,79 @@ +# Generated by Django 4.0.5 on 2022-12-23 08:10 + +import django.contrib.gis.db.models.fields +import django.contrib.postgres.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('publications', '0003_publication_journal'), + ] + + operations = [ + migrations.CreateModel( + name='OJSservers', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('url_field', models.URLField()), + ('harvest_interval_minutes', models.IntegerField(default=4320)), + ('last_harvest', models.DateTimeField(auto_now_add=True, null=True)), + ], + ), + migrations.CreateModel( + name='Subscription', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('search_text', models.CharField(max_length=4096)), + ('timeperiod_startdate', models.DateField(null=True)), + ('timeperiod_enddate', models.DateField(null=True)), + ('search_area', django.contrib.gis.db.models.fields.GeometryCollectionField(blank=True, null=True, srid=4326)), + ('user_name', models.CharField(max_length=4096)), + ], + options={ + 'verbose_name': 'subscription', + 'ordering': ['user_name'], + }, + ), + migrations.AddField( + model_name='publication', + name='timeperiod_enddate', + field=django.contrib.postgres.fields.ArrayField(base_field=models.DateField(null=True), null=True, size=None), + ), + migrations.AddField( + model_name='publication', + name='timeperiod_startdate', + field=django.contrib.postgres.fields.ArrayField(base_field=models.DateField(null=True), null=True, size=None), + ), + migrations.AlterField( + model_name='publication', + name='abstract', + field=models.TextField(null=True), + ), + migrations.AlterField( + model_name='publication', + name='creationDate', + field=models.DateTimeField(auto_now_add=True, null=True), + ), + migrations.AlterField( + model_name='publication', + name='geometry', + field=django.contrib.gis.db.models.fields.GeometryCollectionField(blank=True, null=True, srid=4326, verbose_name='Publication geometry (Points, Lines, Polygons as GeoJSON)'), + ), + migrations.AlterField( + model_name='publication', + name='lastUpdate', + field=models.DateTimeField(auto_now=True, null=True), + ), + migrations.AlterField( + model_name='publication', + name='publicationDate', + field=models.DateField(null=True), + ), + migrations.AlterField( + model_name='publication', + name='title', + field=models.CharField(max_length=4096, null=True), + ), + ] From b60c0ecb996fa17853538d1bfa20e0b2d5963815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 09:57:12 +0100 Subject: [PATCH 06/32] update required fields and remove SQL test data --- README.md | 4 +- fixtures/test_data.json | 10 +++- fixtures/test_data.sql | 48 --------------- publications/admin.py | 5 -- ...005_alter_publication_abstract_and_more.py | 59 +++++++++++++++++++ publications/models.py | 22 +++---- 6 files changed, 80 insertions(+), 68 deletions(-) delete mode 100644 fixtures/test_data.sql create mode 100644 publications/migrations/0005_alter_publication_abstract_and_more.py diff --git a/README.md b/README.md index b68f711..6eed6aa 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ The folder `/fixtures` contains some test data, either as an SQL command to inse python manage.py dumpdata --exclude=auth --exclude=contenttypes | jq > fixtures/test_data.json # load: -python manage.py loaddata fixtures/test_data.json +python manage.py loaddata fixtures/test_data.sql ``` ### Run locally @@ -149,8 +149,6 @@ python -Wa manage.py test # running UI tests needs either compose configuration or a manage.py runserver in a seperate shell docker-compose up --build -# TODO insert test data - python -Wa manage.py test tests-ui ``` diff --git a/fixtures/test_data.json b/fixtures/test_data.json index 20bcdc7..8017e5b 100644 --- a/fixtures/test_data.json +++ b/fixtures/test_data.json @@ -10,7 +10,10 @@ "url": null, "geometry": "SRID=4326;GEOMETRYCOLLECTION (POINT (7.595730774920725 51.96944097112328), POLYGON ((7.599984296478425 51.984257653537384, 7.5715788777530975 51.97057414651397, 7.570122189613329 51.950602187631205, 7.580319006590855 51.93825551711683, 7.609054957094401 51.93035649564658, 7.659674869951374 51.942256350721436, 7.6833460522228165 51.968514669138415, 7.665137450475669 51.99229098076532, 7.626171042736502 51.98982421450293, 7.599984296478425 51.984257653537384)))", "creationDate": "2022-10-24T12:10:53.086Z", - "lastUpdate": "2022-10-24T12:10:53.086Z" + "lastUpdate": "2022-10-24T12:10:53.086Z", + "journal": "OPTIMAP Test Journal", + "timeperiod_startdate": "[\"2020-02-02\"]", + "timeperiod_enddate": "[\"2022-02-20\"]" } }, { @@ -24,7 +27,10 @@ "url": "http://paper.url/two", "geometry": "SRID=4326;GEOMETRYCOLLECTION (LINESTRING (9.754609563397707 52.36630414438588, 9.813062794192035 52.41569645624003, 10.141300167111496 52.36904961184797, 10.518997966087937 52.330597538337116, 10.838242534270051 52.311358956793185, 11.058566250338231 52.220550088821824, 11.535184901427073 52.15714903642342, 12.272594889905236 52.24258143981572, 12.618817872299417 52.35532056817789, 12.911084026269464 52.2976119913985, 13.144896949445211 52.50063147184562, 13.396695482095708 52.517051586549286))", "creationDate": "2022-10-24T12:10:53.086Z", - "lastUpdate": "2022-10-24T12:10:53.086Z" + "lastUpdate": "2022-10-24T12:10:53.086Z", + "journal": "OPTIMAP Test Journal", + "timeperiod_startdate": "[\"2010-01-01\"]", + "timeperiod_enddate": "[\"2012-12-12\"]" } } ] diff --git a/fixtures/test_data.sql b/fixtures/test_data.sql deleted file mode 100644 index 2d13325..0000000 --- a/fixtures/test_data.sql +++ /dev/null @@ -1,48 +0,0 @@ --- Draw geometry at https://geojson.io/#map=10.92/51.902/7.6702 --- possibly need to convert to GeometryCollection from FeatureCollection if we face that in GeoJSON the wild: https://gis.stackexchange.com/questions/177254/create-a-geosgeometry-from-a-featurecollection-in-geodangoINSERT INTO public.publications_publication VALUES - -INSERT INTO public.publications_publication VALUES - (1, 'The First Article', 'This is the first article. It is good in Münster.', '2010-10-10 10:10:10',NULL, 'https://service.tib.eu/optimeta/index.php/optimeta/article/view/8' , ST_GeomFromGeoJSON(' - { - "type": "GeometryCollection", - "geometries": [{ - "coordinates": [7.595730774920725,51.96944097112328], - "type": "Point", - "crs":{"type":"name","properties":{"name":"EPSG:4326"}} - }, { - "type": "Polygon", - "coordinates": [[ - [7.599984296478425,51.984257653537384], - [7.5715788777530975,51.97057414651397], - [7.570122189613329,51.950602187631205], - [7.580319006590855,51.93825551711683], - [7.609054957094401,51.93035649564658], - [7.659674869951374,51.942256350721436], - [7.6833460522228165,51.968514669138415], - [7.665137450475669,51.99229098076532], - [7.626171042736502,51.98982421450293], - [7.599984296478425,51.984257653537384] - ]] - }] - }'),'Journal of Optimal Geolocations', now(), now(), '{"2022-06-01"}','{"2022-06-08"}'), - (2, 'Paper Two', 'A second article. It is better; from Hanover to Berlin.', '2011-11-11 11:11:11','10.5555/12345678', NULL , ST_GeomFromGeoJSON(' - { - "type": "GeometryCollection", - "geometries": [{ - "type": "LineString", - "coordinates": [ - [9.754609563397707,52.36630414438588], - [9.813062794192035,52.41569645624003], - [10.141300167111496,52.36904961184797], - [10.518997966087937,52.330597538337116], - [10.838242534270051,52.311358956793185], - [11.058566250338231,52.220550088821824], - [11.535184901427073,52.15714903642342], - [12.272594889905236,52.24258143981572], - [12.618817872299417,52.35532056817789], - [12.911084026269464,52.2976119913985], - [13.144896949445211,52.50063147184562], - [13.396695482095708,52.517051586549286] - ] - }] - }'), 'Journal of Optimal Geolocations',now(), now(), '{"2022-02-01"}','{"2022-03-31"}') diff --git a/publications/admin.py b/publications/admin.py index d685131..6075839 100644 --- a/publications/admin.py +++ b/publications/admin.py @@ -1,14 +1,9 @@ -from django.contrib import admin -"""Markers admin.""" - from django.contrib.gis import admin from publications.models import Publication - @admin.register(Publication) class PublicationAdmin(admin.OSMGeoAdmin): """Publication Admin.""" list_display = ("title", "publicationDate", "creationDate", "lastUpdate") -# Register your models here. diff --git a/publications/migrations/0005_alter_publication_abstract_and_more.py b/publications/migrations/0005_alter_publication_abstract_and_more.py new file mode 100644 index 0000000..aec7c9a --- /dev/null +++ b/publications/migrations/0005_alter_publication_abstract_and_more.py @@ -0,0 +1,59 @@ +# Generated by Django 4.0.5 on 2022-12-23 08:48 + +import django.contrib.postgres.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('publications', '0004_ojsservers_subscription_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='publication', + name='abstract', + field=models.TextField(blank=True, null=True), + ), + migrations.AlterField( + model_name='publication', + name='creationDate', + field=models.DateTimeField(auto_now=True), + ), + migrations.AlterField( + model_name='publication', + name='doi', + field=models.CharField(blank=True, max_length=1024, null=True), + ), + migrations.AlterField( + model_name='publication', + name='journal', + field=models.CharField(blank=True, max_length=1024, null=True), + ), + migrations.AlterField( + model_name='publication', + name='lastUpdate', + field=models.DateTimeField(auto_now=True), + ), + migrations.AlterField( + model_name='publication', + name='timeperiod_enddate', + field=django.contrib.postgres.fields.ArrayField(base_field=models.DateField(null=True), blank=True, null=True, size=None), + ), + migrations.AlterField( + model_name='publication', + name='timeperiod_startdate', + field=django.contrib.postgres.fields.ArrayField(base_field=models.DateField(null=True), blank=True, null=True, size=None), + ), + migrations.AlterField( + model_name='publication', + name='title', + field=models.CharField(max_length=4096), + ), + migrations.AlterField( + model_name='publication', + name='url', + field=models.URLField(blank=True, max_length=1024, null=True), + ), + ] diff --git a/publications/models.py b/publications/models.py index 2170bf2..ad3543e 100644 --- a/publications/models.py +++ b/publications/models.py @@ -3,18 +3,20 @@ class Publication(models.Model): - - title = models.CharField(max_length=4096,null =True) - abstract = models.TextField(null=True) + # required fields + title = models.CharField(max_length=4096) publicationDate = models.DateField(null=True) - doi = models.CharField(max_length=1024, null=True) - url = models.URLField(max_length=1024, null=True) + creationDate = models.DateTimeField(auto_now_add=True) + lastUpdate = models.DateTimeField(auto_now=True) + + # possibly blank fields + abstract = models.TextField(null=True, blank=True) + doi = models.CharField(max_length=1024, null=True, blank=True) + url = models.URLField(max_length=1024, null=True, blank=True) geometry = models.GeometryCollectionField(verbose_name='Publication geometry (Points, Lines, Polygons as GeoJSON)',srid = 4326, null=True, blank=True) - journal = models.CharField(max_length=1024, null=True) - creationDate = models.DateTimeField(auto_now_add=True,null=True) - lastUpdate = models.DateTimeField(auto_now=True,null=True) - timeperiod_startdate = ArrayField(models.DateField(null=True), null=True) - timeperiod_enddate = ArrayField(models.DateField(null=True), null=True) + journal = models.CharField(max_length=1024, null=True, blank=True) + timeperiod_startdate = ArrayField(models.DateField(null=True), null=True, blank=True) + timeperiod_enddate = ArrayField(models.DateField(null=True), null=True, blank=True) def __str__(self): """Return string representation.""" From 8ad177601327a6b2c5edb5a54a88850b4e22533f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 10:00:29 +0100 Subject: [PATCH 07/32] fix favicon for admin UI --- publications/templates/admin/base_site.html | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 publications/templates/admin/base_site.html diff --git a/publications/templates/admin/base_site.html b/publications/templates/admin/base_site.html new file mode 100644 index 0000000..9f71327 --- /dev/null +++ b/publications/templates/admin/base_site.html @@ -0,0 +1,5 @@ +{% extends "admin/base_site.html" %} +{% load static %} +{% block extrahead %} + +{% endblock %} From 4e2324f477cd408a04795373a3c4df52489a96f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 10:02:19 +0100 Subject: [PATCH 08/32] have main menu on privacy page --- publications/templates/privacy.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publications/templates/privacy.html b/publications/templates/privacy.html index 916b74a..4102471 100644 --- a/publications/templates/privacy.html +++ b/publications/templates/privacy.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "main.html" %} {% block title %}Privacy policy and imprint | {% endblock %} From 68e4dd88c107a183c87dbddd063adec22a55d9b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 10:17:08 +0100 Subject: [PATCH 09/32] add OPTITMAP logo to admin site --- publications/templates/admin/base_site.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/publications/templates/admin/base_site.html b/publications/templates/admin/base_site.html index 9f71327..9f8a684 100644 --- a/publications/templates/admin/base_site.html +++ b/publications/templates/admin/base_site.html @@ -1,5 +1,17 @@ {% extends "admin/base_site.html" %} {% load static %} + +{% comment %} +See https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/base_site.html +{% endcomment %} + {% block extrahead %} {% endblock %} + +{% block branding %} +

OPTIMAP logo ADMIN

+{% if user.is_anonymous %} + {% include "admin/color_theme_toggle.html" %} +{% endif %} +{% endblock %} From 13b41ae5d4a7e0606f4e82e1317eaeb4a59fcda5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 10:17:26 +0100 Subject: [PATCH 10/32] so admin link to superusers, closes #77 --- publications/templates/main.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/publications/templates/main.html b/publications/templates/main.html index 9abbd9b..a820c5d 100644 --- a/publications/templates/main.html +++ b/publications/templates/main.html @@ -21,7 +21,12 @@ {{user.email}}
  • Settings
  • -
  • Subscription
  • +
  • Subscriptions
  • + {% if user.is_superuser %} + +
  • Admin
  • + {% endif %} +
  • Logout
  • @@ -48,8 +53,9 @@ - {% endif %} -{% endblock %} + {% endif %} + +{% endblock navbar %} {% block content %}
    @@ -69,7 +75,7 @@
    -{% endblock %} +{% endblock content %} {% block scripts %} From 0f3f87c9a2b967ac3b03cfb1bb66ab5548ac3d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 10:32:12 +0100 Subject: [PATCH 11/32] show user button on data page --- publications/templates/data.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publications/templates/data.html b/publications/templates/data.html index 758ae12..54f400e 100644 --- a/publications/templates/data.html +++ b/publications/templates/data.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "main.html" %} {% load optimeta_extras %} From 536d80beb6079c71bfca70d51877b2408f21f323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 10:37:10 +0100 Subject: [PATCH 12/32] use leaflet admin in the backend --- optimetaPortal/settings.py | 1 + publications/admin.py | 6 +++--- publications/models.py | 2 +- requirements.txt | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/optimetaPortal/settings.py b/optimetaPortal/settings.py index acd9b82..62c16eb 100644 --- a/optimetaPortal/settings.py +++ b/optimetaPortal/settings.py @@ -61,6 +61,7 @@ 'django_q', 'drf_spectacular', 'drf_spectacular_sidecar', + 'leaflet' # used in admin site ] REST_FRAMEWORK = { diff --git a/publications/admin.py b/publications/admin.py index 6075839..3bce120 100644 --- a/publications/admin.py +++ b/publications/admin.py @@ -1,9 +1,9 @@ -from django.contrib.gis import admin - +from django.contrib import admin +from leaflet.admin import LeafletGeoAdmin from publications.models import Publication @admin.register(Publication) -class PublicationAdmin(admin.OSMGeoAdmin): +class PublicationAdmin(LeafletGeoAdmin): """Publication Admin.""" list_display = ("title", "publicationDate", "creationDate", "lastUpdate") diff --git a/publications/models.py b/publications/models.py index ad3543e..bc4770e 100644 --- a/publications/models.py +++ b/publications/models.py @@ -13,7 +13,7 @@ class Publication(models.Model): abstract = models.TextField(null=True, blank=True) doi = models.CharField(max_length=1024, null=True, blank=True) url = models.URLField(max_length=1024, null=True, blank=True) - geometry = models.GeometryCollectionField(verbose_name='Publication geometry (Points, Lines, Polygons as GeoJSON)',srid = 4326, null=True, blank=True) + geometry = models.GeometryCollectionField(verbose_name='Publication geometry/ies', srid = 4326, null=True, blank=True) journal = models.CharField(max_length=1024, null=True, blank=True) timeperiod_startdate = ArrayField(models.DateField(null=True), null=True, blank=True) timeperiod_enddate = ArrayField(models.DateField(null=True), null=True, blank=True) diff --git a/requirements.txt b/requirements.txt index 3e75167..c143e4a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ charset-normalizer==2.1.1 Django==4.0.5 django-environ==0.9.0 django-filter==21.1 +django-leaflet==0.28.3 django-magiclink==1.2.0 django-picklefield==3.1 django-q==1.3.9 From bfadc0ecb597876ecc067f55034f9626a9b84d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 23 Dec 2022 10:52:42 +0100 Subject: [PATCH 13/32] add .ico version of the favicon as fallback --- publications/static/favicon.ico | Bin 0 -> 11571 bytes publications/urls.py | 2 ++ 2 files changed, 2 insertions(+) create mode 100644 publications/static/favicon.ico diff --git a/publications/static/favicon.ico b/publications/static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..1363dd2e2f66d05a9d7305d5e2b36045671a699b GIT binary patch literal 11571 zcmV-3EzHsY00962000000096X039s=02TlM0EtjeM-2)Z3IG5A4M|8uQUCw}00001 z00;&E003NasAd2F00D1uPE-NUqIa4A04&!@L_t(|+U2lrRV9D8$PDC4>hfml3_tKM9!sl)g zyAOOrZr*)~TCx6p;d@@8vS&X<4jX+I>(q6v!RhR)GZ;+p)&T&yiLTeObfK zI(znW^y@2=YWKDa_V0U(fWe249PH(eMWF}4h1GTg0R!S1Sg^So$c$pZN^&LHL4uCWO z(!-}W=sBiCr&4Cg$}g~rvo+~R{CnJlqvxv06&v0#b?%mfqMRTlfRuxYX1cQz?|X(Q zEUN<2HxooGICPyDGx0$kPB0)f0L=rpT1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V<%pELYw3-J$X}acXohP1OO5M*Q3{?ScSG4 zi((aLs|>B%jfK?%01}6RA2H@7R6DPk8vp)7Hp8+301_c|W?=UG3!2#dv!89K5M z-aG)H9wk8W*|Xl4#q=LP`6Rq?06=9h7z}1^-r~=olP>^}u1dgUbhEjulhRBC&sp&l zGBw~W0{|+93CG*BYc}7Il>93X{iKS l6%gACFB@FY&?BAk{{diUk|pExk<0)9002ovPDHLkV1ju|D`o%y literal 0 HcmV?d00001 diff --git a/publications/urls.py b/publications/urls.py index fd5981e..00ffe55 100644 --- a/publications/urls.py +++ b/publications/urls.py @@ -1,6 +1,7 @@ """OPTIMAP urls.""" from django.urls import path,include +from django.shortcuts import redirect from publications.views import privacypolicy,Confirmationlogin,loginres,optimap,autheticate_via_magic_link,customlogout,user_settings,user_subscriptions,delete_account,change_useremail,data,add_subscriptions from .feeds import OptimetaFeed from .feeds import atomFeed @@ -10,6 +11,7 @@ urlpatterns = [ path('', optimap, name="home"), + path('favicon.ico', lambda request: redirect('static/favicon.ico', permanent=True)), path("api/", include("publications.api")), path('api/schema/', SpectacularAPIView.as_view(), name='schema'), path('api/schema/ui/', SpectacularRedocView.as_view(url_name='optimap:schema'), name='redoc'), From 30a34aa2267c127e9f119c16f9947405c434f742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20N=C3=BCst?= Date: Fri, 27 Jan 2023 10:36:43 +0100 Subject: [PATCH 14/32] add tagline --- publications/static/css/main.css | 7 +++++++ publications/templates/base.html | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/publications/static/css/main.css b/publications/static/css/main.css index f07afc0..60e0bb7 100644 --- a/publications/static/css/main.css +++ b/publications/static/css/main.css @@ -18,6 +18,13 @@ main { background-color: #158F9B; } +.tagline { + font-weight: 800; + font-size: 1.6em; + box-sizing: unset; + font-style: italic; +} + #sidebar { float: left; height: 100%; diff --git a/publications/templates/base.html b/publications/templates/base.html index abcf397..c451ef7 100644 --- a/publications/templates/base.html +++ b/publications/templates/base.html @@ -25,11 +25,13 @@