talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Changing procedure/authority name in right sidebar Type column

JM
Jesse Martinez
Tue, Aug 14, 2012 7:35 PM

Hi all,

I'm looking to change the label used for the related/referenced
procedure/authority name in the right sidebar under the "Type" column.
Since I'm renaming an authority I'd like to have a consistent label
across the entire tenant. How can I go about changing this label?

Thanks,

  • Jesse
Hi all, I'm looking to change the label used for the related/referenced procedure/authority name in the right sidebar under the "Type" column. Since I'm renaming an authority I'd like to have a consistent label across the entire tenant. How can I go about changing this label? Thanks, - Jesse
ZY
Zenevich, Yura
Tue, Aug 14, 2012 7:36 PM

Hey Jesse, generally this stuff should be in message.properties file in bundle folder. Unless your changes require more updates than just in UI,

Yura

On 2012-08-14, at 3:35 PM, Jesse Martinez wrote:

Hi all,

I'm looking to change the label used for the related/referenced
procedure/authority name in the right sidebar under the "Type" column.
Since I'm renaming an authority I'd like to have a consistent label
across the entire tenant. How can I go about changing this label?

Thanks,

  • Jesse

Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

Hey Jesse, generally this stuff should be in message.properties file in bundle folder. Unless your changes require more updates than just in UI, Yura On 2012-08-14, at 3:35 PM, Jesse Martinez wrote: > Hi all, > > I'm looking to change the label used for the related/referenced > procedure/authority name in the right sidebar under the "Type" column. > Since I'm renaming an authority I'd like to have a consistent label > across the entire tenant. How can I go about changing this label? > > Thanks, > > - Jesse > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
RL
Ray Lee
Tue, Aug 14, 2012 7:53 PM

If there's a way to do this, I'd like to know as well. There's no example of it anywhere. The same goes for the Field column in Terms Used, which should show the label, not the underlying field name.

Yura, does the RecordList component have a way of knowing that certain column values either are, or should be converted to, keys in the message bundle? It seems like that would be necessary for this to work.

Thanks,
Ray

On Aug 14, 2012, at 12:36 PM, Zenevich, Yura wrote:

Hey Jesse, generally this stuff should be in message.properties file in bundle folder. Unless your changes require more updates than just in UI,

Yura

On 2012-08-14, at 3:35 PM, Jesse Martinez wrote:

Hi all,

I'm looking to change the label used for the related/referenced
procedure/authority name in the right sidebar under the "Type" column.
Since I'm renaming an authority I'd like to have a consistent label
across the entire tenant. How can I go about changing this label?

Thanks,

  • Jesse

Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

If there's a way to do this, I'd like to know as well. There's no example of it anywhere. The same goes for the Field column in Terms Used, which should show the label, not the underlying field name. Yura, does the RecordList component have a way of knowing that certain column values either are, or should be converted to, keys in the message bundle? It seems like that would be necessary for this to work. Thanks, Ray On Aug 14, 2012, at 12:36 PM, Zenevich, Yura wrote: > Hey Jesse, generally this stuff should be in message.properties file in bundle folder. Unless your changes require more updates than just in UI, > > Yura > > On 2012-08-14, at 3:35 PM, Jesse Martinez wrote: > >> Hi all, >> >> I'm looking to change the label used for the related/referenced >> procedure/authority name in the right sidebar under the "Type" column. >> Since I'm renaming an authority I'd like to have a consistent label >> across the entire tenant. How can I go about changing this label? >> >> Thanks, >> >> - Jesse >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org > > > _______________________________________________ > Work mailing list > Work@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org
RJ
Rick Jaffe
Tue, Aug 14, 2012 11:59 PM

Jesse, Ray -

I don't see an easy way to do this, but it seems feasible. The UI gets the information it needs from the app layer through its call to http://localhost:8180/collectionspace/tenant/core/cataloging/authorities/{csid}…, which includes values for record type and namespace, as in this example:

