<%-- The following loops through attachments that are either going to be added with the post or message, or, when editing, the new ones to add AND the ones that already exist. The following variables are available: - att_id - the attachment ID (in either post, message, or temp attachment directories) - att_filename - the filename of the attachment - att_size - the size of the attachment in bytes. Use <%GForum::Attachment::friendly_size($att_size)%> to get a "friendly" size such as "66.3 KB" instead of "67890". - att_content - the content type of the file (such as text/html for .html files). Use <%GForum::Attachment::icon($att_content, $att_filename)%> to get the web path to the appropriate icon. - att_type - usually 'temp', but will be 'post' for posts that already exist when editing a post --%> <%~if attach_mode eq message%> <%~set show_inline_checkbox = $config.allow_message_inline%> <%~else%> <%~set attach_mode = 'post'%> <%~set show_inline_checkbox = $forum_attachment_inline%> <%~endif%> <%~if this_do eq "${attach_mode}_attachment_list"%> <%~set ADVANCEDEDITOR = 1%> <%~endif%> <%~if ADVANCEDEDITOR%> <%endif~%> <%if attachments.length or can_attach%>
<%loop attachments%>
<%att_filename%> <%GForum::Attachment::friendly_size($att_size)%>
<%~if show_inline_checkbox%>
<%if att_inline%><%endif%> checked="checked"<%endif%> class="checkbox"<%if ADVANCEDEDITOR%> onclick="updateInline('<%escape_js att_filename%>', '<%att_type%>', '<%att_id%>', this.checked)"<%endif%> />
<%~endif%>
<%endloop%> <%if can_attach%>
<%~if show_inline_checkbox%>
<%~endif%>
<%endif%>
<%endif%>