This is a feature request; I would like a keyword (really an additional field) in docMGR that displays the item ID (it shows up in the url of the document). Asking a user to look in the url is less than user friendly. We do technical documents as part of projects, and it would be great to have a unique document number. This would be listed on the drawing itself. That makes it a lot easier to pull up the document when edits need to be done.
If implemented as a keyword, it would be a display option. I would be happy to see it as a standard field in the object properties screen.
A search field "Object ID" would need to be added as well.
Thanks for a great piece of software!
I'm running it on a 64 bit FreeBSD 7.2 server with Postgres 9.
Regards,
Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry! We had an ongoing condo and I never responded! Sigh, it's been a long year.
Drop this into the modules/center/docmgr/proplib/properties.js file
function showObjID()
{
var cell = ce("div","propCell");
cell.appendChild(ce("div","formHeader","","Object ID"));
cell.appendChild(ce("div","objectIdCell","",objinfo.id));
return cell;
}
Then, starting at line 15 of the same file, you'll see a bunch of content.appendChild lines. Just
insert "content.appendChild(showObjID());" in between one of the existing lines, depending on where
you want it, and refresh the page.
Eric
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would like to be able to search for a document based on it's ID.
Best case scenario would be if I could add a search criteria for Object ID.
2nd best (more complicated), would be a script that loads the object ID into a keyword during the initial save.
- Thinking out loud… that's not good because (a) it's complicated, and (b) it's redundant.
So how would I add a search criteria for object ID?
Regards,
Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
around line 229 of the apilib/lib/docmgr/lib/search_function.php file, add something like
if (is_numeric($string))
{
$sqlArr = "SELECT id FROM docmgr.dm_object WHERE id='".$string."'";
}
I tested this out and it worked fine. You will be limited to whether or not you are searching in the current folder, or everywhere, depending on your search parameters.
I'll just leave it in so the functionality will be there for the next release.
Eric
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I added the above code in apilib/lib/docmgr/lib/search_function.inc.php and it didn't work (no errors, but it doesn't pull up any files from the object id). I moved DocMGR to a cPanel VPS instance, and I've been having other issues, so maybe this issue is related as well.
I'm looking into changing to mod_php (not sure if I can on this VPS, but I'll try). In the meantime, it seems that mod_php is a requirement for DocMGR at this time.
Regards,
Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Greetings!
This is a feature request; I would like a keyword (really an additional field) in docMGR that displays the item ID (it shows up in the url of the document). Asking a user to look in the url is less than user friendly. We do technical documents as part of projects, and it would be great to have a unique document number. This would be listed on the drawing itself. That makes it a lot easier to pull up the document when edits need to be done.
If implemented as a keyword, it would be a display option. I would be happy to see it as a standard field in the object properties screen.
A search field "Object ID" would need to be added as well.
Thanks for a great piece of software!
I'm running it on a 64 bit FreeBSD 7.2 server with Postgres 9.
Regards,
Paul
Just to be clear, you wanted this in the object properties page? Or in the document editor?
In the object properties page.
Thanks for the quick response!
Greetings;
How can I add a field to display the "Object ID" in the object properties page?
I'm guessing that it's not much code, but I don't know what to add, or what file to add it to.
Thanks in advance!
Paul
Sorry! We had an ongoing condo and I never responded! Sigh, it's been a long year.
Drop this into the modules/center/docmgr/proplib/properties.js file
function showObjID()
{
var cell = ce("div","propCell");
cell.appendChild(ce("div","formHeader","","Object ID"));
cell.appendChild(ce("div","objectIdCell","",objinfo.id));
return cell;
}
Then, starting at line 15 of the same file, you'll see a bunch of content.appendChild lines. Just
insert "content.appendChild(showObjID());" in between one of the existing lines, depending on where
you want it, and refresh the page.
Eric
Thanks Eric, it works perfectly!
Greetings Eric;
I hope this year is less stressful!
I would like to be able to search for a document based on it's ID.
Best case scenario would be if I could add a search criteria for Object ID.
2nd best (more complicated), would be a script that loads the object ID into a keyword during the initial save.
- Thinking out loud… that's not good because (a) it's complicated, and (b) it's redundant.
So how would I add a search criteria for object ID?
Regards,
Paul
Try this:
around line 229 of the apilib/lib/docmgr/lib/search_function.php file, add something like
if (is_numeric($string))
{
$sqlArr = "SELECT id FROM docmgr.dm_object WHERE id='".$string."'";
}
I tested this out and it worked fine. You will be limited to whether or not you are searching in the current folder, or everywhere, depending on your search parameters.
I'll just leave it in so the functionality will be there for the next release.
Eric
Greetings Eric;
I added the above code in apilib/lib/docmgr/lib/search_function.inc.php and it didn't work (no errors, but it doesn't pull up any files from the object id). I moved DocMGR to a cPanel VPS instance, and I've been having other issues, so maybe this issue is related as well.
I'm looking into changing to mod_php (not sure if I can on this VPS, but I'll try). In the meantime, it seems that mod_php is a requirement for DocMGR at this time.
Regards,
Paul