article.jsp 4.86 KB
Newer Older
Matija Obreza's avatar
/1/ GUI  
Matija Obreza committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
<!DOCTYPE html>

<%@include file="/WEB-INF/jsp/init.jsp" %>

<html>
<head>
    <title>${title}</title>
    <local:content-headers description="${jspHelper.htmlToText(article.summary, 150)}" title="${title}"/>
</head>
<body>
<content tag="header">
    <div class="hidden-xs top-image">
        <img src="<c:url value="/html/0/images/aim/banner-${jspHelper.randomInt(1, 4)}.jpg" />" title="${title}"/>
    </div>
    <div class="">
        <div class="banner-<c:out value="${article.slug}" />"></div>
        <c:if test="${title ne ''}">
            <div class="">
                <security:authorize access="hasRole('ADMINISTRATOR') or hasRole('CONTENTMANAGER')">
                    <form class="inline-form pull-right" method="post" action="<c:url value="/content/transifex"/>">
                        <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
                        <input id="articleSlug" type="hidden" name="slug" value="${article.slug eq "blurp"? "".concat(article.classPk.shortName).concat("-").concat(article.targetId) : article.slug}"/>

                        <c:choose>
                            <c:when test="${article.targetId ne null}">
                                <a class="btn btn-default" href="<c:url value="/content/edit/${article.slug}/${article.classPk.shortName}/${article.targetId}/${article.lang}" />"><spring:message
                                        code="edit"/></a>
                            </c:when>
                            <c:otherwise>
                                <a class="btn btn-default" href="<c:url value="/content/edit/${article.slug}/${article.lang}" />"><spring:message
                                        code="edit"/></a>
                            </c:otherwise>
                        </c:choose>

                        <input type="submit" name="fetch-all" class="btn btn-default"
                               value="<spring:message code="article.fetch-from-transifex" />"/>
                    </form>
                </security:authorize>
            </div>
        </c:if>
    </div>
</content>

<h1>
	<c:out value="${title}" escapeXml="false"/>
</h1>

<c:if test="${article.lang != pageContext.response.locale.language}">
    <%@include file="/WEB-INF/jsp/not-translated.jsp" %>
</c:if>

<%@include file="/WEB-INF/jsp/content/transifex-responses.jsp" %>

<div class="article">
    <div class="right-side main-col col-md-9">

        <div class="free-text" dir="${article.lang=='fa' || article.lang=='ar' ? 'rtl' : 'ltr'}">
            <c:out value="${article.body}" escapeXml="false"/>
        </div>

        <div class="article-timestamp">
            <local:prettyTime date="${article.postDate.time}" locale="${pageContext.response.locale}"/>
        </div>

        <div class="share-article">
            <p>
                <spring:message code="article.share"/>
            </p>
            <ul class="list-inline">
                <%--
                <li class="envelope">
                    <a href="">
                        <i class="fa fa-envelope-o"></i>
                    </a>
                </li>
                 --%>
                <li class="twitter">
                    <local:tweet text="${article.title}" hashTags="GenesysPGR"/>
                </li>
                <li class="linkedin">
                    <local:linkedin-share text="${article.title}" summary="${article.body}"/>
                </li>
            </ul>
        </div>

        <%-- <div class="see-also">
            <h3>
                <span>
                    <spring:message code="heading.see-also" />
                </span>
            </h3>
            <div class="row">
                <div class="col-xs-12 col-sm-4">
                    <div class="see-also-block" style="background-image: url('<c:url value="/html/0/images/pic_news_1.png" />')">
                        <h2>History of Genesys</h2>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-4">
                    <div class="see-also-block" style="background-image: url('<c:url value="/html/0/images/pic_news_1.png" />')">
                        <h2>How to use Genesys</h2>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-4">
                    <div class="see-also-block" style="background-image: url('<c:url value="/html/0/images/pic_news_1.png" />')">
                        <h2>About Genesys Data 123 </h2>
                    </div>
                </div>
            </div>
        </div> --%>
    </div>


    <div class="col-md-3 sidebar-nav col-xs-12">
        <cms:menu key="${menu.key}" items="${menu.items}"/>
    </div>
</div>

<content tag="javascript">
    <script type="text/javascript">
        $(document).ready(function () {
            $('a[href="' + window.location.pathname + '"]').parent().addClass('active-link');
        });
    </script>
</content>

</body>
</html>