{% load base_tags %}
{% load perm_tags %}
{% load i18n %}
{% has_perm request.user stories.change_story story as can_edit %}
        <div class="wrap-search-item">
            <div class="search-item story-search-item">
                <div class="item-content">
                    {% if story.image %}
                    <div class="search-image">
                        <img src="{% image_url story.image size=80x80 crop=True quality=88 %}" alt="{{ story.title }}" />
                    </div>
                    {% endif %}
                    <div class="search-text">
                        <h2><a href="{% if can_edit %}{% url story story.pk %}{% else %}{{ story.full_story_link }}{% endif %}">{% firstof story.title 'Untitled'%}</a></h2>
                        {{ story.content|striptags|truncatewords:20|safe }}
                        
                        {% if can_edit %}
                            {% if story.full_story_link %}
                            <br /><strong>{% trans "Links to: " %}</strong><a href="{{ story.full_story_link }}">{{ story.full_story_link }}</a>
                            {% endif %}
                            {% if story.link_title %}
                            <br /><strong>{% trans "Link title: " %}</strong> {{ story.link_title }}
                            {% endif %}
                        {% endif %}
                    </div>
                    <div class="clear"></div>
                </div>
            </div>	
		      {% include "stories/meta.html" %}
		</div>
