PrettySize

  • Tags : size
  • Latest : 0.2
  • Last Updated: 07 September 2009
  • Grails version : 1.2-M2 > *
  • Authors : Cazacu Mihai
1 vote
Dependency :
compile ":pretty-size:0.2"

Documentation

Summary

Installation

grails install-plugin pretty-size

Description

PrettySize Plugin

This plugin allows you to display human readable file size.

Requirements

  • Grails Version: 1.0 and above

Installation

grails install-plugin pretty-size

Usage

<prettysize:display size="${1024}" />

Generates outputs like:

"one kilobyte", "2 megabytes", or "3 GB"

Internationalization

  • check the "message.properties" file from the plugin directory.

Tag attributes

AttributeRequiredDefaultDescription
abbrnofalseAbbreviation (megabytes -> MB).
formatno The format pattern. See http://java.sun.com/javase/6/docs/api/java/text/DecimalFormat.html
sizeyes The size in bytes

Version History

  • 0.2 - Added 'abbr' and 'format' attributes.
  • 0.1 - First official release.

Suggestions, comments or bugs

Feel free to submit questions or comments to the Grails users mailing list. Alternatively you can contact me directly - cazacugmihai at gmail dot com

Please report any issues to the Grails users mailing list and/or write up an issue in JIRA at http://jira.codehaus.org/browse/GRAILSPLUGINS under the Grails-PrettySize component.