Sitefinity ASP.NET CMS - Content Management System

Support Forum Thread

Home >  Support >  Forums home > Sitefinity 2.x > Deployment > Workflow Questions

Reply
Paul Kavanagh, 1/18/2007 12:17:16 PM
hi,
not sure how much you are going to support v2.x going forward, but have a couple of questions that perhaps could be looked at in either context. One of the big issues that we are having is around limitations of the workflow, and in particular the page/content status views. Unless we are doing something wrong, it seems that in the locked pages view, an admin does not see the pages that are locked for all users. So, for instance, if a content piece is shown as locked on a page, it is not possible to see who has it checked out. If there are a large number of content editors, this can be a problem. 

Also, there is no view for content cells to see what is checked out at all. So, is this something that is changed in the v3? Will you be providing any upgrades going forward to the v2x? Are there any ideas for us to address this issue on a custom basis if needed?

Thanks!

Paul 

Reply
, 1/19/2007 5:57:36 AM
RadEditorControl.zip
Hi Paul,

We will continue supporting Sitefinity 2.x in the future. In fact we intend to release an upgrade for 2.7 to address some major issues in it, but currently we have no plans to add new functionality to 2.7. Our efforts will be directed to Sitefinity 3.0.

The locked pages view in the control panel should display all pages that are locked by users and we are not aware of any problems in it. Could you please elaborate more on the issue?

As for the locked content issue, we have a workaround for it. It is implemented in the ~/Controls/RadEditorControl.ascx user control. Only users assigned to the Administrators role will be able to use it. In your case, if you are an administrator and not the content author who has checked out the cell content, you will see the [Unlock and lose changes] button. Pressing it will result in cell unlock and losing the changes made by the author. Also, you can see the author username in the tooltip of the button and the changes made by the author clicking the link 'View changes'. You can find the implementation in the attached .ZIP.


Greetings,
Vlad
the telerik team

Reply
Bryan Maiden, 2/7/2007 1:50:08 PM
Do you have a version of this that will work with the version of radeditor that ships with 2006 v3 sp3?
Reply
, 2/8/2007 3:13:30 AM
Hi Bryan,

Actually, this implementation is not related to the version of r.a.d.editor. Do you have any problems using it with r.a.d.editor that ships with 2006 v3 sp3?

Kind regards,
Vlad
the telerik team

Reply
Bryan Maiden, 2/8/2007 3:42:13 AM
I haven't tried it yet, do you have a VB version of this that I can include?

Reply
, 2/8/2007 4:39:08 AM
Hello Bryan,

We just translated the implementation to VB for you. You can find it in the attached archive.

In case you have already made some changes to RadEditorControl.ascx.vb file since the original version, here is the code we have added(in red):

Private btnUnlock As Button
...

Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ...

    If
DesignerMode = DesignerModes.Public OrElse DesignerMode = DesignerModes.PublicLogged Then
        ...
    Else
        Dim isAdmin As Boolean = ServerInfo.Principal.IsInRole("Administrators")
        If isAdmin AndAlso (Not Me.Enabled) AndAlso (Me._deignerPageStatus = DesignerPageStatus.Unlocked OrElse Me._deignerPageStatus = DesignerPageStatus.AsLive) AndAlso (Me._deignerLayoutStatus = DesignerLayoutStatus.Unlocked OrElse Me
._deignerLayoutStatus = DesignerLayoutStatus.AsLive) 
        Then
            btnUnlock = New
Button()
            btnUnlock.Text =
"Unlock and lose changes"
            
btnUnlock.ToolTip = String.Format("This content is checked out by '{0}'"
, GetGuiltyUser())
            AddHandler btnUnlock.Click, AddressOf
btnUnlock_Click
            workflowHolder1.Controls.Add(btnUnlock)
            
' Add link to ContentDiff tool
            workflowHolder1.Controls.Add(New LiteralControl(" "
))
            Dim link As HyperLink = New
HyperLink()
            link.Text =
"View changes"
            link.NavigateUrl = String.Format("javascript:radDesignerControl.showContentDiffs({0}, '{1}')", Me._cellId, Me
.SelectedLanguage)
            workflowHolder1.Controls.Add(link)
        End If

            ...

End Sub 'Page_Load

Private Sub btnUnlock_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim pageManager As PageManager = CType
(TelerikCmsContext.Current.CmsManager.CmsPageManager, PageManager)
    pageManager.DeleteCellContent(
Me
.CellId, 0)
    pageManager.ChangeDefaultCellStatus(CellId,
CByte
(DesignerContentStatus.Unlocked))
    Response.Redirect(Request.RawUrl,
True
)
End Sub

Private Function GetGuiltyUser() As String
    Dim username As String = String
.Empty
    Dim dbFactory As Telerik.ContentManagement.Db.DatabaseFactory = New
Telerik.ContentManagement.Db.DatabaseFactory(DataStore.DbMode, DataStore.ConnectionString)
    Using db As
Telerik.ContentManagement.Db.Database = dbFactory.CreateDatabase()
        Dim sql As String = "SELECT" & ControlChars.CrLf & " users.Username" & ControlChars.CrLf & "FROM" & ControlChars.CrLf & " RadDesignerPageCellContents contents" & ControlChars.CrLf & "INNER JOIN" & ControlChars.CrLf & " RadDesignerUsers AS users" & ControlChars.CrLf & "ON" & ControlChars.CrLf & " contents.UserId = users.UserId" & ControlChars.CrLf & "WHERE" & ControlChars.CrLf & " contents.CellId = " & Me
._cellId
        Dim command As IDbCommand = db.NewCommand(sql, False
)
        Dim reader As
IDataReader = command.ExecuteReader()
        
If reader.Read()
Then
            username = reader(0).ToString()
        End
If
        reader.Close()
    End
Using
    Return
username
End
Function

Hope this will help.

Sincerely yours,
Vlad
the telerik team


Reply
Bryan Maiden, 2/8/2007 5:43:40 AM
Hi Vlad,
there wasn't another attached archive with the vb.
I tried putting the code in, however it doen't seem to have changed anyhting, does it not also need a change to the ascx file to actually show the things?

Reply
, 2/8/2007 5:54:47 AM
RadEditorControlUnlocker.ascx.vb.zip
Hello Bryan,

Sorry, my omission. Here is the RadEditorControlUnlocker.ascx.vb.

Kind regards,
Vlad
the telerik team