Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Locked file in folder view
01-09-2011, 02:22 AM, (This post was last modified: 01-10-2011, 12:34 AM by calcumat.)
#1
Locked file in folder view
In standard, the fact that some file is locked is only visible in document view (of the locked file), which is not very usable.

This modification adds an icon of locked file in folder view and in the "title text" is the lock owner name (see "locked_file_preview" -     ).

To implement modification:
  • copy attached lock.png to out/images :
    .png   lock.png (Size: 732 bytes / Downloads: 62)

  • add new text item ("lock_by") to language file:
    PHP Code:
    $text["lock_by"] = "Locked by"

    .txt   append_lang.inc.txt (Size: 31 bytes / Downloads: 8)

  • apply the patch to file out/out.ViewFolder.php:
    After line 125 ($status = $latestContent->getStatus();) , add line:
    PHP Code:
    $doc_obj getDocument($docID); 
    Change line 136 (print "<td>".getOverallStatusText($status["status"])."</td>";) to:
    PHP Code:
        print "<td>";
        if ( 
    $doc_obj->isLocked() ) {
            print 
    "<img src=\"".UI::getImgPath("lock.png")."\" title=\""getMLText("lock_by").": ".$doc_obj->getLockingUser()->getFullName()."\"> ";
        }
        print 
    getOverallStatusText($status["status"])."</td>"

    .txt   lockedFile.out.ViewFolder.patch.txt (Size: 996 bytes / Downloads: 9)
Reply
04-08-2011, 08:01 PM,
#2
RE: Locked file in folder view
(01-09-2011, 02:22 AM)calcumat Wrote: In standard, the fact that some file is locked is only visible in document view (of the locked file), which is not very usable.

This modification adds an icon of locked file in folder view and in the "title text" is the lock owner name (see "locked_file_preview" - ).

To implement modification:
  • copy attached lock.png to out/images :

  • add new text item ("lock_by") to language file:
    PHP Code:
    $text["lock_by"] = "Locked by"


  • apply the patch to file out/out.ViewFolder.php:
    After line 125 ($status = $latestContent->getStatus();) , add line:
    PHP Code:
    $doc_obj getDocument($docID); 
    Change line 136 (print "<td>".getOverallStatusText($status["status"])."</td>";) to:
    PHP Code:
        print "<td>";
        if ( 
    $doc_obj->isLocked() ) {
            print 
    "<img src=\"".UI::getImgPath("lock.png")."\" title=\""getMLText("lock_by").": ".$doc_obj->getLockingUser()->getFullName()."\"> ";
        }
        print 
    getOverallStatusText($status["status"])."</td>"


Hello Friend,

We implement this script that you passed, but nothing happened, no error has! I wonder if you have any class that needs to be placed, or which version of the system that applies?

Thank you for your attention,

Augusto
Reply
04-08-2011, 11:56 PM,
#3
RE: Locked file in folder view
(01-09-2011, 02:22 AM)calcumat Wrote: In standard, the fact that some file is locked is only visible in document view (of the locked file), which is not very usable.

This modification adds an icon of locked file in folder view and in the "title text" is the lock owner name (see "locked_file_preview" - ).

To implement modification:
  • copy attached lock.png to out/images :

  • add new text item ("lock_by") to language file:
    PHP Code:
    $text["lock_by"] = "Locked by"


  • apply the patch to file out/out.ViewFolder.php:
    After line 125 ($status = $latestContent->getStatus();) , add line:
    PHP Code:
    $doc_obj getDocument($docID); 
    Change line 136 (print "<td>".getOverallStatusText($status["status"])."</td>";) to:
    PHP Code:
        print "<td>";
        if ( 
    $doc_obj->isLocked() ) {
            print 
    "<img src=\"".UI::getImgPath("lock.png")."\" title=\""getMLText("lock_by").": ".$doc_obj->getLockingUser()->getFullName()."\"> ";
        }
        print 
    getOverallStatusText($status["status"])."</td>"


Thanks. Very usefull patch. It won't make into 3.0.0 but the following release will have it.

Uwe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)

Contact Us | LetoDMS Community Forum | Return to Top | | Lite (Archive) Mode | RSS Syndication