Extend front-end UI of browser panel

OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
mamad
Expert Boarder
Expert Boarder
Posts: 85
Joined: Mon Jun 25, 2018 5:13 am

Extend front-end UI of browser panel

Post by mamad » Sat Aug 18, 2018 10:39 am

Hi guys
i want to extend some features of browser panel ( i cant find any detail about browser panel in documentation)
my requirements include :
1- Delete a column from browser panel
2- Add a new column to browser panel at proper place ( for example after Name column and before Size column ) to show a feature of documents
3- Change icon of a row
I explain this things also in the attached image

I want to know if its possible to implement this requirements and probably some useful links about how to do that

Thanks in advance
Attachments
a.JPG

mamad
Expert Boarder
Expert Boarder
Posts: 85
Joined: Mon Jun 25, 2018 5:13 am

Re: Extend front-end UI of browser panel

Post by mamad » Sun Aug 19, 2018 7:31 am

@jllort
Any idea ?? :|

jllort
Moderator
Moderator
Posts: 10547
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Extend front-end UI of browser panel

Post by jllort » Sun Aug 19, 2018 6:34 pm

Better than remove default OpenKM columns etc... is extend profiles or make then visible with an extra variable. Consider that we upgrade the code periodically and if you do not take care on the way you are doing changed, you will have a trouble when we upgrade it. The best option is hide columns from profiles ( it's done in professional version and if it's not done in community might be good idea introduce it ).

The classes you might be interested are FileBrowser.java:
https://github.com/openkm/document-mana ... owser.java

and specially ExtendedScrollTable.java, where is rendered the data:
https://github.com/openkm/document-mana ... Table.java

mamad
Expert Boarder
Expert Boarder
Posts: 85
Joined: Mon Jun 25, 2018 5:13 am

Re: Extend front-end UI of browser panel

Post by mamad » Tue Aug 21, 2018 1:40 pm

well , thank you , i read the whole classes and now i know how to hide a column
But about adding a new column :
i found that there is two kind of columns in GWTProfileFileBrowser class
1-columns like status,name,size,version,last modified and ...
2- columns with name starting from column0 to column9 that named Extra columns or Additinal columns

now , for adding a new column i should change one of extra columns for example use column0 to show my data ? or adding a new column exactly like what is done for columns like name,version,size,etc...
Last edited by mamad on Sun Aug 26, 2018 4:25 am, edited 1 time in total.

jllort
Moderator
Moderator
Posts: 10547
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Extend front-end UI of browser panel

Post by jllort » Thu Aug 23, 2018 9:35 am

You should add a column like name or version. Columns 0 - 9 are for metadata. You should add before these ones.

mamad
Expert Boarder
Expert Boarder
Posts: 85
Joined: Mon Jun 25, 2018 5:13 am

Re: Extend front-end UI of browser panel

Post by mamad » Sun Aug 26, 2018 11:56 am

instead of changing source code i created a new metadata group and add it to one of the extra columns using Profiles menu.
its what i was looking for and Its really easier than changing source code :wink:
The only problem is that i cant move this extra column to another position.
thank you so much for your hints

OpaHeinz
Junior Boarder
Junior Boarder
Posts: 30
Joined: Tue Jan 29, 2019 11:31 am

Re: Extend front-end UI of browser panel

Post by OpaHeinz » Thu Feb 07, 2019 4:26 pm

Hello mamad

I have a similar requirement and would like to know how you did exactly to add a column.

