<%@ Page Language="C#" MasterPageFile="~/2ColMaster.Master" AutoEventWireup="true" CodeBehind="ProcessVersions.aspx.cs" Inherits="ProcessDefinition.ProcessVersions" Title="Previous Revisions" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentMain" runat="server">
    <asp:ObjectDataSource ID="odsVersions" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="GetPreviousVersions" TypeName="DevProcess.ProcessDefinitionService.ProcessDefinitionManager">
        <SelectParameters>
            <asp:Parameter Name="processId" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ListView ID="lvParents" runat="server" ItemPlaceholderID="itemList" EnableViewState="False"
        DataSourceID="odsVersions">
        <LayoutTemplate>
        <div>
            <h1>Previous revisions</h1>
            <ul>
                <asp:PlaceHolder ID="itemList" runat="server" />
            </ul>
           </div>
        </LayoutTemplate>
        <ItemTemplate>
            <li class='<%#GetProcessClass(Eval("DateFrozen")) %>'>
                <a href='<%#GetProcessLink(Eval("PrettyPostTitle"), Eval("MinorVersion"),Eval("ProcessHistoryId")) %>' class='pName'><span class='blueIcon ui-icon-pause freezeIcon' title='Frozen at this revision'></span><span class='<%# String.Format("pVer{0}",Eval("IsCurrentVersion")) %>'></span><%#DevProcess.Common.Utils.StringHelper.Format("{0:multilinenourl} (rev {1}) ({3:multilinenourl} {2:localshortdatetimehhmm}) <small>(used by {4:plural,tasks,task})</small>", Eval("ProcessTitle"), Eval("MinorVersion"), Eval("DateUpdated"), Eval("DisplayName"), Eval("UsedByTaskCount"))%></a>
                <span class='pSnip'><%#Eval("DescriptionSnippet")%></span></li>
        </ItemTemplate>
        <EmptyDataTemplate>
        </EmptyDataTemplate>
    </asp:ListView> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentOptions" runat="server">
    <ul class='ui-widget-content'>
        <li class="btn"><span class="ui-icon ui-icon-arrowreturnthick-1-w"></span><a href="../<%=PrettyTitle %>">Latest revision</a></li>
    </ul>
</asp:Content>
