| 1 |
<?cs include "header.cs" ?> |
|---|
| 2 |
<?cs include "macros.cs" ?> |
|---|
| 3 |
|
|---|
| 4 |
<div id="ctxtnav" class="nav"></div> |
|---|
| 5 |
|
|---|
| 6 |
<div id="content" class="attachment"> |
|---|
| 7 |
|
|---|
| 8 |
<?cs if:attachment.mode == 'new' ?> |
|---|
| 9 |
<h1><a href="<?cs var:attachment.parent.href?>"><?cs |
|---|
| 10 |
var:attachment.parent.name ?></a> に添付ファイルを登録</h1> |
|---|
| 11 |
<form id="attachment" method="post" enctype="multipart/form-data" action=""> |
|---|
| 12 |
<div class="field"> |
|---|
| 13 |
<label>ファイル:<br /><input type="file" name="attachment" /></label> |
|---|
| 14 |
</div> |
|---|
| 15 |
<fieldset> |
|---|
| 16 |
<legend>添付ファイル情報</legend> |
|---|
| 17 |
<?cs if:trac.authname == "anonymous" ?> |
|---|
| 18 |
<div class="field"> |
|---|
| 19 |
<label>メールアドレスまたはユーザ名:<br /> |
|---|
| 20 |
<input type="text" name="author" size="30" value="<?cs |
|---|
| 21 |
var:attachment.author?>" /></label> |
|---|
| 22 |
</div> |
|---|
| 23 |
<?cs /if ?> |
|---|
| 24 |
<div class="field"> |
|---|
| 25 |
<label>ファイルについての説明 (非必須):<br /> |
|---|
| 26 |
<input type="text" name="description" size="60" /></label> |
|---|
| 27 |
</div> |
|---|
| 28 |
<br /> |
|---|
| 29 |
<div class="options"> |
|---|
| 30 |
<label><input type="checkbox" name="replace" /> |
|---|
| 31 |
同名の添付ファイルが存在していた場合、置き換える</label> |
|---|
| 32 |
</div> |
|---|
| 33 |
<br /> |
|---|
| 34 |
</fieldset> |
|---|
| 35 |
<div class="buttons"> |
|---|
| 36 |
<input type="hidden" name="action" value="new" /> |
|---|
| 37 |
<input type="hidden" name="type" value="<?cs var:attachment.parent.type ?>" /> |
|---|
| 38 |
<input type="hidden" name="id" value="<?cs var:attachment.parent.id ?>" /> |
|---|
| 39 |
<input type="submit" value="添付ファイルを登録" /> |
|---|
| 40 |
<input type="submit" name="cancel" value="取り消し" /> |
|---|
| 41 |
</div> |
|---|
| 42 |
</form> |
|---|
| 43 |
<?cs elif:attachment.mode == 'delete' ?> |
|---|
| 44 |
<h1><a href="<?cs var:attachment.parent.href ?>"><?cs |
|---|
| 45 |
var:attachment.parent.name ?></a>: <?cs var:attachment.filename ?></h1> |
|---|
| 46 |
<p><strong>本当に削除してもよろしいですか?</strong><br /> |
|---|
| 47 |
削除すると元に戻すことができません。</p> |
|---|
| 48 |
<div class="buttons"> |
|---|
| 49 |
<form method="post" action=""><div id="delete"> |
|---|
| 50 |
<input type="hidden" name="action" value="delete" /> |
|---|
| 51 |
<input type="submit" name="cancel" value="取り消し" /> |
|---|
| 52 |
<input type="submit" value="添付ファイルを削除" /> |
|---|
| 53 |
</div></form> |
|---|
| 54 |
</div> |
|---|
| 55 |
<?cs elif:attachment.mode == 'list' ?> |
|---|
| 56 |
<h1><a href="<?cs var:attachment.parent.href ?>"><?cs |
|---|
| 57 |
var:attachment.parent.name ?></a></h1><?cs |
|---|
| 58 |
call:list_of_attachments(attachment.list, attachment.attach_href) ?> |
|---|
| 59 |
<?cs else ?> |
|---|
| 60 |
<h1><a href="<?cs var:attachment.parent.href ?>"><?cs |
|---|
| 61 |
var:attachment.parent.name ?></a>: <?cs var:attachment.filename ?></h1> |
|---|
| 62 |
<table id="info" summary="説明"><tbody><tr> |
|---|
| 63 |
<th scope="col"> |
|---|
| 64 |
ファイル <?cs var:attachment.filename ?>, <?cs var:attachment.size ?> |
|---|
| 65 |
(登録者: <?cs var:attachment.author ?>, 登録時期: <?cs var:attachment.age ?> 前) |
|---|
| 66 |
</th></tr><tr> |
|---|
| 67 |
<td class="message"><?cs var:attachment.description ?></td> |
|---|
| 68 |
</tr> |
|---|
| 69 |
</tbody></table> |
|---|
| 70 |
<div id="preview"><?cs |
|---|
| 71 |
if:attachment.preview ?> |
|---|
| 72 |
<?cs var:attachment.preview ?><?cs |
|---|
| 73 |
elif:attachment.max_file_size_reached ?> |
|---|
| 74 |
<strong>HTMLプレビュー出来ません</strong>。ファイルサイズが |
|---|
| 75 |
<?cs var:attachment.max_file_size ?> バイトを超えています。閲覧するためには <a href="<?cs |
|---|
| 76 |
var:attachment.raw_href ?>">ファイルをダウンロード</a> してください。<?cs |
|---|
| 77 |
else ?> |
|---|
| 78 |
<strong>HTMLプレビューで対応していないファイル形式です。</strong> 閲覧するためには |
|---|
| 79 |
<a href="<?cs var:attachment.raw_href ?>">ファイルをダウンロードしてください。</a><?cs |
|---|
| 80 |
/if ?> |
|---|
| 81 |
</div> |
|---|
| 82 |
<?cs if:attachment.can_delete ?><div class="buttons"> |
|---|
| 83 |
<form method="get" action=""><div id="delete"> |
|---|
| 84 |
<input type="hidden" name="action" value="delete" /> |
|---|
| 85 |
<input type="submit" value="添付ファイルを削除" /> |
|---|
| 86 |
</div></form> |
|---|
| 87 |
</div><?cs /if ?> |
|---|
| 88 |
<?cs /if ?> |
|---|
| 89 |
|
|---|
| 90 |
</div> |
|---|
| 91 |
<?cs include "footer.cs"?> |
|---|