I have to rework a huge list of files manually, which means I have to assign metadata to each of the file :(
It would be fine, if I could see, if there is still a metadata/ property group assigned or not, or which metadata group -name (only the highest level)
Field: "npg_group"
Then I will be able to see, if a file is reworked or not.
For this I thought it should be possible to add a column with the property group-name.
But I still can not find a way to do it and if possible, I don't want to go to deep in the code :)

It would be wonderful if you could give me some tips/hints how to go ahead
Thank you in advance
OpaHeinz

jllort
Moderator
Moderator
Posts: 10547
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Extend front-end UI of browser panel

Post by jllort » Fri Feb 08, 2019 7:36 pm

Take a look at the last tab in the profiles, from there you can add new columns based in metadata values. Consider that this feature might decrease the performance of your application, I do not suggest enable for everybody.

OpaHeinz
Junior Boarder
Junior Boarder
Posts: 30
Joined: Tue Jan 29, 2019 11:31 am

Re: Extend front-end UI of browser panel

Post by OpaHeinz » Sat Feb 09, 2019 8:26 am

Hello Jllord
thank you very much for your help!
This was new for me and I had a look on it, but this is not what I search for.

More or less it would be enough to see if a metadata-group is assigned for the document or not.

Similar like the property-tabular of a document.
If I assign a metadatagroup perhaps with the name "Invoice", then the tabular which is visible in the properties it's named "Invoice"
The best case for me would be, if I could see the first assigned meta-data group label, like "Invoice" in the new column.
like a document content-type

Thank you again for your kindly help
rgds Heinz

jllort
Moderator
Moderator
Posts: 10547
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Extend front-end UI of browser panel

Post by jllort » Sat Feb 09, 2019 4:26 pm

Did you tried to enable metadata column field from profiles as I suggested?

There's not an option to add a column that indicates if a document has or not a group, you only can show a metadata field as a column value.

For my point of view this is a bad approach to solve the problem, really you have some documents what should have metadata. I think will be more interesting having a daily report ( might be a crontab task or standard report sent by mail ) with a list of documents what should have metadata and they do not have. Depending on the nature of your problem the report is a simple SQL or something more complex, usually in this kind of scenarios, it will be better be updated about what is missing rather looking yourself manually.

OpaHeinz
Junior Boarder
Junior Boarder
Posts: 30
Joined: Tue Jan 29, 2019 11:31 am

Re: Extend front-end UI of browser panel

Post by OpaHeinz » Sat Feb 09, 2019 6:35 pm

Yes I did.

my requirement is still based on my current situation.
I startet to work with OKM. I uploaded around 1000 documents and have to move it into a taxonomic structure and have to add meta-data groups based on the type of a document.

My first try was, to add metadata (based on the preview of the document) and after that move each document into the specific taxonomic folder/ subfolder.
But the update of the filelist needed a long time after each single document move.

Out of this I tried to add only metadata and move a couple of documents into the specific taxonomic folder/ subfolder.
But with this way, I can not see on which position of the filelist I am/ or was.

My third idea was:
If I could see in the filelist the state if a metadata assigned or not,
I would add manually the metadata and after that I could rework through all documents and move all documents by a script based on defined rules into the specific taxonomic folder/ sub folder.

I hope I could explain my situation?
(I am not a native english speaker/ sometimes difficult to describe my thoughts in english :oops: )
But at least I understood that there is no solution to solve my requirement out of the box.

Another idea:

Did you know, if there is a possible solution
a) to walk through an exiting folder
b) open metadata dialog
c) after saving the assigned metadata
d) get another dialog, to ask in which folder the file should be moved
e) go back to a

The automation function, which I still had a look on it did not fulfil this really/ or I did it not understand completely
Thank you in advance
rgds
Heinz

jllort
Moderator
Moderator
Posts: 10547
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Extend front-end UI of browser panel

Post by jllort » Mon Feb 11, 2019 7:37 pm

An option might be set destination folder and metadata based in a CSV file, the idea might be:

1- Local folder with csv and files
2- First column identify the document by name
3- Next columns the destination and the metadata

You should read the CVS and iterate each row, then use:
https://docs.openkm.com/kcenter/view/ok ... ingFolders
https://docs.openkm.com/kcenter/view/ok ... eateSimple
https://docs.openkm.com/kcenter/view/ok ... l#addGroup
https://docs.openkm.com/kcenter/view/ok ... tiesSimple

OpaHeinz
Junior Boarder
Junior Boarder
Posts: 30
Joined: Tue Jan 29, 2019 11:31 am

Re: Extend front-end UI of browser panel

Post by OpaHeinz » Tue Feb 12, 2019 9:08 am

Thank you very much for your help!
I have to think about.
Let's see how I will realize it.
rgds
Heinz

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests