Automatize, Categorize and Extend Article edit mode Fields
Today all article fields are equally displayed on edit mode. That adds so much noise to the page.
Another problem is to have an erb to write the form. That must to be a helper that builds a form based on a list of fields given by the article or its filePresenter.
The fields list must have a hash with this attributes for each field: name
, label
, type
, value
, default_value
, values
, mandatory
, show_validation_icon
, js_validation
, fail_news
, valid_news
, category
, html_params
, description
.
-
type
: may be any html's input type orwysiwyg
. Any html5 type must also implement it's validation. -
show_validation_icon
: a icon notify the user that is ok or not. It can be replaced by bootstrap feature. -
js_validation
: allows advanced client side validation. -
fail_news
,valid_news
: a validation message balloon. -
category
: may bebasic
(default),intermediary
,advanced
,admin_only
. -
description
: a text to be placed above the field.
Field Categorization
To reduce the noise, the article edit mode must start displaying only the basic fields. The user can ask to see basic
, intermediary
or advanced
fields any time and the css will hide or show them.
The admin_only
category identify a field to be displayed only to the env admin.
Extending
Plugins must be allowed to add new fields to the article edit mode, so before answer the fields list, the model must ask the plugins to extend its core list.