It would be nice to have weights for Publication Types, especially for drop down selection on creating biblio. Currently I think it is listed based on Type ID, for new type it will always at the bottom, which is not always desirable.

This can be used to help to move more frequently use Publication Types to top for faster access. And grouping of similar publication types that are not default in biblio.

Comments

rjerome’s picture

The functionality is there, i.e. types do have a weight associated with them, there just not being used at the present. I started to implement this a while back and never finished it. I'll try to push it back up the priority list...

rajab natshah’s picture

Issue summary: View changes

I think We need to have the weight effect all viewed data or drop-downs.
I'm working on a patch for this.

rajab natshah’s picture

Status: Active » Needs work
rajab natshah’s picture

I have Completed the Weight Feature based on rjerome's Foundation.

Biblio Publication Types with Weight

This patch will have the Weight works for form Field and Filters, order in the publication types in displays will be effected with value of weight in publication type to.

Rewarding :)

rajab natshah’s picture

Status: Needs work » Needs review
rajab natshah’s picture

This is the Full and Better Patch #6.
- Fixed space in link issue.
- Set the code to Standard format.

Rewarding :)

Anonymous’s picture

From which branch are you working? 7.x-1.x seems the most recent and most up2date.

Your patch removes the following form config, that does not seem right

-  $form['bibtex']['biblio_remove_double_bibtex_braces'] = array(
-    '#type' => 'checkbox',
-    '#title' => t('Configure the BibTex import parser to replace all double braces with single braces.'),
-    '#return_value' => 1,
-    '#default_value' => variable_get('biblio_remove_double_bibtex_braces', 0),
-    '#description' => t('<strong>{{</strong> will be replaced with <strong>{</strong> and <strong>}}</strong> will be replaced with <strong>}</strong>. This provides compatibility with importing BibTex from the <a href="http://thomsonreuters.com/web-of-science/">Web of Science</a>. Be aware that this removes support for BibTex "Protected Capitalization".'),
-  );

This looks a little odd:

function biblio_admin_types_weight_increase() {
+  $args = func_get_args();
+  if ($args[0] > 0 && is_numeric($args[0])) {

I think it is more Drupal-like to add a 'page argument' and use that as a function argument here instead of func_get_args.

De arrow up and down should work different I think, when I push the arrow up the item will go one down and vice versa.

rajab natshah’s picture

Hi Leon,
Thanks for passing by.

This patch is for the 7.x-1.0-rc7 so it's on the 7.x-1.x branch.

and the function is to increase or decrease .. ( Not Up or Down )

About $args = func_get_args();

rjerome is using that for Show and Hide.
I just wanted to see if the patch can make it to the module.
If we need to improve .. for sure all the module need to be improved .. or have the 7.x-2.x or 7.x-3.x ..

I have seen that most of the work is on https://github.com/Gizra/biblio

but we need to work with the latest stable one.

Rewarding :)

rajab natshah’s picture

Version: master » 7.x-1.0-rc7
Anonymous’s picture

The arrow implies that the row is moved downwards, so for me it should be more logical to give the arrow the correct meaning.

There is not a lot activity around this module the last time, so I have no idea how long it will take before the module will be patched.

rajab natshah’s picture

Ok then .. We may employ that then ..
Thanks Leon.

Rewarding work :)

rajab natshah’s picture

Now we do have the advanced patch #12 to do this for views as well.
to have a Sort order field ( Publication type weight ).

publication type weight sort order integration with Views

Rewarding :)

rajab natshah’s picture

rajab natshah’s picture

I have been testing this patch in a production environments and it's working in a good status.

Not sure if we can switch to use the Drag and Drop to re-order.

I do have a potential interest to help on any new features, or marked milestones. on the biblio module or any other sub modules.

Rewarded work :)

szeidler’s picture

I also worked on the weighted publication type listing. I used Drupal's default tabledrag functionality to make the interface consistent. I patched it against 7.x-1.x-dev, but the patch is also applicable against 7.x-1.0-rc7. Would be nice, to get a patch into the dev-branch, to make the publication types more usable for clients with a special set of publication types.

Status: Needs review » Needs work
szeidler’s picture

Status: Needs work » Needs review
StatusFileSize
new127.48 KB

Here's a reroll. Let's see what the testbot thinks.

liam morland’s picture

Version: 7.x-1.0-rc7 » 7.x-1.x-dev
liam morland’s picture

Status: Needs review » Needs work

A huge patch like this needs tests.

szeidler’s picture

Thanks for looking into this. I just saw, that I actually had a bit of a git-trouble in my recent patch and committed a *.orig file, which came from patching.
When cleaning this up, the actual patch should be much less complex.

szeidler’s picture

Status: Needs work » Needs review
StatusFileSize
new11.64 KB

Here's the cleaned up patch.

liam morland’s picture

Status: Needs review » Needs work

Thanks. This will still need tests.