Tasks admin tags - WIP


This is a WIP PR to allow code review in parallel

Refactored code to avoid extra code in _grouped_index.html.haml including test to verify
Added main logic and bootstrap style (based on checkboxes) to allow merging and deleting tags if user is admin
Removed unused flags resources
Added some styles to allow showing debug information in screen while running in dev environment

Still Pending:
Control params for new action "reorganize" in tags_controller 
Adding control to avoid merges without new names.
Adding warning popup before merging or deletion
Adding Tests
He intentado utilizar la misma vista para quien es admin (checkboxes+buttons) y para quien no lo es (sin checkboxes y sin buttons)

Quizas es mejor dos vistas una para admins y otra para non admins?


BlackBerry de movistar, allí donde estés está tu oficin@

-----Original Message-----
From: Saverio Trioni <notifications@github.com>
Date: Wed, 24 Dec 2014 08:56:38 
To: coopdevs/timeoverflow<timeoverflow@noreply.github.com>
Reply-To: coopdevs/timeoverflow <reply@reply.github.com>
Cc: Daniel Macho<danielmacho72@gmail.com>
Subject: Re: [timeoverflow] Tasks admin tags - WIP (#113)

> +      - alpha_tags.each_slice(6) do |gr|
> +        .row
> +          - gr.each do |kg, vl|
> +            .col-xs-2
> +              %h2.bg-info.text-center
> +                = kg
> +              - vl.each do |tag, count|
> +                %p
> +                  .badge
> +                    = count
> +                  - path = get_index_path(@current_post_type.pluralize, tag: tag)
> +                  = link_to path do
> +                    - gtag = (count == 1) ? "tag" : "tags"
> +                    = glyph(gtag)
> +                    = tag
> +                  - if is_admin

es que si no eres administrador no puedes siquiera acceder a este formulario! mover una condición a una variable y chequear 1725 veces esa variable no es una solución mucho mejor. Si no puedes usar el formulario, no tienes ni que verlo.

---
Reply to this email directly or view it on GitHub:
https://github.com/coopdevs/timeoverflow/pull/113/files#r22260075