A more simple formatter could really be useful.

Something like "9.2" instead of "9.2 / 10".

The attached patch will add the new formatter:

Field Display settings:
Formatter

Views:
Formatter 2

Comments

Fidelix’s picture

StatusFileSize
new2.77 KB

Slightly improved patch, to show 8.0 instead of 8, 7.0 instead of 7, and there goes on...

Using return number_format($rating, 1);

Status: Needs review » Needs work

The last submitted patch, simple_formatter2.patch, failed testing.

ericduran’s picture

This looks good but instead of of adding yet another formatter it would be nice if we can make this a configuration on the other formatter so you can the 8.0 /10 or 8.0.

Does this make sense?

Fidelix’s picture

ericduran, yes, I think you're right. This would make it less confusing and bloated.

I will only be able to work on this in 3 weeks from now, so if someone needs this fast, don't wait for me.

Fidelix’s picture

Title: Simple formatter » Simple formatter setting
Status: Needs work » Needs review
StatusFileSize
new6.5 KB
new8.14 KB

As you suggested. It is now implemented as a formatter option.

Simple Formatter

Fidelix’s picture

Status: Needs review » Fixed

Can you commit this?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dinis’s picture

Issue summary: View changes

Did this patch ever get committed?

Edit - Ok, I've seen that there has been no maintenance for a while. Philip, would you like a hand?

Fidelix’s picture

Status: Closed (fixed) » Needs review

Danielle, last time I tried this patch it was still working.

The maintainers still need to commit it.

Fidelix’s picture

Status: Needs review » Reviewed & tested by the community
Fidelix’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new7.88 KB

Rerolled patch for latest git version...

rollingnet’s picture

It works great.
I subscribe too to commit it soon.

The only thing I'll add to it, it would be decimal unit option.

greta_drupal’s picture

While you are in there, please make the field value inline with the field label. At least an option for that. In all instances, the label stacks atop value, and the HTML output for the field value is <div class="clearfix">...</div> = so not cool dude.

Stacking the label onto graphic image is one thing, but pretty sure most people would not want to waste a line of real estate to stack a few characters.

Thank you!