2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-12-01 14:21:52 +00:00
troggle/templates/renameform.html

77 lines
2.7 KiB
HTML
Raw Normal View History

2023-07-31 13:49:54 +01:00
{% extends "base.html" %}
2023-09-14 12:15:16 +01:00
{% block title %}File rename or rotate form{% endblock %}
2023-07-31 13:49:54 +01:00
{% block content %}
2023-09-14 12:15:16 +01:00
<h2>Renaming or Rotating "{{filename}}"</h2>
2023-07-31 14:16:43 +01:00
<a href="/expofiles/{{filepath|urlencode}}">
2023-07-31 13:49:54 +01:00
<figure class=onleft>
<img src="/expofiles/{{filepath|urlencode}}" width=150px>
2023-07-31 14:16:43 +01:00
<figcaption>filesize: {{filesize}} bytes
</figcaption>
</figure></a>
2023-07-31 20:00:46 +01:00
{% if rename_bad %}
<p style="font-family: monospace; font-weight: bold; color: red; font-size: 130%; text-align: center">
Cannot rename to '{{rename_bad}}' as a file (or a subfolder) of that name already exists here.
</p>
{% endif %}
2023-07-31 13:49:54 +01:00
<div style = "max-width:95%; margin-left:8%; text-align: left; " >
2023-07-31 20:00:46 +01:00
2023-07-31 13:49:54 +01:00
<form method ='post' >
{% csrf_token %}
<br>
<input class="fancybutton2" style="padding: 0.5em 25px; margin-left: 110px "
2023-09-14 12:15:16 +01:00
2023-09-14 13:08:10 +01:00
title="Type in the new name for this file here"
2023-09-14 12:15:16 +01:00
label = "Rename to" name = "renametoname" id="renameto"
2023-07-31 13:49:54 +01:00
pattern="[A-Za-z][A-Za-z0-9_-\.]*"/>
<label
style="padding: 0.5em 25px; margin-left: 110px"
2023-09-14 12:15:16 +01:00
for="renametoname">type in the new name for this file<br></label>
2023-07-31 13:49:54 +01:00
<br><br><br>
2023-09-14 13:08:10 +01:00
<button class="fancybutton2" style="padding: 0.5em 25px; margin-left: 110px" name="rename" type = "submit" title="Renames the file but disallows certain characters and replaces them, e.g. #, &, ?" value = "Rename" >
2023-07-31 13:49:54 +01:00
Rename it
</button>
</form>
2023-09-14 12:15:16 +01:00
<br />
2023-09-22 22:48:35 +01:00
{% if rotatable %}
2023-09-14 12:15:16 +01:00
<form method ='post' >
{% csrf_token %}
2023-09-14 13:08:10 +01:00
<button class="fancybutton2" style="padding: 0.5em 25px; margin-left: 110px" name="rotate" type = "submit" title="Rotates 90 degrees clockwise. JPG and PNG files only." value = "Rotate" >
2023-09-14 12:15:16 +01:00
Rotate it
</button>
</form>
2023-09-22 22:48:35 +01:00
{% else %}
<p style="padding: 0.5em 25px; margin-left: 110px">Not a rotatable image.
{% endif %}
2023-07-31 13:49:54 +01:00
<br /><br /><br />
2023-09-14 12:15:16 +01:00
Full urlencoded path for this file in expofiles is <a href="/expofiles/{{filepath|urlencode}}"><em>{{filepath|urlencode}}</em></a>
2023-09-22 22:48:35 +01:00
<br /><br />
Return to wallet <a href="/walletedit/{{wallet|urlencode}}">{{wallet}}</a>
2023-07-31 13:49:54 +01:00
</div>
<br />
<hr />
2023-09-14 12:15:16 +01:00
{% for np in notpics %}
<a href="/expofilerename/{{walletpath|urlencode}}/{{np|urlencode}}">{{np}}</a> <br />
{% endfor %}
<br />
{% for filename in files %}
<a href="/expofilerename/{{walletpath|urlencode}}/{{filename|urlencode}}">
<figure class=onleft>
<img src="/expofiles/{{walletpath|urlencode}}/{{filename|urlencode}}" width=75px>
<figcaption style="font-variant-caps: normal;">{{filename}}
</figcaption>
</figure></a>
{% empty %}
No files found.<br />
{% endfor %}
2023-07-31 13:49:54 +01:00
{% endblock %}