{"termsUsed":{"results":[{"sourceFieldName":"contentConcept","sourceFieldType":"collection-object","sourceFieldselector":"object-description-content-concept","number":"high school","csid":"urn:cspace:name(highschool1344978977464)","recordtype":"concept","namespace":"concept"},{"sourceFieldName":"contentConcept","sourceFieldType":"collection-object","sourceFieldselector":"object-description-content-concept","number":"digital photo","csid":"urn:cspace:name(digitalphoto1344980070516)","recordtype":"concept","namespace":"material_ca"}],"pagination":{"totalItems":"2","pageSize":"5","itemsInPage":"2","pageNum":"0"}},"csid":"b893c21d-2325-4f9b-a314"}
The UI uses the value of recordtype to fill in the Type column of the sidebar. You could change that to namespace on line 148 of sidebar.js:

        vocabularies: {
            type: "cspace.relatedRecordsList",
            options: {
                primary: "{sidebar}.options.primary",
                model: {
                    related: "authorities"
                },
                related: "authorities",
                components: {
                    rrlListView: {
                        options: {
                            elPath: "results",
                            model: {
                                columns: [{
                                    sortable: true,
                                    id: "number",
                                    name: "%recordType-number"
                                }, {
                                    sortable: true,
                                    id: "namespace",        // ln 148; currently set to "recordtype"
                                    name: "recordType"
                                }, {
                                    sortable: true,
                                    id: "sourceFieldName",
                                    name: "sourceFieldName"
                                }]
                            }
                        }
                    }
                }
            }

With that change, you'd have the correct vocabulary instance listed, but it would appear as a machine-oriented name, in this case "material_ca". You would have to figure out how to show an associated label from core-messages.properties, something like "Material Concepts". (Or maybe you could add a string value to the .js file.) This is the exact problem Ray would like to solve to show the human-readable label of the field, rather than its internal name.

Rick

On Aug 14, 2012, at 12:53 PM, Ray Lee wrote:

If there's a way to do this, I'd like to know as well. There's no example of it anywhere. The same goes for the Field column in Terms Used, which should show the label, not the underlying field name.

Yura, does the RecordList component have a way of knowing that certain column values either are, or should be converted to, keys in the message bundle? It seems like that would be necessary for this to work.

Thanks,
Ray

On Aug 14, 2012, at 12:36 PM, Zenevich, Yura wrote:

Hey Jesse, generally this stuff should be in message.properties file in bundle folder. Unless your changes require more updates than just in UI,

Yura

On 2012-08-14, at 3:35 PM, Jesse Martinez wrote:

Hi all,

I'm looking to change the label used for the related/referenced
procedure/authority name in the right sidebar under the "Type" column.
Since I'm renaming an authority I'd like to have a consistent label
across the entire tenant. How can I go about changing this label?

Thanks,

  • Jesse

Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

Jesse, Ray - I don't see an easy way to do this, but it seems feasible. The UI gets the information it needs from the app layer through its call to http://localhost:8180/collectionspace/tenant/core/cataloging/authorities/{csid}…, which includes values for record type and namespace, as in this example: {"termsUsed":{"results":[{"sourceFieldName":"contentConcept","sourceFieldType":"collection-object","sourceFieldselector":"object-description-content-concept","number":"high school","csid":"urn:cspace:name(highschool1344978977464)","recordtype":"concept","namespace":"concept"},{"sourceFieldName":"contentConcept","sourceFieldType":"collection-object","sourceFieldselector":"object-description-content-concept","number":"digital photo","csid":"urn:cspace:name(digitalphoto1344980070516)","recordtype":"concept","namespace":"material_ca"}],"pagination":{"totalItems":"2","pageSize":"5","itemsInPage":"2","pageNum":"0"}},"csid":"b893c21d-2325-4f9b-a314"} The UI uses the value of recordtype to fill in the Type column of the sidebar. You could change that to namespace on line 148 of sidebar.js: vocabularies: { type: "cspace.relatedRecordsList", options: { primary: "{sidebar}.options.primary", model: { related: "authorities" }, related: "authorities", components: { rrlListView: { options: { elPath: "results", model: { columns: [{ sortable: true, id: "number", name: "%recordType-number" }, { sortable: true, id: "namespace", // ln 148; currently set to "recordtype" name: "recordType" }, { sortable: true, id: "sourceFieldName", name: "sourceFieldName" }] } } } } } With that change, you'd have the correct vocabulary instance listed, but it would appear as a machine-oriented name, in this case "material_ca". You would have to figure out how to show an associated label from core-messages.properties, something like "Material Concepts". (Or maybe you could add a string value to the .js file.) This is the exact problem Ray would like to solve to show the human-readable label of the field, rather than its internal name. Rick On Aug 14, 2012, at 12:53 PM, Ray Lee wrote: > If there's a way to do this, I'd like to know as well. There's no example of it anywhere. The same goes for the Field column in Terms Used, which should show the label, not the underlying field name. > > Yura, does the RecordList component have a way of knowing that certain column values either are, or should be converted to, keys in the message bundle? It seems like that would be necessary for this to work. > > Thanks, > Ray > > > On Aug 14, 2012, at 12:36 PM, Zenevich, Yura wrote: > >> Hey Jesse, generally this stuff should be in message.properties file in bundle folder. Unless your changes require more updates than just in UI, >> >> Yura >> >> On 2012-08-14, at 3:35 PM, Jesse Martinez wrote: >> >>> Hi all, >>> >>> I'm looking to change the label used for the related/referenced >>> procedure/authority name in the right sidebar under the "Type" column. >>> Since I'm renaming an authority I'd like to have a consistent label >>> across the entire tenant. How can I go about changing this label? >>> >>> Thanks, >>> >>> - Jesse >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >> >> >> _______________________________________________ >> Work mailing list >> Work@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org > > > _______________________________________________ > Work mailing list > Work@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org
JM
Jesse Martinez
Wed, Aug 15, 2012 3:02 PM

Thanks for the research, Rick. I think the Sidebar.js file you
reference is from version 2.5, which has been significantly
refactored/changed from 2.4, which is what I'm using.

I spoke with Yura briefly about this yesterday and he believes this is
a known issue. I'm hoping this can become an elevated issue since it
appears a few deployers are interested in a solution. (Maybe as a
patch for 2.4 users??)

  • Jesse

On Tue, Aug 14, 2012 at 7:59 PM, Rick Jaffe rjaffe@berkeley.edu wrote:

Jesse, Ray -

I don't see an easy way to do this, but it seems feasible. The UI gets the
information it needs from the app layer through its call to
http://localhost:8180/collectionspace/tenant/core/cataloging/authorities/{csid}…,
which includes values for record type and namespace, as in this example:

{"termsUsed":{"results":[{"sourceFieldName":"contentConcept","sourceFieldType":"collection-object","sourceFieldselector":"object-description-content-concept","number":"high
school","csid":"urn:cspace:name(highschool1344978977464)","recordtype":"concept","namespace":"concept"},{"sourceFieldName":"contentConcept","sourceFieldType":"collection-object","sourceFieldselector":"object-description-content-concept","number":"digital
photo","csid":"urn:cspace:name(digitalphoto1344980070516)","recordtype":"concept","namespace":"material_ca"}],"pagination":{"totalItems":"2","pageSize":"5","itemsInPage":"2","pageNum":"0"}},"csid":"b893c21d-2325-4f9b-a314"}

The UI uses the value of recordtype to fill in the Type column of the
sidebar. You could change that to namespace on line 148 of sidebar.js:

         vocabularies: {
             type: "cspace.relatedRecordsList",
             options: {
                 primary: "{sidebar}.options.primary",
                 model: {
                     related: "authorities"
                 },
                 related: "authorities",
                 components: {
                     rrlListView: {
                         options: {
                             elPath: "results",
                             model: {
                                 columns: [{
                                     sortable: true,
                                     id: "number",
                                     name: "%recordType-number"
                                 }, {
                                     sortable: true,
                                     id: "namespace",        // ln 148;

currently set to "recordtype"
name: "recordType"
}, {
sortable: true,
id: "sourceFieldName",
name: "sourceFieldName"
}]
}
}
}
}
}

With that change, you'd have the correct vocabulary instance listed, but it
would appear as a machine-oriented name, in this case "material_ca". You
would have to figure out how to show an associated label from
core-messages.properties, something like "Material Concepts". (Or maybe you
could add a string value to the .js file.) This is the exact problem Ray
would like to solve to show the human-readable label of the field, rather
than its internal name.

Rick

On Aug 14, 2012, at 12:53 PM, Ray Lee wrote:

If there's a way to do this, I'd like to know as well. There's no example of
it anywhere. The same goes for the Field column in Terms Used, which should
show the label, not the underlying field name.

Yura, does the RecordList component have a way of knowing that certain
column values either are, or should be converted to, keys in the message
bundle? It seems like that would be necessary for this to work.

Thanks,
Ray

On Aug 14, 2012, at 12:36 PM, Zenevich, Yura wrote:

Hey Jesse, generally this stuff should be in message.properties file in
bundle folder. Unless your changes require more updates than just in UI,

Yura

On 2012-08-14, at 3:35 PM, Jesse Martinez wrote:

Hi all,

I'm looking to change the label used for the related/referenced

procedure/authority name in the right sidebar under the "Type" column.

Since I'm renaming an authority I'd like to have a consistent label

across the entire tenant. How can I go about changing this label?

Thanks,

  • Jesse

Talk mailing list

Talk@lists.collectionspace.org

http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org


Work mailing list

Work@lists.collectionspace.org

http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org


Work mailing list
Work@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org

Thanks for the research, Rick. I think the Sidebar.js file you reference is from version 2.5, which has been significantly refactored/changed from 2.4, which is what I'm using. I spoke with Yura briefly about this yesterday and he believes this is a known issue. I'm hoping this can become an elevated issue since it appears a few deployers are interested in a solution. (Maybe as a patch for 2.4 users??) - Jesse On Tue, Aug 14, 2012 at 7:59 PM, Rick Jaffe <rjaffe@berkeley.edu> wrote: > Jesse, Ray - > > I don't see an easy way to do this, but it seems feasible. The UI gets the > information it needs from the app layer through its call to > http://localhost:8180/collectionspace/tenant/core/cataloging/authorities/{csid}…, > which includes values for record type and namespace, as in this example: > > {"termsUsed":{"results":[{"sourceFieldName":"contentConcept","sourceFieldType":"collection-object","sourceFieldselector":"object-description-content-concept","number":"high > school","csid":"urn:cspace:name(highschool1344978977464)","recordtype":"concept","namespace":"concept"},{"sourceFieldName":"contentConcept","sourceFieldType":"collection-object","sourceFieldselector":"object-description-content-concept","number":"digital > photo","csid":"urn:cspace:name(digitalphoto1344980070516)","recordtype":"concept","namespace":"material_ca"}],"pagination":{"totalItems":"2","pageSize":"5","itemsInPage":"2","pageNum":"0"}},"csid":"b893c21d-2325-4f9b-a314"} > > The UI uses the value of recordtype to fill in the Type column of the > sidebar. You could change that to namespace on line 148 of sidebar.js: > > vocabularies: { > type: "cspace.relatedRecordsList", > options: { > primary: "{sidebar}.options.primary", > model: { > related: "authorities" > }, > related: "authorities", > components: { > rrlListView: { > options: { > elPath: "results", > model: { > columns: [{ > sortable: true, > id: "number", > name: "%recordType-number" > }, { > sortable: true, > id: "namespace", // ln 148; > currently set to "recordtype" > name: "recordType" > }, { > sortable: true, > id: "sourceFieldName", > name: "sourceFieldName" > }] > } > } > } > } > } > > With that change, you'd have the correct vocabulary instance listed, but it > would appear as a machine-oriented name, in this case "material_ca". You > would have to figure out how to show an associated label from > core-messages.properties, something like "Material Concepts". (Or maybe you > could add a string value to the .js file.) This is the exact problem Ray > would like to solve to show the human-readable label of the field, rather > than its internal name. > > Rick > > > On Aug 14, 2012, at 12:53 PM, Ray Lee wrote: > > If there's a way to do this, I'd like to know as well. There's no example of > it anywhere. The same goes for the Field column in Terms Used, which should > show the label, not the underlying field name. > > Yura, does the RecordList component have a way of knowing that certain > column values either are, or should be converted to, keys in the message > bundle? It seems like that would be necessary for this to work. > > Thanks, > Ray > > > On Aug 14, 2012, at 12:36 PM, Zenevich, Yura wrote: > > Hey Jesse, generally this stuff should be in message.properties file in > bundle folder. Unless your changes require more updates than just in UI, > > > Yura > > > On 2012-08-14, at 3:35 PM, Jesse Martinez wrote: > > > Hi all, > > > I'm looking to change the label used for the related/referenced > > procedure/authority name in the right sidebar under the "Type" column. > > Since I'm renaming an authority I'd like to have a consistent label > > across the entire tenant. How can I go about changing this label? > > > Thanks, > > > - Jesse > > > _______________________________________________ > > Talk mailing list > > Talk@lists.collectionspace.org > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org > > > > _______________________________________________ > > Work mailing list > > Work@lists.collectionspace.org > > http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org > > > > _______________________________________________ > Work mailing list > Work@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org > >