{% load cms_admin i18n %}
<div class="cont {{ css_class }}">
	<div class="col1">
		{% if has_change_permission %}
			<a href="{{ url }}{{ page.id }}/" class="title" {% if cl.is_popup %}onclick="opener.dismissRelatedLookupPopup(window, {{ page.id }}); return false;" title="{% trans "select this page" %}"{% else %}title="{% trans "edit this page" %}"{% endif %}>{{ page.get_menu_title }}</a>
			<a href="{{ url }}{{ page.id }}/" class="changelink" title="{% trans "edit this page" %}">{% trans "edit" %}</a>
		{% else %}
			<span class="title">{{ page.get_slug }}</span>
		{% endif %}
	</div>
	<div class="col2">
		<span id="move-target-{{ page.id }}" class="move-target-container" >
			{% if not CMS_PERMISSION or has_add_permission or has_add_page_permission %}{% spaceless %}
				{# if permissions not enabled, user user haves global can_add page #}
					{% if has_add_on_same_level_permission %}
						<a href="#" class="move-target left" title="{% trans "insert above" %}">↑</a>
						<a href="#" class="move-target right" title="{% trans "insert below" %}">↓</a>
					{% endif %}
				<a href="#" class="move-target last-child" title="{% trans "insert inside" %}">↘</a>
			{% endspaceless %}{% endif %}
		</span>

		{% if page.soft_root or page.is_home %}<div class="col-softroot"><span class="icon softroot-icon" title="{% if page.soft_root %}{% trans 'softroot' %}{% else %}{% trans 'home' %}{% endif %}"></span></div>{% endif %}

		<div class="col-language">{% for lang in page.get_languages|in_filtered:site_languages %}
			{% if has_change_permission %}<a href="{{ url }}{{ page.id }}/?language={{ lang }}" title="{% blocktrans with lang|upper as language %}Edit this page in {{ language }} {% endblocktrans %}">{{ lang }}</a>
			{% else %}{{ lang|upper }}
			{% endif %}
			{% if not forloop.last %} | {% endif %}
		{% endfor %}</div>

		<div class="col-actions">{% if not filtered %}
			{% if has_move_page_permission %}<a href="#" class="move" title="{% trans "Cut" %}" id="move-link-{{ page.id }}"><span>{% trans "cut" %}</span></a>{% endif %}{% endif %}
			{% if has_change_permission %}<a href="#" class="copy" title="{% trans "Copy" %}" id="copy-link-{{ page.id }}"><span>{% trans "copy" %}</span></a>{% endif %}

			{% if has_add_page_permission and has_add_on_same_level_permission %}
				<a href="#" class="addlink" title="{% trans "Add Child" %}" id="add-link-{{ page.id }}"><span>{% trans "add" %}</span></a>
			{% else %}
				{% if has_add_page_permission %}
					{# if he can add page under current page, go directly to thi url #}
					<a href="./add/?target={{ page.id }}&amp;position=last-child" class="addlink" title="{% trans "Add Child" %}" id="add-link-{{ page.id }}"><span>{% trans "add" %}</span></a>
				{% endif %}
			{% endif %}
			{% if has_delete_permission %}<a href="{{ page.id }}/delete/" title="{% trans "Delete" %}" class="deletelink"><span>{% trans "delete" %}</span></a>{% endif %}
		</div>

		<div class="col-navigation">
			<label>
                <img alt="{{ page.in_navigation|yesno:"True,False" }}" src="{% cms_admin_icon_base %}icon-{{ page.in_navigation|yesno:"yes,no" }}.gif" />
                {% if has_change_permission %}<input type="checkbox" class="navigation-checkbox" name="navigation-{{ page.id }}" {% if page.in_navigation %}checked="checked"{% endif %} value="{{ page.in_navigation|yesno:"1,0" }}" />{% endif %}
			</label>
		</div>

		<div class="col-published">
            <label>{{ page.is_public_published|boolean_icon }}</label>
			{% if has_publish_permission %}
				{% if page.published %}<input type="checkbox" class="publish-checkbox" name="status-{{ page.id }}" checked="checked" value="1" title="{% trans 'Unpublish' %}"/>
				{% else %}<input type="checkbox" class="publish-checkbox" name="status-{{ page.id }}" value="0" title="{% trans 'Publish' %}"/>
				{% endif %}
			{% endif %}

            {% if page.is_public_published %}<a href="./{{ page.id }}/preview/?public=1" title="{% trans "View on page" %}" class="icon selector-add viewpage" id="view-page-{{page.id}}"><span>{% trans "view" %}</span></a>{% endif %}
		</div>

		<div class="col-published">{{ page.publication_date|date:"Y-m-d" }}</div>
        {% if CMS_SHOW_END_DATE %}<div class="col-published">{{ page.publication_end_date|date:"Y-m-d" }}</div>{% endif %}
		<div class="col-view-perms">{{ page|is_restricted:request }}</div>


		<div class="col-lastchange">
            {% if has_publish_permission and page.is_dirty %}<a href="./{{ page.id }}/publish/" class="icon publish" title="{% trans 'Publish' %}"></a>{% endif %}
			{% for state in page.last_page_states %}<span class="icon state-icon {{ state.css_class }}" title="{{ state.get_action_display }}"></span>
			{% endfor %}
		</div>

		<div class="col-creator">{{ page.changed_by }}</div>
	</div>
</div>
