margin-right: 1em;
}
-[id$="/[attachment]"] input[type=radio].tab ~ ul.attachment.list.tab {
+[id$="/[attachment]"] input[type=radio].tab ~ div.tab {
display: block;
- margin-left: 0;
padding-top: 1em;
+}
+[id$="/[attachment]"] input[type=radio].tab ~ div.tab ul.attachment.list {
list-style: none;
+ margin-left: 0;
}
-ul.attachment.list.tab li input[name=select],
-ul.attachment.list.tab li label.name,
-ul.attachment.list.tab li a.name,
-ul.attachment.list.tab li input.name {
+.tab ul li input[name=select],
+.tab ul li label.name,
+.tab ul li a.name,
+.tab ul li input.name {
display: none;
}
-[id$="/[attachment]"] input[type=radio].tab#tview:checked ~ ul li a.name,
-[id$="/[attachment]"] input[type=radio].tab#tdel:checked ~ ul li input[name=select],
-[id$="/[attachment]"] input[type=radio].tab#tdel:checked ~ ul li label.name,
-[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ ul li input[name=select],
-[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ ul li label.name {
+[id$="/[attachment]"] input[type=radio].tab#tview:checked ~ div.tab ul li a.name,
+[id$="/[attachment]"] input[type=radio].tab#tdel:checked ~ div.tab ul li input[name=select],
+[id$="/[attachment]"] input[type=radio].tab#tdel:checked ~ div.tab ul li label.name,
+[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab ul li input[name=select],
+[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab ul li label.name {
display: inline;
}
-[id$="/[attachment]"] input[type=radio].tab#tren:checked ~ ul li input.name {
+[id$="/[attachment]"] input[type=radio].tab#tren:checked ~ .tab ul li input.name {
display: block;
}
+[id$="/[attachment]"] label[for=moveto], [id$="/[attachment]"] input#moveto,
[id$="/[attachment]"] button[name=action] { display: none; }
+
[id$="/[attachment]"] .upload button[name=action] { display: inline-block; }
-[id$="/[attachment]"] input[type=radio].tab#tdel:checked ~ button[name=action][value=delete],
-[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ button[name=action][value=move],
-[id$="/[attachment]"] input[type=radio].tab#tren:checked ~ button[name=action][value=rename] {
- display: block;
+[id$="/[attachment]"] input[type=radio].tab#tdel:checked ~ div.tab button[name=action][value=delete],
+[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab label[for=moveto],
+[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab input#moveto,
+[id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab button[name=action][value=move],
+[id$="/[attachment]"] input[type=radio].tab#tren:checked ~ div.tab button[name=action][value=rename] {
+ display: inline;
}
+
/* === Macros === */
.macro.toc {
<input type=radio class=tab name=attachaction value=del id=tdel ><label for=tdel >Delete</label>
<input type=radio class=tab name=attachaction value=move id=tmove><label for=tmove>Move</label>
<input type=radio class=tab name=attachaction value=ren id=tren ><label for=tren >Rename</label>
- <ul class="attachment list tab">
+ <div class="tab">
+ <ul class="attachment list">
$(for file in "$_EXEC/pages/$page/#attachments"/* "$_DATA/pages/$page/#attachments"/*; do
[ "$file" = "$_EXEC/pages/$page/#attachments/${file##*/}" \
-a -f "$_DATA/pages/$page/#attachments/${file##*/}" ] && continue
"$hfile" "$hfile" "$hfile" "$hfile" \
"$(size_human "$size")" "$(date -d @"$date" +"%F %T")"
done)
- </ul>
- <button type=submit name=action value=delete>Delete</button>
- <button type=submit name=action value=move >Move</button>
- <button type=submit name=action value=rename>Rename</button>
+ </ul>
+ <button type=submit name=action value=delete>Delete</button>
+ <label for=moveto>Move To:</label>
+ <input id="moveto" name="moveto" value="$(HTML "$page")" placeholder="page name">
+ <button type=submit name=action value=move >Move</button>
+ <button type=submit name=action value=rename>Rename</button>
+ </div>
</form>
EOF
else