EPrints Technical Mailing List Archive

Message: #03291


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Browse view by document language.


Okay so not so simple to do anyway.

I guess Allan's suggestion is the way to try then.

"Is it that you want to only show the documents in Danish on your "view"?"

Well, actually that is exactly what I don't want. I need to file documents a videos from many different countries. But many of my visitors (apart from the native English speakers of course) will be able to use both English and entries in their native tongue.

It can be a bit refusing though to see many different languages in the same view though, so it would be a nice feature to be able to browse by language and even better to for instance browse by author and then sort by language.

These guys have been able to figure out how to browse by document language:
http://orgprints.org/view/doclang/

I guess they implemented the hack, I referred to earlier, which can be found here:
http://osdir.com/ml/web.eprints.devel/2003-03/msg00053.html

Thanks for the feedback gentlemen.

On 17-07-2014 17:29, Sebastien Francois wrote:
Hi Jacob,

OK - "documents.language" should work in a search configuration (on EPrints 3.3+) but perhaps this doesn't work for "views".

One reason this may not work is conceptual (and this complements Alan's reply): you are rendering a list of "EPrint" objects but "documents.language" is a switch/field on the "Document" objects. Since there's a 1-to-n relationships between EPrint and Document objects, the software will be confused as to how to render the alternative languages (since the alternative languages are, in fact, part of the same EPrint object).

Is it that you want to only show the documents in Danish on your "view"?

Seb


On 17/07/14 14:45, Jacob Wenzel wrote:
Thank you for clearing that out. I also tried "documents.language", but it produced the same error.

But why don't you think it will work? Not that I would be likely to understand a complicated explanation, but I would really love to have that option on my repository.

If it is indeed impossible, do I have any other options for letting my visitors sort the documents without searching.

I'm not keen on making a full translation of EPrints into Danish, and furthermore most Danes speak English as well, so I wouldn't want hide the English documents from my Danish visitors, just let them be able to sort them.

Thank you both for your feedback!

On 17-07-2014 15:23, Sebastien Francois wrote:
John was close, but it's "documents" (now I'm not sure what you're trying to achieve will work)

Seb

On 17/07/14 11:36, Jacob Wenzel wrote:
Thanks for your reply, but I actually that was one of the few other options I already tried.

It produces a slightly different error, but still no view list.

Error:
------------------------------------------------------------------
---------------- EPrints System Error ----------------------------
------------------------------------------------------------------
Dataset eprint does not have a field 'document'
------------------------------------------------------------------
EPrints System Error inducing stack dump
 at /usr/share/eprints3/bin/../perl_lib/EPrints.pm line 146
        EPrints::abort() called at /usr/share/eprints3/bin/../perl_lib/EPrints/Utils.pm line 674
        EPrints::Utils::field_from_config_string('EPrints::DataSet=HASH(0x37d5a58)', 'document.language') called at /usr/share/eprints3/bin/../perl_lib/EPrints/Update/Views.pm line 2137
        EPrints::Update::Views::menus_fields('EPrints::Update::Views=HASH(0x33049a0)') called at /usr/share/eprints3/bin/../perl_lib/EPrints/Update/Views.pm line 2053
        EPrints::Update::Views::fieldlist_sizes('EPrints::Update::Views=HASH(0x33049a0)', 'ARRAY(0x6213ea0)', 0) called at /usr/share/eprints3/bin/../perl_lib/EPrints/Update/Views.pm line 2238
        EPrints::Update::Views::update_view_by_path('EPrints::Update::Views=HASH(0x33049a0)', 'on_write', 'CODE(0x33046d0)', 'langid', 'en', 'do_menus', 1, 'do_lists', 1, ...) called at bin/generate_views line 204




*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/



*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/



*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/