Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 02/02/2006 12:11 PM by  Peter Donker
document versions
 6 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Peter Milliner
New Member
New Member
Posts:40


--
01/06/2006 1:07 PM
    Hello,

    Our quality department are very happy with document exchange but have several issues they would like me to resolve if possible.
    While they like the versioning of documents - they do not want older versions available for download as this would allow general users to download and use out of date documents/forms....

    Just need to know if it is possible when creating another version by uploading new document to have the older version only viewable by adminstrators and also to have the search not to include older versions.

    any assistance would be appreciated

    Thankyou
    Peter



    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    01/07/2006 2:11 PM

    Peter,
    There are a number of steps you can take to make this happen. Note that it will require code changes to really 'lock down' access to older versions. If someone would know the ID of an older version he/she could still download it as they would still have access rights. But if security by obscurity is sufficient you can do the following:
    1. In the ViewDetails.ascx file you will find 2 <dmx:panel enclosures: one around the Version History, the other around the Log. Both of these have a 'viewpermission' setting that can be altered. In your case you'd want to alter the first enclosure to have viewpermission="admin". This will remove it from view for non-admins.
    2. In Search.ascx you'll find the following line:
     <asp:checkbox runat="server" id="chkAllVersions" text="All Versions" resourcekey="chkAllVersions" />
    You can put an enclosure around this in similar fashion to point 1 above. In other words:
     <dmx:panel id="pnlAllVersions" runat="server" viewpermission="edit">
      <asp:checkbox runat="server" id="chkAllVersions" text="All Versions" resourcekey="chkAllVersions" />
     </dmx:panel>
    This will remove the checkbox from view. By default DMX should not search older versions, so this should be sufficient for your cause.

    Peter

    Peter Milliner
    New Member
    New Member
    Posts:40


    --
    01/23/2006 11:30 PM

    Peter,

    I have just started back at work and tried your suggestions on my test server.

    Firstly it seems that it does search older versions in the basic search (by default) and the checkbox is selected by default in the search area.

    Secondly I do not have panels in the viewdetails.ascx file that have dmx:panel enclosures the following is an extract of the code I  have for this page.<asp:panel id=pnlVersionHistory runat="server">

    <asp:panel id=pnlVersionHistory runat="server">

    <p><asp:hyperlink id=hlHyperlink runat="server" /></p>

    <asp:panel id="pnlVersionHistory" runat="server" >
     <h2>
      <img src="<%= DMXPath %>images/DMX32.gif" align=absBottom>&nbsp;
      <asp:label runat="server" id="lblVersionHistory" resourcekey="lblVersionHistory" />
     </h2>
     <asp:datagrid id="dgHistory" width="100%" runat="server" cellspacing="0" cellpadding="2" border="0" gridlines="none" autogeneratecolumns="False" showheader="True" cssclass="DetailsGrid_Container" itemstyle-cssclass="DetailsGrid_Item" alternatingitemstyle-cssclass="DetailsGrid_AlternatingItem" headerstyle-cssclass="DetailsGrid_Header" PagerStyle-cssclass="DetailsGrid_Pager">
      <itemstyle verticalalign="Top" />
      <columns>
       <asp:TemplateColumn HeaderText="Uploaded" itemstyle-width="120">
        <itemtemplate>
         <p class='<%# IIF(DataBinder.Eval(Container, "DataItem.EntryId") = Query.EntryId, "DMX_SelectedRow", IIF(GetAString(DataBinder.Eval(Container, "DataItem.Entry"))="", "DMX_DeletedRow", "DMX_NormalRow")) %>'>
          <a href='<%# DMXUrl(DataBinder.Eval(Container, "DataItem.EntryId")) %>'>
           <%# CType(DataBinder.Eval(Container, "DataItem.DateSubmitted"), Date).ToShortDateString %>
           <%# CType(DataBinder.Eval(Container, "DataItem.DateSubmitted"), Date).ToShortTimeString %>
          </a>
         </p>
        </ItemTemplate>
       </asp:TemplateColumn>
       <asp:TemplateColumn HeaderText="By" itemstyle-width="90">
        <itemtemplate>
         <p class='<%# IIF(DataBinder.Eval(Container, "DataItem.EntryId") = Query.EntryId, "DMX_SelectedRow", IIF(DataBinder.Eval(Container, "DataItem.Deleted"), "DMX_DeletedRow", "DMX_NormalRow")) %>'>
          <%# DataBinder.Eval(Container, "DataItem.Fullname") %>
         </p>
        </ItemTemplate>
       </asp:TemplateColumn>
       <asp:TemplateColumn HeaderText="Version" itemstyle-width="110">
        <itemtemplate>
         <p class='<%# IIF(DataBinder.Eval(Container, "DataItem.EntryId") = Query.EntryId, "DMX_SelectedRow", IIF(DataBinder.Eval(Container, "DataItem.Deleted"), "DMX_DeletedRow", "DMX_NormalRow")) %>'>
          <%# DataBinder.Eval(Container, "DataItem.Version") %>
    <%# IIF(DataBinder.Eval(Container, "DataItem.EntryId") = Query.EntryId, " (This Version)", IIF(DataBinder.Eval(Container, "DataItem.Deleted"), " (Deleted)", "")) %>
         </p>
        </ItemTemplate>
       </asp:TemplateColumn>
       <asp:TemplateColumn HeaderText="Remarks">
        <itemtemplate>
         <p class='<%# IIF(DataBinder.Eval(Container, "DataItem.EntryId") = Query.EntryId, "DMX_SelectedRow", IIF(DataBinder.Eval(Container, "DataItem.Deleted"), "DMX_DeletedRow", "DMX_NormalRow")) %>'>
          <%# GetAString(DataBinder.Eval(Container, "DataItem.Remarks"), 60) %>
         </p>
        </ItemTemplate>
       </asp:TemplateColumn>
      </columns>
      <pagerstyle mode="NumericPages" />
     </asp:datagrid>
    </asp:panel>
     

    <asp:label id=lblVersionHistory resourcekey="lblVersionHistory" runat="server">I can hide previous version by editing original document first and deselecting staff view permission and updating and then uploading new document.  The older version is then only viewable by admin staff.

    <asp:label resourcekey="lblVersionHistory" runat="server">Any assistance would be appreciated

    <asp:label resourcekey="lblVersionHistory" runat="server">Thanks

    <asp:label resourcekey="lblVersionHistory" runat="server">Peter

    <asp:datagrid id=dgHistory border="0" runat="server" PagerStyle-cssclass="DetailsGrid_Pager" headerstyle-cssclass="DetailsGrid_Header" alternatingitemstyle-cssclass="DetailsGrid_AlternatingItem" itemstyle-cssclass="DetailsGrid_Item" cssclass="DetailsGrid_Container" showheader="True" autogeneratecolumns="False" gridlines="none" cellpadding="2" cellspacing="0" width="100%">

    <%# CType(DataBinder.Eval(Container, "DataItem.DateSubmitted"), Date).ToShortDateString %><%# CType(DataBinder.Eval(Container, "DataItem.DateSubmitted"), Date).ToShortTimeString %>

    <%# DataBinder.Eval(Container, "DataItem.Fullname") %>

    <%# DataBinder.Eval(Container, "DataItem.Version") %><%# IIF(DataBinder.Eval(Container, "DataItem.EntryId") = Query.EntryId, " (This Version)", IIF(DataBinder.Eval(Container, "DataItem.Deleted"), " (Deleted)", "")) %>

    <%# GetAString(DataBinder.Eval(Container, "DataItem.Remarks"), 60) %>

      <asp:label id=lblVersionHistory resourcekey="lblVersionHistory" runat="server">

    <asp:datagrid id=dgHistory border="0" runat="server" PagerStyle-cssclass="DetailsGrid_Pager" headerstyle-cssclass="DetailsGrid_Header" alternatingitemstyle-cssclass="DetailsGrid_AlternatingItem" itemstyle-cssclass="DetailsGrid_Item" cssclass="DetailsGrid_Container" showheader="True" autogeneratecolumns="False" gridlines="none" cellpadding="2" cellspacing="0" width="100%">

    <%# CType(DataBinder.Eval(Container, "DataItem.DateSubmitted"), Date).ToShortDateString %><%# CType(DataBinder.Eval(Container, "DataItem.DateSubmitted"), Date).ToShortTimeString %>

    <%# DataBinder.Eval(Container, "DataItem.Fullname") %>

    <%# DataBinder.Eval(Container, "DataItem.Version") %><%# IIF(DataBinder.Eval(Container, "DataItem.EntryId") = Query.EntryId, " (This Version)", IIF(DataBinder.Eval(Container, "DataItem.Deleted"), " (Deleted)", "")) %>

    <%# GetAString(DataBinder.Eval(Container, "DataItem.Remarks"), 60) %>

     

     

    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    01/24/2006 12:30 PM
    Peter,
    You're running an older version. What version DMX are you on?
    Peter
    Peter Milliner
    New Member
    New Member
    Posts:40


    --
    01/24/2006 10:47 PM
    Peter,

    The version I have is the one you sent me last year on the 15/8/2005 it is version 03.01.04

    Regards
    Peter
    Bendigo Institute of TAFE
    Victoria, Australia
    Peter Milliner
    New Member
    New Member
    Posts:40


    --
    02/02/2006 1:43 AM
    Can I update?

    Regards
    Peter
    Bendigo Institute of TAFE
    Victoria, Australia
    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    02/02/2006 12:11 PM
    Peter,
    I just sent you the update. Sorry about the delay.
    Peter
    You are not authorized to post a reply.