WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org
View all threadsHi All,
I'm looking to add an extra column to the right-side box for related
procedures. Has anyone done something like this before for their
implementation?
Thanks,
Hi Jesse,
We haven't done exactly that, but I have a pretty good idea how to do it.
In Sidebar.js, there's a subcomponent called procedures, of type
cspace.relatedRecordsList. That's the one you want to change. There's also
a subcomponent called vocabularies, which is also a
cspace.relatedRecordsList. Notice that vocabularies overrides the default
columns of its rrlListView component. You can change the columns for
procedures the same way. Make sure to also configure the field you want to
show to appear in list results.
Ray
On Thu, Dec 5, 2013 at 10:45 AM, Jesse Martinez mjesse@gmail.com wrote:
Hi All,
I'm looking to add an extra column to the right-side box for related
procedures. Has anyone done something like this before for their
implementation?
Thanks,
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Here's a quick example of adding a csid column to the related records
sidebar:
https://github.com/ray-lee/ui/compare/pahma_3.3...addcoltest
This was just a test. When you do it for real, you may not want to do it in
defaults, and you might do it in a json config file instead of Sidebar.js,
and you'd have to add a message for the column header.
Ray
On Thu, Dec 5, 2013 at 12:36 PM, Ray Lee rhlee@berkeley.edu wrote:
Hi Jesse,
We haven't done exactly that, but I have a pretty good idea how to do it.
In Sidebar.js, there's a subcomponent called procedures, of type
cspace.relatedRecordsList. That's the one you want to change. There's
also a subcomponent called vocabularies, which is also a
cspace.relatedRecordsList. Notice that vocabularies overrides the default
columns of its rrlListView component. You can change the columns for
procedures the same way. Make sure to also configure the field you want
to show to appear in list results.
Ray
On Thu, Dec 5, 2013 at 10:45 AM, Jesse Martinez mjesse@gmail.com wrote:
Hi All,
I'm looking to add an extra column to the right-side box for related
procedures. Has anyone done something like this before for their
implementation?
Thanks,
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Hi Ray,
Thanks a bunch, this worked for me.
How would you go about adding such a change to SideBar,js, or any core js
file, as a config file and not as a tenant copy of a core file? In other
words, how does a config file get hooked into the UI layer?
Thanks,
On Thu, Dec 5, 2013 at 3:59 PM, Ray Lee rhlee@berkeley.edu wrote:
Here's a quick example of adding a csid column to the related records
sidebar:
https://github.com/ray-lee/ui/compare/pahma_3.3...addcoltest
This was just a test. When you do it for real, you may not want to do it
in defaults, and you might do it in a json config file instead of
Sidebar.js, and you'd have to add a message for the column header.
Ray
On Thu, Dec 5, 2013 at 12:36 PM, Ray Lee rhlee@berkeley.edu wrote:
Hi Jesse,
We haven't done exactly that, but I have a pretty good idea how to do it.
In Sidebar.js, there's a subcomponent called procedures, of type
cspace.relatedRecordsList. That's the one you want to change. There's
also a subcomponent called vocabularies, which is also a
cspace.relatedRecordsList. Notice that vocabularies overrides the
default columns of its rrlListView component. You can change the columns
for procedures the same way. Make sure to also configure the field you
want to show to appear in list results.
Ray
On Thu, Dec 5, 2013 at 10:45 AM, Jesse Martinez mjesse@gmail.com wrote:
Hi All,
I'm looking to add an extra column to the right-side box for related
procedures. Has anyone done something like this before for their
implementation?
Thanks,
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Hi Jesse,
I'm still fuzzy on where in the code this happens, but options specified in
config files override options specified in defaults. My take on it is that
if you want to have this new Related Records column appear wherever the
cspace.sidebar component is used, then you want it to be the default
behavior, and changing it in Sidebar.js is the right thing to do. The
config files let you override this default behavior for particular record
types, so if you only want the new column to appear on the record editor
for one or two record types, then the right place to make the change is in
the config files for those record types. And then there's Demands.js, which
lets you do even more fine tuning of options, but I'm fuzzy on whether the
config files or Demands.js have higher precedence.
If you do want to make the change in config, you have to figure out where
in the component hierarchy the sidebar component lives, so you can nest it
at the right level of the json tree. This is basically impossible without
digging through code, so let me know if you need help with that. From a
quick scan, it doesn't look like cspace.sidebar is a subcomponent of
anything, so maybe it would go at the same level as PageBuilder and
PageBuilderIO, but I'm not sure. I'm hoping the documentation Anastasia is
working on will make this easier.
Whether you make the change in js or config, there's the orthogonal
question of whether to do it in defaults or your tenant folder. My take on
that is that if you want that change to apply to all of your tenants, then
make it in defaults, but if you only want it to apply to this one tenant,
make it in a tenant copy of the file.
Hope that helps!
Ray
On Mon, Dec 9, 2013 at 6:37 AM, Jesse Martinez mjesse@gmail.com wrote:
Hi Ray,
Thanks a bunch, this worked for me.
How would you go about adding such a change to SideBar,js, or any core js
file, as a config file and not as a tenant copy of a core file? In other
words, how does a config file get hooked into the UI layer?
Thanks,
On Thu, Dec 5, 2013 at 3:59 PM, Ray Lee rhlee@berkeley.edu wrote:
Here's a quick example of adding a csid column to the related records
sidebar:
https://github.com/ray-lee/ui/compare/pahma_3.3...addcoltest
This was just a test. When you do it for real, you may not want to do it
in defaults, and you might do it in a json config file instead of
Sidebar.js, and you'd have to add a message for the column header.
Ray
On Thu, Dec 5, 2013 at 12:36 PM, Ray Lee rhlee@berkeley.edu wrote:
Hi Jesse,
We haven't done exactly that, but I have a pretty good idea how to do
it. In Sidebar.js, there's a subcomponent called procedures, of type
cspace.relatedRecordsList. That's the one you want to change. There's
also a subcomponent called vocabularies, which is also a
cspace.relatedRecordsList. Notice that vocabularies overrides the
default columns of its rrlListView component. You can change the
columns for procedures the same way. Make sure to also configure the
field you want to show to appear in list results.
Ray
On Thu, Dec 5, 2013 at 10:45 AM, Jesse Martinez mjesse@gmail.comwrote:
Hi All,
I'm looking to add an extra column to the right-side box for related
procedures. Has anyone done something like this before for their
implementation?
Thanks,
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org