<commit_before>= Typus: Effortless admin interface for your Rails application

As Django Admin, *Typus* is designed for a single activity:

    Trusted users editing structured content.

*Typus* doesn't try to be all the things to all the people but it's 
extensible enough to match lots of use cases.

You can see some screenshots on the wiki[http://github.com/fesplugas/typus/wikis].

== Installing

Install from GitHub the latest version which works with Rails 2.3.2.

    $ script/plugin install git://github.com/fesplugas/typus.git

Once the plugin is installed generate the *Typus* files and migrate 
your database, only a <tt>typus_users</tt> table is created.

    $ script/generate typus
    $ rake db:migrate

To create the first user, to do it, start the application server, go 
to http://0.0.0.0:3000/admin and follow the instructions.

=== Compatibility and old versions

Master branch is tested with:

- Rails: 2.3.2 and Egde.
- Ruby: 1.8.6-p287 and 1.8.7-p72.

If you need to use *Typus* with Rails 2.2.2 install the 2.2.2 branch 
of the plugin. This version will be mantained during 3 months from the 
release of the latest stable version.

    $ script/plugin install -r '2.2.2' git://github.com/fesplugas/typus.git

== Available rake tasks

You can view the available tasks running:

    $ rake -T typus
    (in /Users/fesplugas/Development/typus_platform)
    rake doc:plugins:typus  # Generate documentation for the typus plugin
    rake typus:i18n         # Install simplified_translation plugin.
    rake typus:misc         # Install Paperclip, acts_as_list, acts_as_tree.
    rake typus:roles        # List current roles
    rake typus:ssl          # Intall ssl_requirement plugin.

== Plugin Configuration Options

You can overwrite the following settings.

    Typus::Configuration.options[:app_name]
    Typus::Configuration.options[:config_folder]
    Typus::Configuration.options[:email]
    Typus::Configuration.options[:ignore_missing_translations]
    Typus::Configuration.options[:locales]
    Typus::Configuration.options[:prefix]
    Typus::Configuration.options[:recover_password]
    Typus::Configuration.options[:root]
    Typus::Configuration.options[:ssl]
    Typus::Configuration.options[:templates_folder]
    Typus::Configuration.options[:user_class_name]
    Typus::Configuration.options[:user_fk]

Model options.

    Typus::Configuration.options[:edit_after_create]
    Typus::Configuration.options[:end_year]
    Typus::Configuration.options[:form_rows]
    Typus::Configuration.options[:icon_on_boolean]
    Typus::Configuration.options[:minute_step]
    Typus::Configuration.options[:nil]
    Typus::Configuration.options[:per_page]
    Typus::Configuration.options[:sidebar_selector]
    Typus::Configuration.options[:start_year]
    Typus::Configuration.options[:toggle]

You can also overwrite the model options by model. This is done always 
from the yaml files under <tt>config/typus</tt>.

    Post:
      options:
        edit_after_create: false
        end_year: 2015
        form_rows: 25
        icon_on_boolean: true
        minute_step: 15
        nil: 'nil'
        per_page: 5
        sidebar_selector: 5
        start_year: 1990
        toggle: true

=== Translating the interface

By default Typus is in English but you can change this with the 
following configuration option. (i.e. interface in Español)

    Typus::Configuration.options[:locales] = [ [ "Español", :es ] ]

If you need more than one language you can use the following settings. 
This will make appear on the right bottom of the site a languages list.

    Typus::Configuration.options[:locales] = [ [ "English", :en ], 
                                               [ "Español", :es ] ]

Available languages are:

- English
- Español
- Brazilian Portuguese

=== Recover password

Recover password is disabled by default. To enable it you should 
provide an email address which will be shown as the sender.

    Typus::Configuration.options[:email] = '<EMAIL>'
    Typus::Configuration.options[:recover_password] = true

=== Enable SSL

You can use SSL on Typus. To enable it update the initializer.

    Typus::Configuration.options[:ssl] = true

Remember to install the `ssl_requirement` plugin to be able to use this 
feature.

    $ rake typus:ssl

=== Special Route

To overwrite the default prefix path of your application place the 
following configuration option on <tt>development.rb</tt>, <tt>production.rb</tt> 
on the <tt>config/environments</tt> folder.

    Typus::Configuration.options[:prefix] = 'backoffice'

=== View Missing Translations

If you are a developer who wants to translate Typus, add the following 
setting on <tt>development.rb</tt> on the <tt>config/environments</tt> 
folder so all missing translations messages will be shown.

    Typus::Configuration.options[:ignore_missing_translations] = false

=== Disable password recover

You can disable password recover on the login page. By default, password
recovery is enabled.

    Typus::Configuration.options[:recover_password] = false

=== Disallow toggle

When you have a boolean on the lists you can toggle it's status from 
true to false and false to true. You can disable this link with:

    Typus::Configuration.options[:toggle] = false

=== Redirect to index after create a record

After creating a new record you'll be redirected to the record so 
you can continue editing it. If you prefer to be redirected to the 
main index you can owerwrite the setting.

    Typus::Configuration.options[:edit_after_create] = false

== Configuration file options

You can configure all *Typus* settings from the yaml files which are placed 
on <tt>config/typus</tt> folder. This file is created once you run the 
<tt>typus</tt> generator.

There are two kind of files, the <tt>*.yml</tt> and the <tt>*_roles.yml</tt>:

    ##
    # Default appearence of application.yml
    #<commit_msg>Updated README.<commit_after>= Typus: Effortless admin interface for your Rails application

As Django Admin, *Typus* is designed for a single activity:

    Trusted users editing structured content.

*Typus* doesn't try to be all the things to all the people but it's 
extensible enough to match lots of use cases.

You can see some screenshots on the wiki[http://github.com/fesplugas/typus/wikis].

== Installing

Install from GitHub the latest version which works with Rails 2.3.2.

    $ script/plugin install git://github.com/fesplugas/typus.git

Once plugin is installed generate *Typus* files and migrate your 
database (<tt>typus_users</tt> table is created)

    $ script/generate typus
    $ rake db:migrate

To create the first user, start the application server, go to 
http://0.0.0.0:3000/admin and follow the instructions.

=== Compatibility and old versions

Master branch is tested with:

- Rails: 2.3.2 and Egde.
- Ruby: 1.8.6-p287 and 1.8.7-p72.

If you need to use *Typus* with Rails 2.2.2 install the 2.2.2 branch 
of the plugin. This version will be mantained during 3 months from the 
release of the latest stable version.

    $ script/plugin install -r '2.2.2' git://github.com/fesplugas/typus.git

== Available rake tasks

You can view the available tasks running:

    $ rake -T typus
    (in /Users/fesplugas/Development/typus_core)
    rake doc:plugins:typus  # Generate documentation for the typus plugin
    rake typus:i18n         # Install simplified_translation plugin.
    rake typus:misc         # Install Paperclip, acts_as_list, acts_as_tree.
    rake typus:roles        # List current roles
    rake typus:ssl          # Intall ssl_requirement plugin.

== Plugin Configuration Options

You can overwrite the following settings.

    Typus::Configuration.options[:app_name]
    Typus::Configuration.options[:config_folder]
    Typus::Configuration.options[:email]
    Typus::Configuration.options[:ignore_missing_translations]
    Typus::Configuration.options[:locales]
    Typus::Configuration.options[:path_prefix]
    Typus::Configuration.options[:recover_password]
    Typus::Configuration.options[:root]
    Typus::Configuration.options[:ssl]
    Typus::Configuration.options[:templates_folder]
    Typus::Configuration.options[:user_class_name]
    Typus::Configuration.options[:user_fk]

Model options.

    Typus::Configuration.options[:edit_after_create]
    Typus::Configuration.options[:end_year]
    Typus::Configuration.options[:form_rows]
    Typus::Configuration.options[:icon_on_boolean]
    Typus::Configuration.options[:minute_step]
    Typus::Configuration.options[:nil]
    Typus::Configuration.options[:per_page]
    Typus::Configuration.options[:sidebar_selector]
    Typus::Configuration.options[:start_year]
    Typus::Configuration.options[:toggle]

You can also overwrite the model options by model. This is done always 
from the yaml files under <tt>config/typus</tt>.

    Post:
      options:
        edit_after_create: false
        end_year: 2015
        form_rows: 25
        icon_on_boolean: true
        minute_step: 15
        nil: 'nil'
        per_page: 5
        sidebar_selector: 5
        start_year: 1990
        toggle: true

=== Translating the interface

By default Typus I18n is set to English. You can change this with the 
following configuration option. (i.e. interface in Español)

    Typus::Configuration.options[:locales] = [ [ "Español", :es ] ]

If you need more than one language you can use the following settings. 
This will make appear on the right bottom of the site a languages list.

    Typus::Configuration.options[:locales] = [ [ "English", :en ], 
                                               [ "Español", :es ] ]

Available languages are:

- English
- Español
- Brazilian Portuguese

=== Recover password

Recover password is disabled by default. To enable it you should 
provide an email address which will be shown as the sender.

    Typus::Configuration.options[:email] = '<EMAIL>'
    Typus::Configuration.options[:recover_password] = true

=== Enable SSL

You can use SSL on Typus. To enable it update the initializer.

    Typus::Configuration.options[:ssl] = true

Remember to install the `ssl_requirement` plugin to be able to use this 
feature.

    $ rake typus:ssl

=== Special Route

To overwrite the default prefix path of your application place the 
following configuration option on <tt>development.rb</tt>, <tt>production.rb</tt> 
on the <tt>config/environments</tt> folder.

    Typus::Configuration.options[:path_prefix] = 'backoffice'

=== View Missing Translations

If you are a developer who wants to translate Typus, add the following 
setting on <tt>development.rb</tt> on the <tt>config/environments</tt> 
folder so all missing translations messages will be shown.

    Typus::Configuration.options[:ignore_missing_translations] = false

=== Disable password recover

You can disable password recover on the login page. By default, password
recovery is enabled.

    Typus::Configuration.options[:recover_password] = false

=== Disallow toggle

When you have a boolean on the lists you can toggle it's status from 
true to false and false to true. You can disable this link with:

    Typus::Configuration.options[:toggle] = false

=== Redirect to index after create a record

After creating a new record you'll be redirected to the record so 
you can continue editing it. If you prefer to be redirected to the 
main index you can owerwrite the setting. This setting can be defined 
globally or by model.

    Typus::Configuration.options[:edit_after_create] = false

== Configuration file options

You can configure all *Typus* settings from the yaml files which are placed 
on <tt>config/typus</tt> folder. This file is created once you run the 
<tt>typus</tt> generator.

There are two kind of files, the <tt>*.yml</tt> and the <tt>*_roles.yml</tt>:

    ##
    # Default appearence of application.yml
    #
{'fraction_non_alphanumeric': 0.08682432432432433, 'fraction_numerical': 0.008783783783783784, 'mean_word_length': 3.774596774193548, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5641753', 'n_tokens_mistral': 3505, 'n_tokens_neox': 3320, 'n_words': 1206}