|
- ${ trigger.call("before_post_fields", feather) }
- {% for field in feather.fields %}
- <p>
- <label for="${ field.attr }_field">
- $field.label
- {% if field.optional %}
- <span class="sub">${ "(optional)" | translate }</span>
- {% endif %}
- {% if field.help %}
- <span class="sub">
- <a href="{% admin "help&id="~field.help %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
- </span>
- {% endif %}
- {% if field.note %}
- <span class="sub">$field.note</span>
- {% endif %}
- </label>
- {% if field.type == "text" or field.type == "file" %}
- <input class="$field.type{% if field.classes %} ${ field.classes | join(" ") }{% endif %}" type="$field.type" name="$field.attr" value="{% if not field.no_value %}${ field.value | fallback(post[field.attr] | escape(true, false)) }{% endif %}" id="${ field.attr }_field" />
- {% if post.filename and route.action == "edit_post" %}
- <em>Current file name: <strong>${ post.filename | escape('') }</strong></em>
- {% endif %}
- {% elseif field.type == "text_block" %}
- <textarea class="wide{% if field.classes %} ${ field.classes | join(" ") }{% endif %}" rows="${ field.rows | fallback(12) }" name="$field.attr" id="${ field.attr }_field" cols="50">{% if not field.no_value %}${ field.value | fallback(post[field.attr] | escape(false, false)) }{% endif %}</textarea>
- {% elseif field.type == "checkbox" %}
- <input class="$field.type{% if field.classes %} ${ field.classes | join(" ") }{% endif %}" type="$field.type" name="$field.attr"{% if field.checked %}checked="checked"{% endif %} id="${ field.attr }_field" />
- {% elseif field.type == "select" %}
- <select name="$field.attr" id="${ field.attr }_field"{% if field.classes %} class="${ field.classes | join(" ") }"{% endif %}>
- {% for value, name in field.options | items %}
- <option value="${ value | escape }"{% if not field.no_value %}${ value | option_selected(post[field.attr]) }{% endif %}>${ name | escape }</option>
- {% endfor %}
- </select>
- {% endif %}
- $field.extra
- </p>
- {% endfor %}
- ${ trigger.call("after_post_fields", feather) }
-
- <div class="buttons">
- {% if route.action == "edit_post" %}
- <button type="submit" class="yay right" accesskey="s" id="save">
- <img src="$theme_url/images/icons/success.png" alt="success" />${ "Save" | translate }
- </button>
- {% else %}
- {% if visitor.group.can("add_post") %}
- <button type="submit" class="yay right" accesskey="s" id="publish">
- <img src="$theme_url/images/icons/success.png" alt="success" />${ "Publish" | translate }
- </button>
- {% endif %}
- <button type="submit" class="right" accesskey="s" id="save" name="draft" value="true">
- <img src="$theme_url/images/icons/save.png" alt="success" />${ "Save" | translate }
- </button>
- {% endif %}
- </div>
-
- <div class="clear"></div>
- <noscript><br /></noscript>
- <div id="more_options" class="more_options js_disabled">
- {% if visitor.group.can("add_post") %}
- <p>
- <label for="status">${ "Status" | translate }</label>
- <select name="status" id="status">
- {% if route.action == "edit_post" %}
- <option value="draft"${ post.status | option_selected("draft") }>${ "Draft" | translate }</option>
- {% endif %}
- <option value="public"${ post.status | option_selected("public") }>${ "Public" | translate }</option>
- <option value="private"${ post.status | option_selected("private") }>${ "Private" | translate }</option>
- <option value="registered_only"${ post.status | option_selected("registered_only") }>${ "Registered Only" | translate }</option>
- {% if groups %}
- <optgroup label="${ "Group" | translate }">
- {% for group in groups %}
- <option value="{$group.id}"${ post.status | option_selected("{"~ group.id ~"}") }>${ group.name | escape }</option>
- {% endfor %}
- </optgroup>
- {% endif %}
- </select>
- </p>
- {% endif %}
- <p>
- <label for="pinned">${ "Pinned?" | translate }</label>
- <input type="checkbox" name="pinned" id="pinned"{% if post.pinned %} checked="checked"{% endif %}/>
- <small>${ "(shows this post above all others)" | translate }</small>
- </p>
- <p>
- <label for="slug">
- ${ "Slug" | translate }
- <a href="{% admin "help&id=slugs" %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
- </label>
- <input class="text" type="text" name="slug" value="${ post.slug | escape }" id="slug" />
- </p>
- <p>
- <label for="created_at">${ "Timestamp" | translate }</label>
- <input class="text" type="text" name="created_at" value="${ post.created_at | fallback(now | date("r")) | strftime }" id="created_at" />
- <input type="hidden" name="original_time" value="${ post.created_at | fallback(now | date("r")) | strftime }" />
- </p>
- <p>
- <label for="trackbacks">
- ${ "Trackbacks" | translate }
- <a href="{% admin "help&id=trackbacks" %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
- </label>
-
- <input class="text" type="text" name="trackbacks" value="" id="trackbacks" />
- </p>
- {% for field in options %}
- <p>
- <label for="${ field.attr | replace("[", "_") | replace("]", "") }">
- $field.label
- {% if field.help %}
- <span class="sub">
- <a href="{% admin "help&id="~field.help %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
- </span>
- {% endif %}
- {% if field.note %}
- <span class="sub">$field.note</span>
- {% endif %}
- </label>
- {% if field.type == "text" or field.type == "file" %}
- <input class="$field.type{% if field.classes %} ${ field.classes | join(" ") }{% endif %}" type="$field.type" name="$field.attr" value="{% if not field.no_value %}${ field.value | fallback(post[field.attr] | escape(true, false)) }{% endif %}" id="$field.attr" />
- {% elseif field.type == "text_block" %}
- <textarea class="wide{% if field.classes %} ${ field.classes | join(" ") }{% endif %}" rows="${ field.rows | fallback(12) }" name="$field.attr" id="$field.attr" cols="50">{% if not field.no_value %}${ field.value | fallback(post[field.attr] | escape(false, false)) }{% endif %}</textarea>
- {% elseif field.type == "select" %}
- <select name="$field.attr" id="$field.attr"{% if field.classes %} class="${ field.classes | join(" ") }"{% endif %}>
- {% for option in field.options %}
- <option value="${ option.value | escape }"${ option.selected | option_selected(true) }>${ option.name | escape }</option>
- {% endfor %}
- </select>
- {% endif %}
- $field.extra
- </p>
- {% endfor %}
- <div class="clear"></div>
- </div>
- </div>
|