<%@ taglib uri="webwork" prefix="webwork" %>
<%@ taglib uri="webwork" prefix="ui" %>
<%@ taglib uri="sitemesh-page" prefix="page" %>
<webwork:bean name="'com.atlassian.jira.util.JiraDateUtils'" id="dateUtils" />
<html>
<head>
	<title><webwork:text name="'admin.indexing.jira.indexing'"/></title>
</head>
<body>
<webwork:if test="indexing == true">
    <page:applyDecorator name="jiraform">
        <page:param name="action">IndexReIndex.jspa</page:param>
        <page:param name="submitName"><webwork:text name="'admin.indexing.reindex'"/></page:param>
        <page:param name="width">100%</page:param>
        <page:param name="title"><webwork:text name="'admin.indexing.reindexing'"/></page:param>
        <page:param name="helpURL">searchindex</page:param>
        <%--    <page:param name="helpDescription">with Indexing</page:param>--%>
        <page:param name="instructions">
            <webwork:if test="reindexTime > 0">
                <p><webwork:text name="'admin.indexing.reindexing.was.successful'">
                    <webwork:param name="'value0'"><strong><span class="greenText"></webwork:param>
                    <webwork:param name="'value1'"></span></strong></webwork:param>
                    <webwork:param name="'value2'"><strong><webwork:property value="@dateUtils/formatTime(reindexTime)" /></strong></webwork:param>
                </webwork:text> </p>
            </webwork:if>
            <p>
                <webwork:text name="'admin.indexing.to.reindex.click.the.button'"/>
                <webwork:text name="'admin.indexing.optimize.url.title'">
                    <webwork:param name="'value0'"><a href="IndexOptimize!default.jspa"></webwork:param>
                    <webwork:param name="'value1'"></a></webwork:param>
                </webwork:text>
            </p>
            <p>
                <webwork:text name="'admin.indexing.this.may.take.a.while'">
                    <webwork:param name="'value0'"><span class="note"></webwork:param>
                    <webwork:param name="'value1'"></span></webwork:param>
                </webwork:text>
            </p>
        </page:param>
        <ui:textfield label="text('admin.indexing.search.index.path')" name="'newIndexPath'">
            <ui:param name="'size'">40</ui:param>
            <ui:param name="'description'"><webwork:text name="'admin.indexing.search.index.path.description'"/></ui:param>
        </ui:textfield>
    </page:applyDecorator>
</webwork:if>
<webwork:else>
    <page:applyDecorator name="jiraform">
        <page:param name="action">IndexActivate.jspa</page:param>
        <page:param name="width">100%</page:param>
        <page:param name="submitName"><webwork:text name="'admin.common.words.activate'"/></page:param>
        <page:param name="title"><webwork:text name="'admin.indexing.indexing'"/></page:param>
        <page:param name="helpURL">searchindex</page:param>
        <%--	<page:param name="helpDescription">with Indexing</page:param>--%>
        <page:param name="description">
            <webwork:text name="'admin.indexing.is.currently.off'">
                <webwork:param name="'value0'"><strong><span class="redText"></webwork:param>
                <webwork:param name="'value1'"></span></strong></webwork:param>
            </webwork:text>
            <p>
            <webwork:text name="'admin.indexing.to.activate'"/>
            <p>
                <webwork:text name="'admin.indexing.this.may.take.a.while'">
                    <webwork:param name="'value0'"><span class="note"></webwork:param>
                    <webwork:param name="'value1'"></span></webwork:param>
                </webwork:text>
            </p>
        </page:param>

        <ui:textfield label="text('admin.indexing.search.index.path')" name="'indexPath'">
            <ui:param name="'size'">40</ui:param>
            <ui:param name="'description'">
                <webwork:text name="'admin.indexing.search.index.path.description'"/>
            </ui:param>
        </ui:textfield>
    </page:applyDecorator>
</webwork:else>
</body>
</html>