Improvements to hint UI

- Created and moved duplicated code into new partials:
  - _add_hint.html.haml
  - _edit_hint_table.html.haml
  - edit_hint_table_status_button.html.haml
- Renamed variable @level_source_hints to @hints (because I accidentally got the whole
  database table when I forgot to initialize it).
- Removed infrequently used links and unneeded columns.
- Improved messaging around empty tables, restrictions, and hint solicitation.
- Added new view show_hints (which I may later merge with an existing view).
TODO:
- i18n
- Facilitate reviewing hints by enabling restrictions on more views, not just review_hints.

See this diagram, which helped me understand the flow among pages: https://docs.google.com/a/code.org/drawings/d/1yidY-TLCtQODoNyfMgfrSdo1-MspOGrCNkxD1vJybZw/edit?usp=sharing
Good point.


On Wed, Aug 13, 2014 at 1:31 PM, Brian Jordan <notifications@github.com>
wrote:

> In app/views/shared/_edit_hint_table.html.haml:
>
> > +              =form_for(level_source_hint, :remote => true) do |f|
> > +                =hidden_field_tag :redirect, level_source_hints_path
> > +                =render :partial => 'shared/edit_hint_table_status_button',
> > +                  :locals => {level_source_hint: level_source_hint, status_val: LevelSourceHint::STATUS_SELECTED}
> > +                =label_tag 'Approve'
> > +                =render :partial => 'shared/edit_hint_table_status_button',
> > +                  :locals => {level_source_hint: level_source_hint, status_val: LevelSourceHint::STATUS_EXPERIMENT}
> > +                =label_tag 'Experiment'
> > +                =render :partial => 'shared/edit_hint_table_status_button',
> > +                  :locals => {level_source_hint: level_source_hint, status_val: LevelSourceHint::STATUS_
> INACTIVE}
> > +                =label_tag 'Disapprove'
> > +            -else
> > +              =LevelSourceHint::USER_VISIBLE_NAMES[level_source_hint.status]
> > +        %td{:id => 'result' + level_source_hint.id.to_s, :style => 'display:none;color:red;font-weight:bold;font-size:12pt'}--
> > +    %tr
> > +      -if add
>
> Could swap this line and the tr above (since we won't need the row if add
> is false)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/code-dot-org/dashboard/pull/1146/files#r16203345>.
>