Login required
Download

PrettySize

(1)
Author(s) Cazacu Mihai
Current Release 0.2   (2 years ago)
Grails Version 1.2-M2 > *
Tags size 
Dependency
compile ":pretty-size:0.2"
Last updated by admin 2 years ago
grails install-plugin pretty-size
Last updated by cazacugmihai 2 years ago

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.

Last updated by admin 2 years ago
Last updated by admin 2 years ago