diff --git a/Gemfile b/Gemfile index bc4266f..2a24876 100644 --- a/Gemfile +++ b/Gemfile @@ -75,10 +75,9 @@ gem 'unicorn' gem "omniauth" gem "omniauth-google-oauth2", "~> 0.1.17" - gem "acts_as_paranoid", "~>0.4.0" - gem 'paper_trail', '>= 3.0.0.rc1' +gem "haml-rails", "~> 0.4.0" # confluence integration gem 'confluence-soap' @@ -94,3 +93,4 @@ end gem 'cancan' gem 'rest-client' + diff --git a/Gemfile.lock b/Gemfile.lock index 9b4c796..e6c169e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -151,6 +151,13 @@ GEM yard (>= 0.7.0) gyoku (1.1.1) builder (>= 2.1.2) + haml (4.0.6) + tilt + haml-rails (0.4) + actionpack (>= 3.1, < 4.1) + activesupport (>= 3.1, < 4.1) + haml (>= 3.1, < 4.1) + railties (>= 3.1, < 4.1) hashie (2.0.5) heroku (3.2.2) heroku-api (~> 0.3.7) @@ -238,9 +245,6 @@ GEM rack (>= 0.4) rack-cache (1.2) rack (>= 0.4) - rack-google-analytics (1.0.0) - actionpack - activesupport rack-mount (0.8.3) rack (>= 1.0.0) rack-ssl (1.3.3) @@ -381,6 +385,7 @@ DEPENDENCIES guard-rspec guard-spork guard-yard + haml-rails (~> 0.4.0) heroku jbuilder jquery-rails diff --git a/app/views/dashboards/_announcements.html.erb b/app/views/dashboards/_announcements.html.erb deleted file mode 100644 index 4e6b982..0000000 --- a/app/views/dashboards/_announcements.html.erb +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/app/views/dashboards/_announcements.html.haml b/app/views/dashboards/_announcements.html.haml new file mode 100644 index 0000000..a06ffbd --- /dev/null +++ b/app/views/dashboards/_announcements.html.haml @@ -0,0 +1,6 @@ +#alerts.row.dropdown + %button.view-all.pull-right.btn.btn-default.dropdown-toggle{"data-target" => "#", "data-toggle" => "dropdown", :type => "button"} + View All + %span.caret + #alert_scroll + .wrap diff --git a/app/views/dashboards/_faq.html.erb b/app/views/dashboards/_faq.html.erb deleted file mode 100644 index fd8a532..0000000 --- a/app/views/dashboards/_faq.html.erb +++ /dev/null @@ -1,33 +0,0 @@ -
-
- <% if Configuration::Confluence.configured? %> -
-
-
-
- 100% Complete -
-
-
- - <% else %> - -
- Confluence not configured -
- - - <% end %> - -
-
diff --git a/app/views/dashboards/_faq.html.haml b/app/views/dashboards/_faq.html.haml new file mode 100644 index 0000000..e980621 --- /dev/null +++ b/app/views/dashboards/_faq.html.haml @@ -0,0 +1,16 @@ +.col-md-4 + .vis-mod.handbook + - if Configuration::Confluence.configured? + .question + %br/ + .progress.progress-striped.active + .progress-bar.progress-bar-info{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "100", :role => "progressbar", :style => "width: 100%"} + %span.sr-only 100% Complete + #search + .row + = faq_entry_point_link + - else + .question + Confluence not configured + #search + .row diff --git a/app/views/dashboards/_my_schedule.html.erb b/app/views/dashboards/_my_schedule.html.erb deleted file mode 100644 index 96ef319..0000000 --- a/app/views/dashboards/_my_schedule.html.erb +++ /dev/null @@ -1,27 +0,0 @@ -
-

My Schedule

- -
- <% options = my_schedule_dropdown_options %> - <% this_week = options.find {|opt| opt[0] =~ /^This Week/ } %> - - -
- -
-
- 100% Complete -
-
- - -
diff --git a/app/views/dashboards/_my_schedule.html.haml b/app/views/dashboards/_my_schedule.html.haml new file mode 100644 index 0000000..3238e3d --- /dev/null +++ b/app/views/dashboards/_my_schedule.html.haml @@ -0,0 +1,17 @@ +#my_schedule.vis-mod.my_schedule + %h3 My Schedule + .btn-group + - options = my_schedule_dropdown_options + - this_week = options.find {|opt| opt[0] =~ /^This Week/ } + %button.btn.btn-default.dropdown-toggle{"data-toggle" => "dropdown", "data-week" => this_week[1], :type => "button"} + = this_week[0] + \: + %span.caret + %ul.dropdown-menu{:role => "menu"} + - options.each do |(text, week)| + %li{ :style => (week == this_week[1] ? "display:none;" : ""), "data-week" => week } + = link_to text, '#' + .progress.progress-striped.active{:style => "margin-top: 20px;"} + .progress-bar.progress-bar-info{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "100", :role => "progressbar", :style => "width: 100%"} + %span.sr-only 100% Complete + %ul#schedule diff --git a/app/views/dashboards/_projects_chart.html.erb b/app/views/dashboards/_projects_chart.html.erb deleted file mode 100644 index a8f57fd..0000000 --- a/app/views/dashboards/_projects_chart.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -
-
-

Get 'er done...

- - - - - My Schedule -
-
- -
-
-
-
-
diff --git a/app/views/dashboards/_projects_chart.html.haml b/app/views/dashboards/_projects_chart.html.haml new file mode 100644 index 0000000..1a6afa4 --- /dev/null +++ b/app/views/dashboards/_projects_chart.html.haml @@ -0,0 +1,15 @@ +.row + .col-md-12.vis-header + %h2.pull-left Get 'er done... + %button.pull-right.btn.btn-default.dropdown-toggle{"data-toggle" => "dropdown", :type => "button"} + Everyone + %span.caret + = projects_chart_user_select + %button.pull-right.btn.btn-default.dropdown-toggle{"data-toggle" => "dropdown", :type => "button"} + Clients + %span.caret + = projects_chart_client_select + %a.pull-right.vis-link{:href => "#my_schedule"} My Schedule +.row + #main-vis + .projects_chart diff --git a/app/views/dashboards/_pto.html.erb b/app/views/dashboards/_pto.html.erb deleted file mode 100644 index a684871..0000000 --- a/app/views/dashboards/_pto.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -
-

Happy travels!

-

Who's off this week and next week.

- -
-
-
- 100% Complete -
-
- -
-

No one out!

-
- -
-

Next Week <%= next_week_dates %>

-
-
-
\ No newline at end of file diff --git a/app/views/dashboards/_pto.html.haml b/app/views/dashboards/_pto.html.haml new file mode 100644 index 0000000..55b80a2 --- /dev/null +++ b/app/views/dashboards/_pto.html.haml @@ -0,0 +1,12 @@ +.vis-mod.happy_travels + %h3 Happy travels! + %p Who's off this week and next week. + .scroller + .progress.progress-striped.active.pto-progress + .progress-bar.progress-bar-info{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "100", :role => "progressbar", :style => "width: 100%"} + %span.sr-only 100% Complete + .row.full.pto_this_week + %p No one out! + .row.full.faded.pto_next_week + %h4 + Next Week #{next_week_dates} diff --git a/app/views/dashboards/index.html.erb b/app/views/dashboards/index.html.erb deleted file mode 100644 index 730aaaf..0000000 --- a/app/views/dashboards/index.html.erb +++ /dev/null @@ -1,60 +0,0 @@ -<% content_for :notification_bar do %> - <% if @pending_leave_requests.present? %> -
- <%= pluralize(@pending_leave_requests.size, 'leave request') %> - <%= link_to 'pending approval', leave_requests_url %> -
- <% end %> -<% end %> - -<%= render :partial => "announcements"%> - -<%= render :partial => "projects_chart" %> - -
-
-
Legend
-
-
- -
- -
-
- <%= render 'my_schedule' %> -
- - <%= render :partial => "faq" %> - -
- <% if current_user %> - <%= render 'leave_requests/recent_leave_requests_panel', { - leave_requests: current_user.leave_requests.recent } %> - <% end %> -
- -
- -
-
- <%= render :partial => "pto" %> -
- -
-
- - - -

We're leveling up

- -

Coming soon - stay tuned!

- -
-
-
- - <%= render 'leave_requests/leave_request_modal', leave_request: LeaveRequest.new %> diff --git a/app/views/dashboards/index.html.haml b/app/views/dashboards/index.html.haml new file mode 100644 index 0000000..098a11a --- /dev/null +++ b/app/views/dashboards/index.html.haml @@ -0,0 +1,35 @@ +- content_for :notification_bar do + - if @pending_leave_requests.present? + .alert.alert-success + = pluralize(@pending_leave_requests.size, 'leave request') + = link_to 'pending approval', leave_requests_url += render :partial => "announcements" += render :partial => "projects_chart" +.row + .col-md-12 + %h5 Legend +#lower-vis + .row.full + .col-md-4.my_schedule_container + = render 'my_schedule' + = render :partial => "faq" + .col-md-4 + - if current_user + = render 'leave_requests/recent_leave_requests_panel', { | + leave_requests: current_user.leave_requests.recent } | + .row.full + .col-md-6 + = render :partial => "pto" + .col-md-6 + .vis-mod.leveling_up + %button.pull-right.btn.btn-default.dropdown-toggle{"data-toggle" => "dropdown", :type => "button"} + Frameworks/Libs + %span.caret + %button.pull-right.btn.btn-default.dropdown-toggle{"data-toggle" => "dropdown", :type => "button"} + UX Engineering + %span.caret + %h3 We're leveling up + /

Here's what's trending from Github commits.

+ %p Coming soon - stay tuned! + %img.vis{:src => "/assets/commit_graph.png", :style => "opacity:0.2"}/ + = render 'leave_requests/leave_request_modal', leave_request: LeaveRequest.new diff --git a/app/views/doc_auths/_form.html.erb b/app/views/doc_auths/_form.html.erb deleted file mode 100644 index 60867e3..0000000 --- a/app/views/doc_auths/_form.html.erb +++ /dev/null @@ -1,38 +0,0 @@ -<%= form_for @doc_auth, :html => { :class => 'form-horizontal' } do |f| %> -
- <%= controller.action_name.capitalize %> Doc Auth - -
- <%= f.label :key, :class => 'control-label' %> -
- <%= f.text_field :key, :class => 'text_field' %> -
-
- -
- <%= f.label :username, :class => 'control-label' %> -
- <%= f.text_field :username, :class => 'text_field' %> -
-
- -
- <%= f.label :password, :class => 'control-label' %> -
- <%= f.password_field :password, :class => 'text_field' %> -
-
- -
- <%= f.label :current, :class => 'control-label' %> -
- <%= f.check_box :current %> -
-
- -
- <%= f.submit nil, :class => 'btn btn-primary' %> - <%= link_to 'Cancel', doc_auths_path, :class => 'btn' %> -
-
-<% end %> diff --git a/app/views/doc_auths/_form.html.haml b/app/views/doc_auths/_form.html.haml new file mode 100644 index 0000000..8a2f830 --- /dev/null +++ b/app/views/doc_auths/_form.html.haml @@ -0,0 +1,24 @@ += form_for @doc_auth, :html => { :class => 'form-horizontal' } do |f| + %fieldset + %legend + = controller.action_name.capitalize + Doc Auth + .control-group + = f.label :key, :class => 'control-label' + .controls + = f.text_field :key, :class => 'text_field' + .control-group + = f.label :username, :class => 'control-label' + .controls + = f.text_field :username, :class => 'text_field' + .control-group + = f.label :password, :class => 'control-label' + .controls + = f.password_field :password, :class => 'text_field' + .control-group + = f.label :current, :class => 'control-label' + .controls + = f.check_box :current + .form-actions + = f.submit nil, :class => 'btn btn-primary' + = link_to 'Cancel', doc_auths_path, :class => 'btn' diff --git a/app/views/doc_auths/edit.html.erb b/app/views/doc_auths/edit.html.erb deleted file mode 100644 index 786950e..0000000 --- a/app/views/doc_auths/edit.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/app/views/doc_auths/edit.html.haml b/app/views/doc_auths/edit.html.haml new file mode 100644 index 0000000..c66fabf --- /dev/null +++ b/app/views/doc_auths/edit.html.haml @@ -0,0 +1 @@ += render :partial => 'form' diff --git a/app/views/doc_auths/index.html.erb b/app/views/doc_auths/index.html.erb deleted file mode 100644 index 25a62ee..0000000 --- a/app/views/doc_auths/index.html.erb +++ /dev/null @@ -1,31 +0,0 @@ -

Doc Auths

- - - - - - - - - - - - <% @doc_auths.each do |doc_auth| %> - - - - - - - - <% end %> - -
IDKeyCurrent?Created atActions
<%= doc_auth.id %><%= link_to doc_auth.key, doc_auth_path(doc_auth) %><%= doc_auth.current? %><%= doc_auth.created_at %> - <% if can? :update, doc_auth %> - <%= link_to 'Edit', edit_doc_auth_path(doc_auth), :class => 'btn btn-mini' %> - <% end %> -
- -<% if can? :create, DocAuth %> -<%= link_to 'New Google Spreadsheet', new_doc_auth_path, :class => 'btn btn-primary' %> -<% end %> diff --git a/app/views/doc_auths/index.html.haml b/app/views/doc_auths/index.html.haml new file mode 100644 index 0000000..619ef3d --- /dev/null +++ b/app/views/doc_auths/index.html.haml @@ -0,0 +1,21 @@ +%h1 Doc Auths +%table.table.table-striped + %thead + %tr + %th ID + %th Key + %th Current? + %th Created at + %th Actions + %tbody + - @doc_auths.each do |doc_auth| + %tr + %td= doc_auth.id + %td= link_to doc_auth.key, doc_auth_path(doc_auth) + %th= doc_auth.current? + %td= doc_auth.created_at + %td + - if can? :update, doc_auth + = link_to 'Edit', edit_doc_auth_path(doc_auth), :class => 'btn btn-mini' +- if can? :create, DocAuth + = link_to 'New Google Spreadsheet', new_doc_auth_path, :class => 'btn btn-primary' diff --git a/app/views/doc_auths/new.html.erb b/app/views/doc_auths/new.html.erb deleted file mode 100644 index 786950e..0000000 --- a/app/views/doc_auths/new.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/app/views/doc_auths/new.html.haml b/app/views/doc_auths/new.html.haml new file mode 100644 index 0000000..c66fabf --- /dev/null +++ b/app/views/doc_auths/new.html.haml @@ -0,0 +1 @@ += render :partial => 'form' diff --git a/app/views/doc_auths/show.html.erb b/app/views/doc_auths/show.html.erb deleted file mode 100644 index 14225e6..0000000 --- a/app/views/doc_auths/show.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -

Doc Auth

- -

- Key
- <%= @doc_auth.key %> -

- -

- Username
- <%= @doc_auth.username %> -

- -
- <%= link_to 'Back', doc_auths_path, :class => 'btn' %> - <%= link_to 'Edit', edit_doc_auth_path(@doc_auth), :class => 'btn' %> - <%= link_to 'Delete', doc_auth_path(@doc_auth), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger' %> -
diff --git a/app/views/doc_auths/show.html.haml b/app/views/doc_auths/show.html.haml new file mode 100644 index 0000000..ca72f1a --- /dev/null +++ b/app/views/doc_auths/show.html.haml @@ -0,0 +1,13 @@ +%h1 Doc Auth +%p + %b Key + %br/ + = @doc_auth.key +%p + %b Username + %br/ + = @doc_auth.username +.form-actions + = link_to 'Back', doc_auths_path, :class => 'btn' + = link_to 'Edit', edit_doc_auth_path(@doc_auth), :class => 'btn' + = link_to 'Delete', doc_auth_path(@doc_auth), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger' diff --git a/app/views/experiences/_form.html.erb b/app/views/experiences/_form.html.erb deleted file mode 100644 index 630f48c..0000000 --- a/app/views/experiences/_form.html.erb +++ /dev/null @@ -1,37 +0,0 @@ -<%= form_for(@experience) do |f| %> - <% if @experience.errors.any? %> -
-

<%= pluralize(@experience.errors.count, "error") %> prohibited this experience from being saved:

- - -
- <% end %> - -
- <%= f.label :level %>
- <%= f.number_field :level %> -
-
- <%= f.label :notes %>
- <%= f.text_field :notes %> -
-
- <%= f.label :skill_id %>
- <%= f.number_field :skill_id %> -
-
- <%= f.label :user_id %>
- <%= f.number_field :user_id %> -
-
- <%= f.label :years %>
- <%= f.text_field :years %> -
-
- <%= f.submit %> -
-<% end %> diff --git a/app/views/experiences/_form.html.haml b/app/views/experiences/_form.html.haml new file mode 100644 index 0000000..9e19adb --- /dev/null +++ b/app/views/experiences/_form.html.haml @@ -0,0 +1,31 @@ += form_for(@experience) do |f| + - if @experience.errors.any? + #error_explanation + %h2 + = pluralize(@experience.errors.count, "error") + prohibited this experience from being saved: + %ul + - @experience.errors.full_messages.each do |msg| + %li= msg + .field + = f.label :level + %br/ + = f.number_field :level + .field + = f.label :notes + %br/ + = f.text_field :notes + .field + = f.label :skill_id + %br/ + = f.number_field :skill_id + .field + = f.label :user_id + %br/ + = f.number_field :user_id + .field + = f.label :years + %br/ + = f.text_field :years + .actions + = f.submit diff --git a/app/views/experiences/edit.html.erb b/app/views/experiences/edit.html.erb deleted file mode 100644 index 6386ca5..0000000 --- a/app/views/experiences/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -

Editing experience

- -<%= render 'form' %> - -<%= link_to 'Show', @experience %> | -<%= link_to 'Back', experiences_path %> diff --git a/app/views/experiences/edit.html.haml b/app/views/experiences/edit.html.haml new file mode 100644 index 0000000..316099d --- /dev/null +++ b/app/views/experiences/edit.html.haml @@ -0,0 +1,4 @@ +%h1 Editing experience += render 'form' += link_to 'Show', @experience += link_to 'Back', experiences_path diff --git a/app/views/experiences/index.html.erb b/app/views/experiences/index.html.erb deleted file mode 100644 index 8411ffa..0000000 --- a/app/views/experiences/index.html.erb +++ /dev/null @@ -1,31 +0,0 @@ -

Listing experiences

- - - - - - - - - - - - - -<% @experiences.each do |experience| %> - - - - - - - - - - -<% end %> -
LevelNotesSkillUserYears
<%= experience.level %><%= experience.notes %><%= experience.skill_id %><%= experience.user_id %><%= experience.years %><%= link_to 'Show', experience %><%= link_to 'Edit', edit_experience_path(experience) %><%= link_to 'Destroy', experience, method: :delete, data: { confirm: 'Are you sure?' } %>
- -
- -<%= link_to 'New Experience', new_experience_path %> diff --git a/app/views/experiences/index.html.haml b/app/views/experiences/index.html.haml new file mode 100644 index 0000000..66a39af --- /dev/null +++ b/app/views/experiences/index.html.haml @@ -0,0 +1,23 @@ +%h1 Listing experiences +%table + %tr + %th Level + %th Notes + %th Skill + %th User + %th Years + %th + %th + %th + - @experiences.each do |experience| + %tr + %td= experience.level + %td= experience.notes + %td= experience.skill_id + %td= experience.user_id + %td= experience.years + %td= link_to 'Show', experience + %td= link_to 'Edit', edit_experience_path(experience) + %td= link_to 'Destroy', experience, method: :delete, data: { confirm: 'Are you sure?' } +%br/ += link_to 'New Experience', new_experience_path diff --git a/app/views/experiences/new.html.erb b/app/views/experiences/new.html.erb deleted file mode 100644 index 62d9dc2..0000000 --- a/app/views/experiences/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

New experience

- -<%= render 'form' %> - -<%= link_to 'Back', experiences_path %> diff --git a/app/views/experiences/new.html.haml b/app/views/experiences/new.html.haml new file mode 100644 index 0000000..347f393 --- /dev/null +++ b/app/views/experiences/new.html.haml @@ -0,0 +1,3 @@ +%h1 New experience += render 'form' += link_to 'Back', experiences_path diff --git a/app/views/experiences/show.html.erb b/app/views/experiences/show.html.erb deleted file mode 100644 index d4a52cf..0000000 --- a/app/views/experiences/show.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -

<%= notice %>

- -

- Level: - <%= @experience.level %> -

- -

- Notes: - <%= @experience.notes %> -

- -

- Skill: - <%= @experience.skill_id %> -

- -

- User: - <%= @experience.user_id %> -

- -

- Years: - <%= @experience.years %> -

- - -<%= link_to 'Edit', edit_experience_path(@experience) %> | -<%= link_to 'Back', experiences_path %> diff --git a/app/views/experiences/show.html.haml b/app/views/experiences/show.html.haml new file mode 100644 index 0000000..cbfd121 --- /dev/null +++ b/app/views/experiences/show.html.haml @@ -0,0 +1,18 @@ +%p#notice= notice +%p + %b Level: + = @experience.level +%p + %b Notes: + = @experience.notes +%p + %b Skill: + = @experience.skill_id +%p + %b User: + = @experience.user_id +%p + %b Years: + = @experience.years += link_to 'Edit', edit_experience_path(@experience) += link_to 'Back', experiences_path diff --git a/app/views/groups/_form.html.erb b/app/views/groups/_form.html.erb deleted file mode 100644 index 6e262fa..0000000 --- a/app/views/groups/_form.html.erb +++ /dev/null @@ -1,53 +0,0 @@ -<%= form_for @group, :html => { :class => 'form-horizontal' } do |f| %> -
- <%= controller.action_name.capitalize %> Group - -
- <%= f.label :name, :class => 'control-label' %> -
- <%= f.text_field :name, :class => 'text_field' %> -
-
- -
-
- -
-
- - Custom Group Email -
- <%= label_tag 'From', nil, :class => 'control-label' %> -
- <%= f.select :from, options_for_select(@users_for_select, @group.from), :prompt => 'Select From', :style => "width:385px;", :class => 'text_field chzn-select' %> -
-
- -
- <%= label_tag 'CC', nil, :class => 'control-label' %> -
- <%= f.select :cc, options_for_select(@users_for_select, @group.cc), {}, :multiple => true, :prompt => 'Select Some People', :style => "width:385px;", :class => 'text_field chzn-select' %> -
-
- -
- <%= label_tag "Message", nil, :class => 'control-label' %> -
- <%= f.text_area :message, :class => 'text_area', :style => "width:385px;height:200px;" %> -
-
-
- <%= label_tag "Ending Content", nil, :class => 'control-label' %> -
- <%= f.text_area :ending_content, :class => 'text_area', :style => "width:385px;height:200px;" %> -
-
- -
- <%= f.submit nil, :class => 'btn btn-primary' %> - <%= link_to 'Cancel', groups_path, :class => 'btn' %> -
-
-<% end %> diff --git a/app/views/groups/_form.html.haml b/app/views/groups/_form.html.haml new file mode 100644 index 0000000..5406257 --- /dev/null +++ b/app/views/groups/_form.html.haml @@ -0,0 +1,34 @@ += form_for @group, :html => { :class => 'form-horizontal' } do |f| + %fieldset + %legend + = controller.action_name.capitalize + Group + .control-group + = f.label :name, :class => 'control-label' + .controls + = f.text_field :name, :class => 'text_field' + .control-group + .controls + %label.checkbox + = f.check_box :display + Active (display in list and send email) + %legend Custom Group Email + .control-group + = label_tag 'From', nil, :class => 'control-label' + .controls + = f.select :from, options_for_select(@users_for_select, @group.from), :prompt => 'Select From', :style => "width:385px;", :class => 'text_field chzn-select' + .control-group + = label_tag 'CC', nil, :class => 'control-label' + .controls + = f.select :cc, options_for_select(@users_for_select, @group.cc), {}, :multiple => true, :prompt => 'Select Some People', :style => "width:385px;", :class => 'text_field chzn-select' + .control-group + = label_tag "Message", nil, :class => 'control-label' + .controls + = f.text_area :message, :class => 'text_area', :style => "width:385px;height:200px;" + .control-group + = label_tag "Ending Content", nil, :class => 'control-label' + .controls + = f.text_area :ending_content, :class => 'text_area', :style => "width:385px;height:200px;" + .form-actions + = f.submit nil, :class => 'btn btn-primary' + = link_to 'Cancel', groups_path, :class => 'btn' diff --git a/app/views/groups/edit.html.erb b/app/views/groups/edit.html.erb deleted file mode 100644 index 786950e..0000000 --- a/app/views/groups/edit.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml new file mode 100644 index 0000000..c66fabf --- /dev/null +++ b/app/views/groups/edit.html.haml @@ -0,0 +1 @@ += render :partial => 'form' diff --git a/app/views/groups/index.html.erb b/app/views/groups/index.html.erb deleted file mode 100644 index 27fb833..0000000 --- a/app/views/groups/index.html.erb +++ /dev/null @@ -1,38 +0,0 @@ -

Groups

- - - - - - - - - - <% @groups.each do |group| %> - <% @group = group %> - - - - - - <% end %> - -
Group NameDisplay in list
<%= @group.name %><%= @group.display? %> - <% if can? :show, group %> - <%= link_to 'Show', group_path(group), :class => 'btn btn-mini' %> - <% end %> - - <% if can? :update, group %> - <%= link_to 'Edit', edit_group_path(group), :class => 'btn btn-mini' %> - <% end %> - - <% if can? :destroy, group %> - <%= link_to 'Destroy', group_path(group), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' %> - <% end %> -
- -<% if can? :create, Group %> -<%= link_to 'New', new_group_path, :class => 'btn btn-primary' %> -<% end %> - -

diff --git a/app/views/groups/index.html.haml b/app/views/groups/index.html.haml new file mode 100644 index 0000000..8fd99e2 --- /dev/null +++ b/app/views/groups/index.html.haml @@ -0,0 +1,24 @@ +%h1 Groups +%table.table.table-striped + %thead + %tr + %th Group Name + %th Display in list + %tbody + - @groups.each do |group| + - @group = group + %tr + %td= @group.name + %td= @group.display? + %td + - if can? :show, group + = link_to 'Show', group_path(group), :class => 'btn btn-mini' + - if can? :update, group + = link_to 'Edit', edit_group_path(group), :class => 'btn btn-mini' + - if can? :destroy, group + = link_to 'Destroy', group_path(group), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' +- if can? :create, Group + = link_to 'New', new_group_path, :class => 'btn btn-primary' += succeed "/" do + %br/ +%br/ diff --git a/app/views/groups/new.html.erb b/app/views/groups/new.html.erb deleted file mode 100644 index 786950e..0000000 --- a/app/views/groups/new.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml new file mode 100644 index 0000000..c66fabf --- /dev/null +++ b/app/views/groups/new.html.haml @@ -0,0 +1 @@ += render :partial => 'form' diff --git a/app/views/groups/show.html.erb b/app/views/groups/show.html.erb deleted file mode 100644 index d24be46..0000000 --- a/app/views/groups/show.html.erb +++ /dev/null @@ -1,36 +0,0 @@ -

Group

-
-

-

Name

- <%= @group.name %> -

-

-

CC

- <%= @group.cc %> -

-

-

From

- <%= @group.from %> -

-

-

Message

- <%= @group.message %> -

-

-

Ending Content

- <%= @group.ending_content %> -

- -
- <% if can? :index, Group %> - <%= link_to 'Back', groups_path, :class => 'btn' %> - <% end %> - - <% if can? :update, @group %> - <%= link_to 'Edit', edit_group_path(@group), :class => 'btn' %> - <% end %> - - <% if can? :destroy, @group %> - <%= link_to 'Delete', group_path(@group), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger' %> - <% end %> -
diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml new file mode 100644 index 0000000..9b8e647 --- /dev/null +++ b/app/views/groups/show.html.haml @@ -0,0 +1,24 @@ +%h1 Group +%br/ +%p +%h4 Name += @group.name +%p +%h4 CC += @group.cc +%p +%h4 From += @group.from +%p +%h4 Message += @group.message +%p +%h4 Ending Content += @group.ending_content +.form-actions + - if can? :index, Group + = link_to 'Back', groups_path, :class => 'btn' + - if can? :update, @group + = link_to 'Edit', edit_group_path(@group), :class => 'btn' + - if can? :destroy, @group + = link_to 'Delete', group_path(@group), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger' diff --git a/app/views/layouts/_feedback.html.erb b/app/views/layouts/_feedback.html.erb deleted file mode 100644 index 6635b67..0000000 --- a/app/views/layouts/_feedback.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<% if feedback_configured? -%> - -<% end -%> \ No newline at end of file diff --git a/app/views/layouts/_feedback.html.haml b/app/views/layouts/_feedback.html.haml new file mode 100644 index 0000000..cc0f4d2 --- /dev/null +++ b/app/views/layouts/_feedback.html.haml @@ -0,0 +1,2 @@ +- if feedback_configured? + %script{:src => ::Configuration::Feedback.url, :type => "text/javascript"} diff --git a/app/views/layouts/_nav_demo.html.erb b/app/views/layouts/_nav_demo.html.erb deleted file mode 100644 index cd8a137..0000000 --- a/app/views/layouts/_nav_demo.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -
  • - Switch User - - -
  • diff --git a/app/views/layouts/_nav_demo.html.haml b/app/views/layouts/_nav_demo.html.haml new file mode 100644 index 0000000..2f862a9 --- /dev/null +++ b/app/views/layouts/_nav_demo.html.haml @@ -0,0 +1,5 @@ +%li + %a.btn.btn-default.navbar-btn.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"} Switch User + %ul#nav-switch-user.dropdown-menu{:role => "menu"} + - User.all.each do |u| + %li= link_to u.name, switch_user_path(name: u.name) diff --git a/app/views/layouts/_nav_dropdown.html.erb b/app/views/layouts/_nav_dropdown.html.erb deleted file mode 100644 index 71e9474..0000000 --- a/app/views/layouts/_nav_dropdown.html.erb +++ /dev/null @@ -1,47 +0,0 @@ -Hey, <%= current_user.name %> - - diff --git a/app/views/layouts/_nav_dropdown.html.haml b/app/views/layouts/_nav_dropdown.html.haml new file mode 100644 index 0000000..80994a0 --- /dev/null +++ b/app/views/layouts/_nav_dropdown.html.haml @@ -0,0 +1,25 @@ +%a.btn.btn-default.navbar-btn.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"} + Hey, #{current_user.name} +%ul#nav-menu.dropdown-menu{:role => "menu"} + - if can?(:read, Report::Bench) && can?(:read, Report::Pipeline) + %li= link_to "Reports", reports_path + - if can? :index, Schedule + %li= link_to "Schedules", schedules_path + - if can? :index, Project + %li= link_to "Projects", projects_path + - if can? :index, Group + %li= link_to "Groups", groups_path + - if can? :index, User + %li= link_to "Users", users_path + - if can? :index, Skill + %li= link_to "Skills", skills_path + - if can? :index, LeaveRequest + %li= link_to "Leave Requests", leave_requests_path + - if can? :index, RawItem + %li= link_to "RAW Data", raw_items_path + - if can? :index, DocAuth + %li= link_to "Switch Doc", '/doc_auths' + - if can? :manage, Configuration + %li= link_to "Settings", settings_path + - unless demo_mode? + %li= link_to 'Logout', signout_path diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb deleted file mode 100644 index 2cdcd04..0000000 --- a/app/views/layouts/application.html.erb +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - <%= @title || "Welcome to Houston" %> - - - - - - - <%= stylesheet_link_tag "application", :media => "all" %> - - - <%= csrf_meta_tags %> - - - - -
    - -
    -
    - <% if flash[:notice].present? -%> -
    - <%= flash[:notice] %> -
    - <% end -%> - <% if flash[:alert].present? -%> -
    - <%= flash[:alert] %> -
    - <% end -%> - - <% if content_for?(:notification_bar) -%> - <%= yield :notification_bar %> - <% end -%> -
    -
    - - <% if user_signed_in? || setup_path?%> - <% if controller_name == 'dashboards' %> - <%= yield %> - <% else %> -
    -
    "> - <%= yield %> -
    -
    - <% end %> - <% else %> -
    -
    -
    -

    Hey there!

    -

    Please sign in with your Google login to access the Company Dashboard:

    -

    <%= link_to 'Sign In', '/auth/google_oauth2', :class => "btn btn-primary btn-lg", :role => "button" %>

    -
    -
    -
    - <% end %> - -
    - - <%= javascript_include_tag "application" %> - <%= yield :javascripts %> - <%= render partial: "layouts/feedback"%> - - diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml new file mode 100644 index 0000000..64eca30 --- /dev/null +++ b/app/views/layouts/application.html.haml @@ -0,0 +1,54 @@ +!!! +%html + %head + %meta{:charset => "utf-8"}/ + %meta{:content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}/ + %title= @title || "Welcome to Houston" + %meta{:content => "", :name => "description"}/ + %meta{:content => "width=device-width", :name => "viewport"}/ + %script{:src => "//use.typekit.net/exz2vdf.js", :type => "text/javascript"} + :javascript + try{Typekit.load();}catch(e){} + = stylesheet_link_tag "application", :media => "all" + %link{:href => "http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,300,600,700,800", :rel => "stylesheet", :type => "text/css"}/ + = csrf_meta_tags + %body{:class => controller.controller_name, "data-action" => controller.action_name, "data-controller" => controller.controller_path} + %nav.navbar.navbar-default.navbar-fixed-top{:role => "navigation"} + %ul.nav.nav-pills.pull-left + %li + %a.btn.btn-default.navbar-btn{:href => "/", :role => "button"} + %span.glyphicon.glyphicon-home + - if user_signed_in? + %li + = render partial: 'layouts/nav_dropdown' + - if AppSettings.mode == 'demo' + = render partial: 'layouts/nav_demo' + %img.logo.pull-right{:src => "/assets/houston.png"}/ + #container + .row + .col-md-12 + - if flash[:notice].present? + .alert.alert-success + = flash[:notice] + - if flash[:alert].present? + .alert.alert-error + = flash[:alert] + - if content_for?(:notification_bar) + = yield :notification_bar + - if user_signed_in? || setup_path? + - if controller_name == 'dashboards' + = yield + - else + .row + %div{:class => @container_width.present? ? @container_width : "col-md-8 col-md-offset-2"} + = yield + - else + .row + .col-md-5.col-md-offset-3 + .jumbotron + %h1 Hey there! + %p Please sign in with your Google login to access the Company Dashboard: + %p= link_to 'Sign In', '/auth/google_oauth2', :class => "btn btn-primary btn-lg", :role => "button" + = javascript_include_tag "application" + = yield :javascripts + = render partial: "layouts/feedback" \ No newline at end of file diff --git a/app/views/leave_requests/_form.html.erb b/app/views/leave_requests/_form.html.erb deleted file mode 100644 index 2b95612..0000000 --- a/app/views/leave_requests/_form.html.erb +++ /dev/null @@ -1,51 +0,0 @@ -<% content_for :notification_bar do %> - <% if leave_request.errors.any? %> -
    -

    <%= pluralize(leave_request.errors.count, "error") %> prohibited this post from being saved:

    - -
    - <% end -%> -<% end %> - -<%= form_for leave_request, html: { role: 'form' } do |f| %> -
    -
    - <%= label_tag "When do you plan on taking off?" %> - <%= f.text_field(:start_date, - value: leave_request.formatted_start_date, - placeholder: 'mm/dd/yyyy', - 'data-behaviour' =>'datepicker', - class: 'input-mini form-control') %> - - <%= label_tag "When will you be back?" %> - - <%= f.text_field(:end_date, - value: leave_request.formatted_end_date, - placeholder: 'mm/dd/yyyy', - 'data-behaviour' =>'datepicker', - class: 'input-mini form-control') %> -
    - - <%= label_tag(:reason_for_leaving, 'Reason For Leaving') %> - <%= f.text_area :reason_for_leaving, rows: '3' %> - - <%= label_tag(:checked_with_supervisor, 'Have you checked with a supervisor?') %> - <%= f.text_area :checked_with_supervisor, rows: '3' %> - -
    - <% if !leave_request.new_record? && leave_request.user != current_user && can?(:approve, leave_request) %> - <%= f.submit 'Approve', name: 'approve', class: 'btn btn-primary btn-lg' %> - <%= f.submit 'Deny Leave Request', name: 'deny', class: 'btn btn-danger btn-lg' %> - <% else %> - <%= f.submit class: 'btn btn-primary btn-lg' %> - <%= f.submit 'Withdraw Leave Request', - name: 'delete', - class: 'btn btn-danger btn-lg' unless leave_request.id.blank? %> - <% end %> -
    -
    -<% end %> diff --git a/app/views/leave_requests/_form.html.haml b/app/views/leave_requests/_form.html.haml new file mode 100644 index 0000000..0454e11 --- /dev/null +++ b/app/views/leave_requests/_form.html.haml @@ -0,0 +1,37 @@ +- content_for :notification_bar do + - if leave_request.errors.any? + .alert.alert-danger + %p + = pluralize(leave_request.errors.count, "error") + prohibited this post from being saved: + %ul + - leave_request.errors.full_messages.each do |msg| + %li= msg += form_for leave_request, html: { role: 'form' } do |f| + .row.leave_requests + #datepicker.input-daterange.input-group + = label_tag "When do you plan on taking off?" + = f.text_field(:start_date, | + value: leave_request.formatted_start_date, | + placeholder: 'mm/dd/yyyy', | + 'data-behaviour' =>'datepicker', | + class: 'input-mini form-control') | + = label_tag "When will you be back?" + = f.text_field(:end_date, | + value: leave_request.formatted_end_date, | + placeholder: 'mm/dd/yyyy', | + 'data-behaviour' =>'datepicker', | + class: 'input-mini form-control') | + = label_tag(:reason_for_leaving, 'Reason For Leaving') + = f.text_area :reason_for_leaving, rows: '3' + = label_tag(:checked_with_supervisor, 'Have you checked with a supervisor?') + = f.text_area :checked_with_supervisor, rows: '3' + .control-group + - if !leave_request.new_record? && leave_request.user != current_user && can?(:approve, leave_request) + = f.submit 'Approve', name: 'approve', class: 'btn btn-primary btn-lg' + = f.submit 'Deny Leave Request', name: 'deny', class: 'btn btn-danger btn-lg' + - else + = f.submit class: 'btn btn-primary btn-lg' + = f.submit 'Withdraw Leave Request', | + name: 'delete', | + class: 'btn btn-danger btn-lg' unless leave_request.id.blank? | diff --git a/app/views/leave_requests/_leave_request_modal.html.erb b/app/views/leave_requests/_leave_request_modal.html.erb deleted file mode 100644 index 519746d..0000000 --- a/app/views/leave_requests/_leave_request_modal.html.erb +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/app/views/leave_requests/_leave_request_modal.html.haml b/app/views/leave_requests/_leave_request_modal.html.haml new file mode 100644 index 0000000..e37ba7e --- /dev/null +++ b/app/views/leave_requests/_leave_request_modal.html.haml @@ -0,0 +1,5 @@ +#leaveRequestModal.modal.fade{"aria-hidden" => "true", "aria-labelledby" => "leaveRequestModalLabel", :role => "dialog", :tabindex => "-1"} + .modal-header + %button.close{"aria-hidden" => "true", "data-dismiss" => "modal", :type => "button"} × + %h3#leaveRequestModalLabel Leave Request + = render 'leave_requests/form', leave_request: leave_request diff --git a/app/views/leave_requests/_recent_leave_requests.html.erb b/app/views/leave_requests/_recent_leave_requests.html.erb deleted file mode 100644 index 5f64554..0000000 --- a/app/views/leave_requests/_recent_leave_requests.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -<% show_name = false if local_assigns[:show_name].nil? %> -
    diff --git a/app/views/reports/_user_popover.html.haml b/app/views/reports/_user_popover.html.haml new file mode 100644 index 0000000..6d43ada --- /dev/null +++ b/app/views/reports/_user_popover.html.haml @@ -0,0 +1,15 @@ +.popover-html + %table.table.table-bordered.table-condensed + %tr + %th{:width => "150"} Client + %th.textual{:width => "150"} Project + - week_beginning_dates.each do |date| + = table_head_for_week_beginning(date, 'width' => 10) + - last_client = nil + - row.each_project do |client, project, week_hours| + %tr + %td= client unless client == last_client + %td.textual= project + - week_hours.each do |hours| + %td= hours > 0 ? hours.to_i : '' + - last_client = client diff --git a/app/views/reports/index.html.erb b/app/views/reports/index.html.erb index 56dbbba..1b3e7a9 100644 --- a/app/views/reports/index.html.erb +++ b/app/views/reports/index.html.erb @@ -6,29 +6,34 @@

    -<%#= render :partial => "delivery_chart", :locals => {:projects => @active} %> -

    Active Projects:

    -<%= render :partial => "projects_table", :locals => {:projects => @report.active} %> +<%= render :partial => "projects_table", + :locals => {:projects => @report.active} %>
    Show inactive projects

    Inactive Projects:

    - <%= render :partial => "projects_table", :locals => { :projects => @report.inactive} %> + <%= render :partial => "projects_table", + :locals => { :projects => @report.inactive} %>

    Upcoming Projects:

    -<%= render :partial => "projects_table", :locals => {:projects => @report.upcoming} %> +<%= render :partial => "projects_table", + :locals => {:projects => @report.upcoming} %>

    Just Wrapped:

    -<%= render :partial => "projects_table", :locals => {:projects => @report.ended, :delivered => true} %> +<%= render :partial => "projects_table", + :locals => {:projects => @report.ended, :delivered => true} %>

    * Dates are approximate

    - +

    + Bench Report + <%= content_tag("em", " - #{params['team']}") if params["team"].present? %> + <%= content_tag("em", " - #{params['skill']}") if params["skill"].present? %> +

    -

    Bench Report<%= content_tag("em", " - #{params['team']}") if params["team"].present? %><%= content_tag("em", " - #{params['skill']}") if params["skill"].present? %>

    <%= render :partial => "filter" %>
    @@ -44,19 +49,18 @@ <% end %> <% @report.bench.rows.each do |row| %> - - - <%= link_to row.user_name, "#", :class => "popover-trigger" %> - <%= render 'user_popover', {row: row} %> - - <% row.week_hours_sum.each do |hours| %> - <%= format_hours(hours.to_i, "td") %> - <% end %> - + + + <%= link_to row.user_name, "#", :class => "popover-trigger" %> + <%= render 'user_popover', {row: row} %> + + <% row.week_hours_sum.each do |hours| %> + <%= format_hours(hours.to_i, "td") %> + <% end %> + <% end %>
    -

    Pipeline

    @@ -67,16 +71,18 @@ <% end %> - <% last_client = nil %> + <%- last_client = nil %> <% @report.pipeline.rows.each do |row| %> - > + > - + <% row.week_hours.each do |hours| %> - + <% end %> - <% last_client = row.client %> <% end %>
    <%= row.client unless row.client == last_client %>"><%= row.user_name %><%= content_tag("span",' (PM)', :class => "muted") if row.skill.include?("PM") %>"> + <%= row.user_name %> + <%= content_tag("span",' (PM)', :class => "muted") if row.skill.include?("PM") %> + <%= hours > 0 ? hours.to_i : '' %><%= hours > 0 ? hours.to_i : '' %>
    diff --git a/app/views/schedules/_form.html.erb b/app/views/schedules/_form.html.erb deleted file mode 100644 index 0d93156..0000000 --- a/app/views/schedules/_form.html.erb +++ /dev/null @@ -1,54 +0,0 @@ -<%= form_for @schedule, :html => { :class => 'form-horizontal' } do |f| %> -
    - Review Mail Info.   - <% if @schedule.user.current_pm? -%> - <%= link_to "Review Dev Mail", edit_schedule_path(@schedule, :type => "regular"), :class => "btn btn-mini" %> - <%= link_to "Review PM Mail", edit_schedule_path(@schedule, :type => "pm"), :class => "btn btn-mini" %> - <% end -%> - -
    - <%= review_mail(@schedule, (params[:type] || "regular")).html_safe %> -
    -
    -
    - <%= controller.action_name.capitalize %> <%= @schedule.user.name %>'s Schedule Message -
    - <%= f.label :from, :class => 'control-label' %> -
    - <%= f.select :from, options_for_select(@users_for_select,@schedule.from), :include_blank => true, :prompt => 'Select From', :style => "width:385px;", :class => 'text_field chzn-select' %> -
    -
    -
    - <%= f.label :cc, :class => 'control-label' %> -
    - <%= select_tag "schedule[cc]", options_for_select(@users_for_select, @schedule.cc_emails), :multiple => true, :style => "width:385px;", :class => 'text_field chzn-select' %> -
    -
    -
    - <%= f.label :message, :class => 'control-label' %> -
    - <%= f.text_area :message, :class => 'text_area', :style => "width:385px;height:200px;" %> -
    -
    -
    - <%= f.label :ending_content, :class => 'control-label' %> -
    - <%= f.text_area :ending_content, :class => 'text_area', :style => "width:385px;height:200px;" %> -
    -
    -
    - <%= f.label :daily_schedule, :class => 'control-label' %> -
    - <%= f.text_area :daily_schedule, :value => @schedule.daily_schedule.data.inspect.gsub('], [',"],\n["), :class => 'text_area', :style => "width:385px;height:200px;" %> -
    -
    -
    -
    - <%= f.submit "Step1: Save For Review", :class => 'btn btn-primary' %> - <%= link_to 'Cancel', schedules_path, :class => 'btn' %> - <%= f.submit "Step2: Send Dev Mail", :confirm => "Are you sure?", :class => "btn btn-danger" %> - <% if @schedule.user.current_pm? -%> - OR <%= f.submit 'Step3: Send PM Mail', :confirm => "Are you sure?", :class => 'btn btn-danger' %> - <% end -%> -
    -<% end %> diff --git a/app/views/schedules/_form.html.haml b/app/views/schedules/_form.html.haml new file mode 100644 index 0000000..253f1a6 --- /dev/null +++ b/app/views/schedules/_form.html.haml @@ -0,0 +1,40 @@ += form_for @schedule, :html => { :class => 'form-horizontal' } do |f| + %fieldset{:style => "width:500px;float:right;"} + %legend + Review Mail Info.   + - if @schedule.user.current_pm? + = link_to "Review Dev Mail", edit_schedule_path(@schedule, :type => "regular"), :class => "btn btn-mini" + = link_to "Review PM Mail", edit_schedule_path(@schedule, :type => "pm"), :class => "btn btn-mini" + .control-group + = review_mail(@schedule, (params[:type] || "regular")).html_safe + %fieldset{:style => "width:500px;"} + %legend + = controller.action_name.capitalize + = @schedule.user.name + 's Schedule Message + .control-group + = f.label :from, :class => 'control-label' + .controls + = f.select :from, options_for_select(@users_for_select,@schedule.from), :include_blank => true, :prompt => 'Select From', :style => "width:385px;", :class => 'text_field chzn-select' + .control-group + = f.label :cc, :class => 'control-label' + .controls + = select_tag "schedule[cc]", options_for_select(@users_for_select, @schedule.cc_emails), :multiple => true, :style => "width:385px;", :class => 'text_field chzn-select' + .control-group + = f.label :message, :class => 'control-label' + .controls + = f.text_area :message, :class => 'text_area', :style => "width:385px;height:200px;" + .control-group + = f.label :ending_content, :class => 'control-label' + .controls + = f.text_area :ending_content, :class => 'text_area', :style => "width:385px;height:200px;" + .control-group + = f.label :daily_schedule, :class => 'control-label' + .controls + = f.text_area :daily_schedule, :value => @schedule.daily_schedule.data.inspect.gsub('], [',"],\n["), :class => 'text_area', :style => "width:385px;height:200px;" + .form-actions + = f.submit "Step1: Save For Review", :class => 'btn btn-primary' + = link_to 'Cancel', schedules_path, :class => 'btn' + = f.submit "Step2: Send Dev Mail", :confirm => "Are you sure?", :class => "btn btn-danger" + - if @schedule.user.current_pm? + OR #{f.submit 'Step3: Send PM Mail', :confirm => "Are you sure?", :class => 'btn btn-danger'} diff --git a/app/views/schedules/_index_actions.html.erb b/app/views/schedules/_index_actions.html.erb deleted file mode 100644 index ba41030..0000000 --- a/app/views/schedules/_index_actions.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -<% p actions %> -<% if actions.size > 0 %> -
    -
    - - <%= link_to *(actions.shift) %> - - <% if actions.size > 0 %> - - - - - - - - <% end %> - -
    -
    -<% end %> diff --git a/app/views/schedules/_index_actions.html.haml b/app/views/schedules/_index_actions.html.haml new file mode 100644 index 0000000..dc2f062 --- /dev/null +++ b/app/views/schedules/_index_actions.html.haml @@ -0,0 +1,13 @@ +- p actions +- if actions.size > 0 + %div{:style => "float:left; width:180px;"} + .btn-group + = link_to *(actions.shift) + - if actions.size > 0 + %a.btn.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"} + %span.caret + %span.indicator{:style => "display:none; float:right;"} + = image_tag('/assets/icon-roller.gif') + %ul.dropdown-menu + - actions.each do |action| + %li= link_to *action diff --git a/app/views/schedules/edit.html.erb b/app/views/schedules/edit.html.erb deleted file mode 100644 index 7e39e81..0000000 --- a/app/views/schedules/edit.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<% @title = "#{@schedule.user.name} - mail review" %> -<%= render :partial => 'form' %> diff --git a/app/views/schedules/edit.html.haml b/app/views/schedules/edit.html.haml new file mode 100644 index 0000000..d21daaa --- /dev/null +++ b/app/views/schedules/edit.html.haml @@ -0,0 +1,2 @@ +- @title = "#{@schedule.user.name} - mail review" += render :partial => 'form' diff --git a/app/views/schedules/new.html.erb b/app/views/schedules/new.html.erb deleted file mode 100644 index 786950e..0000000 --- a/app/views/schedules/new.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/app/views/schedules/new.html.haml b/app/views/schedules/new.html.haml new file mode 100644 index 0000000..c66fabf --- /dev/null +++ b/app/views/schedules/new.html.haml @@ -0,0 +1 @@ += render :partial => 'form' diff --git a/app/views/schedules/show.html.erb b/app/views/schedules/show.html.erb deleted file mode 100644 index 693fb33..0000000 --- a/app/views/schedules/show.html.erb +++ /dev/null @@ -1,37 +0,0 @@ -

    Schedule

    - -

    - User
    - <%= @schedule.user_id %> -

    - -

    - Message
    - <%= @schedule.message %> -

    - -

    - Gdata content
    - <%= @schedule.gdata_content.html_safe %> -

    - -

    - Week start
    - <%= @schedule.week_start %> -

    - -

    - Week end
    - <%= @schedule.week_end %> -

    - -

    - Status
    - <%= @schedule.status %> -

    - -
    - <%= link_to 'Back', schedules_path, :class => 'btn' %> - <%= link_to 'Edit', edit_schedule_path(@schedule), :class => 'btn' %> - <%= link_to 'Delete', schedule_path(@schedule), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger' %> -
    diff --git a/app/views/schedules/show.html.haml b/app/views/schedules/show.html.haml new file mode 100644 index 0000000..9b53a4a --- /dev/null +++ b/app/views/schedules/show.html.haml @@ -0,0 +1,29 @@ +%h1 Schedule +%p + %b User + %br/ + = @schedule.user_id +%p + %b Message + %br/ + = @schedule.message +%p + %b Gdata content + %br/ + = @schedule.gdata_content.html_safe +%p + %b Week start + %br/ + = @schedule.week_start +%p + %b Week end + %br/ + = @schedule.week_end +%p + %b Status + %br/ + = @schedule.status +.form-actions + = link_to 'Back', schedules_path, :class => 'btn' + = link_to 'Edit', edit_schedule_path(@schedule), :class => 'btn' + = link_to 'Delete', schedule_path(@schedule), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger' diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.haml similarity index 100% rename from app/views/sessions/new.html.erb rename to app/views/sessions/new.html.haml diff --git a/app/views/settings/app_settings/edit.html.erb b/app/views/settings/app_settings/edit.html.erb deleted file mode 100644 index 4b00e73..0000000 --- a/app/views/settings/app_settings/edit.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -<%= link_to "<< Back to Settings", settings_path %> -
    - <%= form_for AppSettings, url: settings_update_app_settings_path, method: :put do |f| %> -
    - <%= f.label 'API key', 'API key', :class => 'control-label' %> -
    - <%= f.text_field :dashboard_api_key %> -
    -
    -
    - <%= f.label 'Tracker ID', 'Google Analytics Tracker ID', :class => 'control-label' %> -
    - <%= f.text_field :google_analytics_tracker %> -
    -
    - -
    - <%= f.label 'Feedback URL', 'Feedback Javascript URL', :class => 'control-label' %> -
    - <%= f.text_field :feedback_url %> -
    -
    - -
    - <%= submit_tag "Save", :class => 'btn btn-primary' %> - <%= link_to 'Cancel', settings_edit_app_settings_path, :class => 'btn' %> -
    - <% end %> -
    diff --git a/app/views/settings/app_settings/edit.html.haml b/app/views/settings/app_settings/edit.html.haml new file mode 100644 index 0000000..6146c37 --- /dev/null +++ b/app/views/settings/app_settings/edit.html.haml @@ -0,0 +1,18 @@ += link_to "<< Back to Settings", settings_path +.well + = form_for AppSettings, url: settings_update_app_settings_path, method: :put do |f| + .control-group + = f.label 'API key', 'API key', :class => 'control-label' + .controls + = f.text_field :dashboard_api_key + .control-group + = f.label 'Tracker ID', 'Google Analytics Tracker ID', :class => 'control-label' + .controls + = f.text_field :google_analytics_tracker + .control-group + = f.label 'Feedback URL', 'Feedback Javascript URL', :class => 'control-label' + .controls + = f.text_field :feedback_url + .form-actions + = submit_tag "Save", :class => 'btn btn-primary' + = link_to 'Cancel', settings_edit_app_settings_path, :class => 'btn' diff --git a/app/views/settings/confluence/edit.html.erb b/app/views/settings/confluence/edit.html.erb deleted file mode 100644 index 0fe4122..0000000 --- a/app/views/settings/confluence/edit.html.erb +++ /dev/null @@ -1,50 +0,0 @@ -<%= link_to "<< Back to Settings", settings_path %> -
    - <%= form_for :confluence, url: settings_update_confluence_path, method: :put do |f| %> -
    - <%= f.label 'Url', 'Confluence WSDL Url', :class => 'control-label' %> -
    - <%= f.text_field 'url', value: @settings[:url] %> -
    -
    -
    - <%= f.label 'User Name', 'Confluence User Name', :class => 'control-label' %> -
    - <%= f.text_field 'user', value: @settings[:user] %> -
    -
    - -
    - <%= f.label 'Password', 'Confluence Password', :class => 'control-label' %> -
    - <%= f.password_field 'password', value: @settings[:password] %> -
    -
    - -
    - <%= f.label 'Space Name', 'Confluence Space Name', :class => 'control-label' %> -
    - <%= f.text_field 'space', value: @settings[:space] %> -
    -
    - -
    - <%= f.label 'Parent Page Id', 'Confluence Parent Page Id', :class => 'control-label' %> -
    - <%= f.text_field 'faq_parent', value: @settings[:faq_parent] %> -
    -
    - -
    - <%= f.label 'Page Url', 'Confluence Page Url', :class => 'control-label' %> -
    - <%= f.text_field 'faq_link', value: @settings[:faq_link] %> -
    -
    - -
    - <%= submit_tag "Save", :class => 'btn btn-primary' %> - <%= link_to 'Cancel', settings_edit_confluence_path, :class => 'btn' %> -
    - <% end %> -
    diff --git a/app/views/settings/confluence/edit.html.haml b/app/views/settings/confluence/edit.html.haml new file mode 100644 index 0000000..ca5a0e3 --- /dev/null +++ b/app/views/settings/confluence/edit.html.haml @@ -0,0 +1,30 @@ += link_to "<< Back to Settings", settings_path +.well + = form_for :confluence, url: settings_update_confluence_path, method: :put do |f| + .control-group + = f.label 'Url', 'Confluence WSDL Url', :class => 'control-label' + .controls + = f.text_field 'url', value: @settings[:url] + .control-group + = f.label 'User Name', 'Confluence User Name', :class => 'control-label' + .controls + = f.text_field 'user', value: @settings[:user] + .control-group + = f.label 'Password', 'Confluence Password', :class => 'control-label' + .controls + = f.password_field 'password', value: @settings[:password] + .control-group + = f.label 'Space Name', 'Confluence Space Name', :class => 'control-label' + .controls + = f.text_field 'space', value: @settings[:space] + .control-group + = f.label 'Parent Page Id', 'Confluence Parent Page Id', :class => 'control-label' + .controls + = f.text_field 'faq_parent', value: @settings[:faq_parent] + .control-group + = f.label 'Page Url', 'Confluence Page Url', :class => 'control-label' + .controls + = f.text_field 'faq_link', value: @settings[:faq_link] + .form-actions + = submit_tag "Save", :class => 'btn btn-primary' + = link_to 'Cancel', settings_edit_confluence_path, :class => 'btn' diff --git a/app/views/settings/google/edit.html.erb b/app/views/settings/google/edit.html.erb deleted file mode 100644 index 13c1608..0000000 --- a/app/views/settings/google/edit.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -<%= link_to "<< Back to Settings", settings_path %> -
    - <%= form_for AppSettings, url: settings_update_google_path, method: :put do |f| %> -
    - <%= f.label 'Client ID', 'Google OAuth Client ID', :class => 'control-label' %> -
    - <%= f.text_field :google_client_id %> -
    -
    -
    - <%= f.label 'Client Secret', 'Google OAuth Client Secret', :class => 'control-label' %> -
    - <%= f.password_field :google_client_secret, value: AppSettings.google_client_secret %> -
    -
    - -
    - <%= submit_tag "Save", :class => 'btn btn-primary' %> - <%= link_to 'Cancel', settings_edit_google_path, :class => 'btn' %> -
    - <% end %> -
    diff --git a/app/views/settings/google/edit.html.haml b/app/views/settings/google/edit.html.haml new file mode 100644 index 0000000..ecef2f1 --- /dev/null +++ b/app/views/settings/google/edit.html.haml @@ -0,0 +1,14 @@ += link_to "<< Back to Settings", settings_path +.well + = form_for AppSettings, url: settings_update_google_path, method: :put do |f| + .control-group + = f.label 'Client ID', 'Google OAuth Client ID', :class => 'control-label' + .controls + = f.text_field :google_client_id + .control-group + = f.label 'Client Secret', 'Google OAuth Client Secret', :class => 'control-label' + .controls + = f.password_field :google_client_secret, value: AppSettings.google_client_secret + .form-actions + = submit_tag "Save", :class => 'btn btn-primary' + = link_to 'Cancel', settings_edit_google_path, :class => 'btn' diff --git a/app/views/settings/harvest/edit.html.erb b/app/views/settings/harvest/edit.html.erb deleted file mode 100644 index 0738d8a..0000000 --- a/app/views/settings/harvest/edit.html.erb +++ /dev/null @@ -1,39 +0,0 @@ -<%= link_to "<< Back to Settings", settings_path %> -
    -

    - - <%= current_user.harvest_token %> -

    -

    - - <%= current_user.harvest_refresh_token %> -

    -

    - - <%= current_user.expires_at %> -

    -

    - Auth Harvest -

    -
    - -
    - <%= form_tag settings_update_harvest_path, method: :put do %> -
    - <%= label_tag 'identifier', 'Harvest API Identifier', :class => 'control-label' %> -
    - <%= text_field_tag 'identifier', AppSettings.harvest_identifier %> -
    -
    -
    - <%= label_tag 'secret', 'Harvest API Secret', :class => 'control-label' %> -
    - <%= text_field_tag 'secret', AppSettings.harvest_secret %> -
    -
    -
    - <%= submit_tag "Save", :class => 'btn btn-primary' %> - <%= link_to 'Cancel', settings_edit_harvest_path, :class => 'btn' %> -
    - <% end %> -
    diff --git a/app/views/settings/harvest/edit.html.haml b/app/views/settings/harvest/edit.html.haml new file mode 100644 index 0000000..44bc9a1 --- /dev/null +++ b/app/views/settings/harvest/edit.html.haml @@ -0,0 +1,26 @@ += link_to "<< Back to Settings", settings_path +.well + %p + %label{:for => ""} Access Token + %span= current_user.harvest_token + %p + %label{:for => ""} Refresh Token + %span= current_user.harvest_refresh_token + %p + %label{:for => ""} Expired At + %span= current_user.expires_at + %p + %a.btn.btn-primary{:href => "/auth/harvest"} Auth Harvest +.well + = form_tag settings_update_harvest_path, method: :put do + .control-group + = label_tag 'identifier', 'Harvest API Identifier', :class => 'control-label' + .controls + = text_field_tag 'identifier', AppSettings.harvest_identifier + .control-group + = label_tag 'secret', 'Harvest API Secret', :class => 'control-label' + .controls + = text_field_tag 'secret', AppSettings.harvest_secret + .form-actions + = submit_tag "Save", :class => 'btn btn-primary' + = link_to 'Cancel', settings_edit_harvest_path, :class => 'btn' diff --git a/app/views/settings/index.html.erb b/app/views/settings/index.html.erb deleted file mode 100644 index 1ed57f0..0000000 --- a/app/views/settings/index.html.erb +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/app/views/settings/index.html.haml b/app/views/settings/index.html.haml new file mode 100644 index 0000000..ca65579 --- /dev/null +++ b/app/views/settings/index.html.haml @@ -0,0 +1,6 @@ +%ul + %li= link_to('Mail Settings', settings_edit_mail_settings_path) + %li= link_to('Harvest', settings_edit_harvest_path) + %li= link_to('Confluence', settings_edit_confluence_path) + %li= link_to('Google OAuth', settings_edit_google_path) + %li= link_to('Application Settings', settings_edit_app_settings_path) diff --git a/app/views/settings/mail_settings/edit.html.erb b/app/views/settings/mail_settings/edit.html.erb deleted file mode 100644 index e903345..0000000 --- a/app/views/settings/mail_settings/edit.html.erb +++ /dev/null @@ -1,46 +0,0 @@ -<%= link_to "<< Back to Settings", settings_path %> - -
    - <%= form_tag settings_update_mail_settings_path, method: :put do %> -
    - <%= label_tag 'from', 'From address', :class => 'control-label' %> -
    - <%= text_field_tag 'from', Configuration::Mailer.from %> -
    -
    -
    - <%= label_tag 'scheduler_email', 'Scheduler email', :class => 'control-label' %> -
    - <%= text_field_tag 'scheduler_email', Configuration::Mailer.scheduler_email %> -
    -
    -
    - <%= label_tag 'host', 'SMTP host', :class => 'control-label' %> -
    - <%= text_field_tag 'host', Configuration::Mailer.host %> -
    -
    -
    - <%= label_tag 'port', 'SMTP port', :class => 'control-label' %> -
    - <%= text_field_tag 'port', Configuration::Mailer.port %> -
    -
    -
    - <%= label_tag 'user_name', 'SMTP username', :class => 'control-label' %> -
    - <%= text_field_tag 'user_name', Configuration::Mailer.user_name %> -
    -
    -
    - <%= label_tag 'password', 'SMTP password', :class => 'control-label' %> -
    - <%= text_field_tag 'password', Configuration::Mailer.password %> -
    -
    -
    - <%= submit_tag "Save", :class => 'btn btn-primary' %> - <%= link_to 'Cancel', settings_edit_mail_settings_path, :class => 'btn' %> -
    - <% end %> -
    diff --git a/app/views/settings/mail_settings/edit.html.haml b/app/views/settings/mail_settings/edit.html.haml new file mode 100644 index 0000000..8a0eba3 --- /dev/null +++ b/app/views/settings/mail_settings/edit.html.haml @@ -0,0 +1,30 @@ += link_to "<< Back to Settings", settings_path +.well + = form_tag settings_update_mail_settings_path, method: :put do + .control-group + = label_tag 'from', 'From address', :class => 'control-label' + .controls + = text_field_tag 'from', Configuration::Mailer.from + .control-group + = label_tag 'scheduler_email', 'Scheduler email', :class => 'control-label' + .controls + = text_field_tag 'scheduler_email', Configuration::Mailer.scheduler_email + .control-group + = label_tag 'host', 'SMTP host', :class => 'control-label' + .controls + = text_field_tag 'host', Configuration::Mailer.host + .control-group + = label_tag 'port', 'SMTP port', :class => 'control-label' + .controls + = text_field_tag 'port', Configuration::Mailer.port + .control-group + = label_tag 'user_name', 'SMTP username', :class => 'control-label' + .controls + = text_field_tag 'user_name', Configuration::Mailer.user_name + .control-group + = label_tag 'password', 'SMTP password', :class => 'control-label' + .controls + = text_field_tag 'password', Configuration::Mailer.password + .form-actions + = submit_tag "Save", :class => 'btn btn-primary' + = link_to 'Cancel', settings_edit_mail_settings_path, :class => 'btn' diff --git a/app/views/settings/setup.html.erb b/app/views/settings/setup.html.erb deleted file mode 100644 index 17258c2..0000000 --- a/app/views/settings/setup.html.erb +++ /dev/null @@ -1,54 +0,0 @@ -<% if @config.errors.any? -%> -
    -

    <%= pluralize(@config.errors.count, "error") %> prohibited this configuration from being saved:

    - -
    -<% end -%> - -
    -
    -

    Option 1: Fill in basic info and get ready to log in users!

    - <%= form_for @config, :url => setup_path, :as => 'config_form', :html => { :class => 'form-horizontal setup' } do |f| %> -
    - <%= f.label "Google Oauth Client ID", :class => 'control-label' %> -
    - <%= f.text_field :client_id, :class => 'text_field' %> -
    -
    -
    - <%= f.label "Google Oauth Client Secret", :class => 'control-label' %> -
    - <%= f.text_field :client_secret, :class => 'text_field' %> -
    -
    - -
    - <%= f.label "Your Google Email", :class => 'control-label' %> -
    - <%= f.text_field :email, :class => 'text_field' %> -

    (for SuperAdmin powers)

    -
    -
    - -
    - -
    - <%= f.submit "Let's do this", :class => 'btn btn-primary' %> -
    - <% end %> -
    - -
    - - <% if unset_mode? %> -
    -

    Option 2: Click below to enter demo mode. The fastest way to have fun.

    - <%= link_to 'Switch to Demo Mode', switch_mode_path(to: 'demo'), :class => 'btn btn-primary' %> -
    - <% end %> -
    - diff --git a/app/views/settings/setup.html.haml b/app/views/settings/setup.html.haml new file mode 100644 index 0000000..9d56d87 --- /dev/null +++ b/app/views/settings/setup.html.haml @@ -0,0 +1,34 @@ +- if @config.errors.any? + #error_explanation + %h2 + = pluralize(@config.errors.count, "error") + prohibited this configuration from being saved: + %ul + - @config.errors.full_messages.each do |msg| + %li + * #{msg} +.row + .col-md-4 + %h2 Option 1: Fill in basic info and get ready to log in users! + = form_for @config, :url => setup_path, :as => 'config_form', :html => { :class => 'form-horizontal setup' } do |f| + .control-group + = f.label "Google Oauth Client ID", :class => 'control-label' + .controls + = f.text_field :client_id, :class => 'text_field' + .control-group + = f.label "Google Oauth Client Secret", :class => 'control-label' + .controls + = f.text_field :client_secret, :class => 'text_field' + .control-group + = f.label "Your Google Email", :class => 'control-label' + .controls + = f.text_field :email, :class => 'text_field' + %p.hint (for SuperAdmin powers) + %br/ + .form-actions + = f.submit "Let's do this", :class => 'btn btn-primary' + .col-md-2 + - if unset_mode? + .col-md-4 + %h2 Option 2: Click below to enter demo mode. The fastest way to have fun. + = link_to 'Switch to Demo Mode', switch_mode_path(to: 'demo'), :class => 'btn btn-primary' diff --git a/app/views/skills/_form.html.erb b/app/views/skills/_form.html.erb deleted file mode 100644 index 9069c4f..0000000 --- a/app/views/skills/_form.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -<%= form_for @skill, :html => { :class => 'form-horizontal' } do |f| %> -
    - <%= f.label :name, :class => 'control-label' %> -
    - <%= f.text_field :name, :class => 'text_field' %> -
    -
    -
    - <%= f.label :importance, :class => 'control-label' %> -
    - <%= f.number_field :importance, :class => 'number_field' %> -
    -
    - -
    - <%= f.submit nil, :class => 'btn btn-primary' %> - <%= link_to t('.cancel', :default => t("helpers.links.cancel")), - skills_path, :class => 'btn' %> -
    -<% end %> diff --git a/app/views/skills/_form.html.haml b/app/views/skills/_form.html.haml new file mode 100644 index 0000000..fe80706 --- /dev/null +++ b/app/views/skills/_form.html.haml @@ -0,0 +1,13 @@ += form_for @skill, :html => { :class => 'form-horizontal' } do |f| + .control-group + = f.label :name, :class => 'control-label' + .controls + = f.text_field :name, :class => 'text_field' + .control-group + = f.label :importance, :class => 'control-label' + .controls + = f.number_field :importance, :class => 'number_field' + .form-actions + = f.submit nil, :class => 'btn btn-primary' + = link_to t('.cancel', :default => t("helpers.links.cancel")), | + skills_path, :class => 'btn' | diff --git a/app/views/skills/edit.html.erb b/app/views/skills/edit.html.erb deleted file mode 100644 index 9ea102c..0000000 --- a/app/views/skills/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -<%- model_class = Skill -%> - -<%= render :partial => 'form' %> diff --git a/app/views/skills/edit.html.haml b/app/views/skills/edit.html.haml new file mode 100644 index 0000000..72f30bd --- /dev/null +++ b/app/views/skills/edit.html.haml @@ -0,0 +1,6 @@ +- model_class = Skill +.page-header + %h1= t '.title', :default => t('helpers.titles.edit', | + :model => model_class.model_name.human, | + :default => "Edit #{model_class.model_name.human}") | += render :partial => 'form' diff --git a/app/views/skills/index.html.erb b/app/views/skills/index.html.erb deleted file mode 100644 index 2b778e5..0000000 --- a/app/views/skills/index.html.erb +++ /dev/null @@ -1,58 +0,0 @@ -<%- model_class = Skill -%> - -

    <%=t '.title', :default => model_class.model_name.human.pluralize %>

    - - -<%= form_tag skills_path, method: :get, :html => { :class => 'form-horizontal' } do %> -
    - <%= text_field_tag :query, params[:query] %> - <%= submit_tag "Search", name: nil, :class => 'btn btn-primary' %> -
    -<% end %> - - - - - - - - - - - - - <% @skills.each do |skill| %> - - - - - - - - <% end %> - -
    <%= model_class.human_attribute_name(:name) %><%= model_class.human_attribute_name(:importance) %><%= model_class.human_attribute_name(:created_at) %><%=t '.actions', :default => t("helpers.actions") %>
    <%= skill.name %><%= skill.importance %><%=l skill.created_at, format: :short %> - <% if can? :show, skill %> - <%= link_to t('.show', :default => t("helpers.links.show")), - skill_path(skill), :class => 'btn btn-mini' %> - <% end %> - - <% if can? :update, skill %> - <%= link_to t('.edit', :default => t("helpers.links.edit")), - edit_skill_path(skill), :class => 'btn btn-mini' %> - <% end %> - - <% if can? :destroy, skill %> - <%= link_to t('.destroy', :default => t("helpers.links.destroy")), - skill_path(skill), - :method => :delete, - :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, - :class => 'btn btn-mini btn-danger' %> - <% end %> -
    - -<% if can? :create, Skill %> -<%= link_to t('.new', :default => t("helpers.links.new")), - new_skill_path, - :class => 'btn btn-primary' %> -<% end %> diff --git a/app/views/skills/index.html.haml b/app/views/skills/index.html.haml new file mode 100644 index 0000000..f4d7d78 --- /dev/null +++ b/app/views/skills/index.html.haml @@ -0,0 +1,39 @@ +- model_class = Skill +%h1= t '.title', :default => model_class.model_name.human.pluralize += form_tag skills_path, method: :get, :html => { :class => 'form-horizontal' } do + .control-group + = text_field_tag :query, params[:query] + = submit_tag "Search", name: nil, :class => 'btn btn-primary' +%table.table.table-striped + %thead + %tr + %th= model_class.human_attribute_name(:name) + %th= model_class.human_attribute_name(:importance) + %th= model_class.human_attribute_name(:created_at) + %th= t '.actions', :default => t("helpers.actions") + %tbody + - @skills.each do |skill| + %tr + %td= skill.name + %td= skill.importance + %td= l skill.created_at, format: :short + %td + - if can? :show, skill + = link_to t('.show', :default => t("helpers.links.show")), | + skill_path(skill), :class => 'btn btn-mini' | + - if can? :update, skill + = link_to t('.edit', :default => t("helpers.links.edit")), | + edit_skill_path(skill), :class => 'btn btn-mini' | + - if can? :destroy, skill + = link_to t('.destroy', | + :default => t("helpers.links.destroy")), | + skill_path(skill), | + :method => :delete, | + :data => { :confirm => t('.confirm', | + :default => t("helpers.links.confirm", | + :default => 'Are you sure?')) }, | + :class => 'btn btn-mini btn-danger' | +- if can? :create, Skill + = link_to t('.new', :default => t("helpers.links.new")), | + new_skill_path, | + :class => 'btn btn-primary' | diff --git a/app/views/skills/new.html.erb b/app/views/skills/new.html.erb deleted file mode 100644 index f1c23f0..0000000 --- a/app/views/skills/new.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -<%- model_class = Skill -%> - -<%= render :partial => 'form' %> diff --git a/app/views/skills/new.html.haml b/app/views/skills/new.html.haml new file mode 100644 index 0000000..33e29a8 --- /dev/null +++ b/app/views/skills/new.html.haml @@ -0,0 +1,6 @@ +- model_class = Skill +.page-header + %h1= t '.title', :default => t('helpers.titles.new', | + :model => model_class.model_name.human, | + :default => "New #{model_class.model_name.human}") | += render :partial => 'form' diff --git a/app/views/skills/show.html.erb b/app/views/skills/show.html.erb deleted file mode 100644 index e14d7c4..0000000 --- a/app/views/skills/show.html.erb +++ /dev/null @@ -1,43 +0,0 @@ -<%- model_class = Skill -%> - - -
    -
    <%= model_class.human_attribute_name(:name) %>
    -
    <%= @skill.name %>
    -
    <%= model_class.human_attribute_name(:importance) %>
    -
    <%= raw @skill.importance || "  " %>
    - -
    Users
    -
    - - -
    - -
    - - -
    - <% if can? :index, Skill %> - <%= link_to t('.back', :default => t("helpers.links.back")), - skills_path, :class => 'btn' %> - <% end %> - - <% if can? :update, @skill %> - <%= link_to t('.edit', :default => t("helpers.links.edit")), - edit_skill_path(@skill), :class => 'btn' %> - <% end %> - - <% if can? :destroy, @skill %> - <%= link_to t('.destroy', :default => t("helpers.links.destroy")), - skill_path(@skill), - :method => 'delete', - :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, - :class => 'btn btn-danger' %> - <% end %> -
    diff --git a/app/views/skills/show.html.haml b/app/views/skills/show.html.haml new file mode 100644 index 0000000..e862630 --- /dev/null +++ b/app/views/skills/show.html.haml @@ -0,0 +1,35 @@ +- model_class = Skill +.page-header + %h1= t '.title', :default => model_class.model_name.human +%dl.dl-horizontal + %dt + %strong= model_class.human_attribute_name(:name) + %dd= @skill.name + %dt + %strong= model_class.human_attribute_name(:importance) + %dd= raw @skill.importance || "  " + %dt Users + %dd + %ul.inline + - @skill.experiences.each do |e| + %li.skill{:class => "skill-level-\#{e.level}"} + = e.user.name + \  + \#{e.level} +.form-actions + - if can? :index, Skill + = link_to t('.back', :default => t("helpers.links.back")), | + skills_path, | + :class => 'btn' | + - if can? :update, @skill + = link_to t('.edit', :default => t("helpers.links.edit")), | + edit_skill_path(@skill), | + :class => 'btn' | + - if can? :destroy, @skill + = link_to t('.destroy', :default => t("helpers.links.destroy")), | + skill_path(@skill), | + :method => 'delete', | + :data => { :confirm => t('.confirm', | + :default => t("helpers.links.confirm", | + :default => 'Are you sure?')) }, | + :class => 'btn btn-danger' | diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb deleted file mode 100644 index 2c55372..0000000 --- a/app/views/users/_form.html.erb +++ /dev/null @@ -1,47 +0,0 @@ -<%= form_for setup_user(@user), :html => { :class => 'form-horizontal' } do |f| %> -
    - <%= controller.action_name.capitalize %> User - -
    - <%= f.label :group_id, :class => 'control-label' %> -
    - <% groups_array = Group.order("name ASC").map { |group| [group.name, group.id] } %> - <%= f.select :group_id, groups_array %> -
    -
    - -
    - <%= f.label :name, :class => 'control-label' %> -
    - <%= f.text_field :name, :class => 'text_field' %> -
    -
    - -
    - <%= f.label :email, :class => 'control-label' %> -
    - <%= f.text_field :email, :class => 'text_field' %> -
    -
    - -
    - <%= f.label :skills, :class => 'control-label' %> - - <%= f.fields_for :experiences do |ff| %> -
    - <%= ff.hidden_field :skill_id %> - <%= ff.check_box :_destroy, {:checked => ff.object.persisted?}, '0', '1' %> - <%= ff.label :_destroy, ff.object.skill.name, :class => 'checkbox inline' %> - <%#= ff.label :_destroy, :level, :xclass => 'control-label' %> - <%#= ff.number_field :level, value: ff.object.level, :in => (1..5)%> - <%= ff.select :level, options_for_select([1,2,3,4,5], selected: ff.object.level), include_blank: true, size: 3, class: "span1" %> -
    - <% end %> -
    - -
    - <%= f.submit nil, :class => 'btn btn-primary' %> - <%= link_to 'Cancel', users_path, :class => 'btn' %> -
    -
    -<% end %> diff --git a/app/views/users/_form.html.haml b/app/views/users/_form.html.haml new file mode 100644 index 0000000..c3a8f6b --- /dev/null +++ b/app/views/users/_form.html.haml @@ -0,0 +1,29 @@ += form_for setup_user(@user), :html => { :class => 'form-horizontal' } do |f| + %fieldset + %legend + = controller.action_name.capitalize + User + .control-group + = f.label :group_id, :class => 'control-label' + .controls + - groups_array = Group.order("name ASC").map { |group| [group.name, group.id] } + = f.select :group_id, groups_array + .control-group + = f.label :name, :class => 'control-label' + .controls + = f.text_field :name, :class => 'text_field' + .control-group + = f.label :email, :class => 'control-label' + .controls + = f.text_field :email, :class => 'text_field' + .control-group.skills + = f.label :skills, :class => 'control-label' + = f.fields_for :experiences do |ff| + .controls + = ff.hidden_field :skill_id + = ff.check_box :_destroy, {:checked => ff.object.persisted?}, '0', '1' + = ff.label :_destroy, ff.object.skill.name, :class => 'checkbox inline' + = ff.select :level, options_for_select([1,2,3,4,5], selected: ff.object.level), include_blank: true, size: 3, class: "span1" + .form-actions + = f.submit nil, :class => 'btn btn-primary' + = link_to 'Cancel', users_path, :class => 'btn' diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb deleted file mode 100644 index eef9570..0000000 --- a/app/views/users/edit.html.erb +++ /dev/null @@ -1,47 +0,0 @@ - -<%= form_for setup_user(@user), :html => { :class => 'form-horizontal' } do |f| %> -
    - Edit User Settings - -
    - <%= f.label :group_id, :class => 'control-label' %> -
    - <% groups_array = Group.order("name ASC").map { |group| [group.name, group.id] } %> - <%= f.select :group_id, groups_array %> -
    -
    - -
    - <%= f.label :name, :class => 'control-label' %> -
    - <%= f.text_field :name, :class => 'text_field' %> -
    -
    - -
    - <%= f.label :email, :class => 'control-label' %> -
    - <%= f.text_field :email, :class => 'text_field' %> -
    -
    - -
    - <%= f.label :role, :class => 'control-label' %> -
    - <%= f.select :role, User::ROLES, :class => 'text_field' %> -
    -
    - -
    - <%= f.submit "Update User Settings", :class => 'btn btn-primary' %> - <%= link_to 'Cancel', users_path, :class => 'btn' %> -
    -
    -<% end %> diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml new file mode 100644 index 0000000..408a8f0 --- /dev/null +++ b/app/views/users/edit.html.haml @@ -0,0 +1,28 @@ +%ul.nav.nav-tabs + %li.active + %a{:href => ""} Settings + %li + = link_to "Skills", skills_user_path(@user) += form_for setup_user(@user), :html => { :class => 'form-horizontal' } do |f| + %fieldset + %legend Edit User Settings + .control-group + = f.label :group_id, :class => 'control-label' + .controls + - groups_array = Group.order("name ASC").map { |group| [group.name, group.id] } + = f.select :group_id, groups_array + .control-group + = f.label :name, :class => 'control-label' + .controls + = f.text_field :name, :class => 'text_field' + .control-group + = f.label :email, :class => 'control-label' + .controls + = f.text_field :email, :class => 'text_field' + .control-group + = f.label :role, :class => 'control-label' + .controls + = f.select :role, User::ROLES, :class => 'text_field' + .form-actions + = f.submit "Update User Settings", :class => 'btn btn-primary' + = link_to 'Cancel', users_path, :class => 'btn' diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb deleted file mode 100644 index ede2b60..0000000 --- a/app/views/users/index.html.erb +++ /dev/null @@ -1,53 +0,0 @@ -

    Users

    - - -<%= form_tag users_path, method: :get, :html => { :class => 'form-horizontal' } do %> -
    - <%= text_field_tag :query, params[:query] %> - <%= submit_tag "Search", name: nil, :class => 'btn btn-primary' %> -
    -<% end %> - - - - - - - - - - - - - <% @users.each do |user| %> - - - - - <% if can? :update, user %> - - <% else %> - - <% end %> - - - - <% end %> - -
    GroupNameEmailActions
    <%= user.group.try(:name) %><%= user.name %><%= best_in_place user, :email, :type => :input, :nil => "Click to add" %><%= user.email %> - <% if can? :show, user %> - <%= link_to 'Show', user_path(user), :class => 'btn btn-mini' %> - <% end %> - - <% if can? :update, user %> - <%= link_to 'Edit', edit_user_path(user), :class => 'btn btn-mini' %> - <% end %> - - <% if can? :destroy, user %> - <%= link_to 'Destroy', user_path(user), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' %> - <% end %> -
    - -<% if can? :create, User %> -<%= link_to 'New', new_user_path, :class => 'btn btn-primary' %> -<% end %> diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml new file mode 100644 index 0000000..49c05e8 --- /dev/null +++ b/app/views/users/index.html.haml @@ -0,0 +1,30 @@ +%h1 Users += form_tag users_path, method: :get, :html => { :class => 'form-horizontal' } do + .control-group + = text_field_tag :query, params[:query] + = submit_tag "Search", name: nil, :class => 'btn btn-primary' +%table.table.table-striped + %thead + %tr + %th Group + %th Name + %th Email + %th Actions + %tbody + - @users.each do |user| + %tr + %td= user.group.try(:name) + %td= user.name + - if can? :update, user + %td= best_in_place user, :email, :type => :input, :nil => "Click to add" + - else + %td= user.email + %td + - if can? :show, user + = link_to 'Show', user_path(user), :class => 'btn btn-mini' + - if can? :update, user + = link_to 'Edit', edit_user_path(user), :class => 'btn btn-mini' + - if can? :destroy, user + = link_to 'Destroy', user_path(user), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' +- if can? :create, User + = link_to 'New', new_user_path, :class => 'btn btn-primary' diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb deleted file mode 100644 index 786950e..0000000 --- a/app/views/users/new.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/app/views/users/new.html.haml b/app/views/users/new.html.haml new file mode 100644 index 0000000..c66fabf --- /dev/null +++ b/app/views/users/new.html.haml @@ -0,0 +1 @@ += render :partial => 'form' diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb deleted file mode 100644 index 6996d48..0000000 --- a/app/views/users/show.html.erb +++ /dev/null @@ -1,44 +0,0 @@ -

    User

    - -

    - Name
    - <%= @user.name %> -

    - -

    - Email
    - <%= @user.email %> -

    - -

    - Is pm
    - <%= @user.is_pm %> -

    - -Skills - - -Projects - - -
    - <% if can? :index, User %> - <%= link_to 'Back', users_path, :class => 'btn' %> - <% end %> - - <% if can? :update, @user %> - <%= link_to 'Edit', edit_user_path(@user), :class => 'btn' %> - <% end %> - - <% if can? :destroy, @user %> - <%= link_to 'Delete', user_path(@user), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger' %> - <% end %> -
    diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml new file mode 100644 index 0000000..bb2d571 --- /dev/null +++ b/app/views/users/show.html.haml @@ -0,0 +1,34 @@ +%h1 User +%p + %b Name + %br/ + = @user.name +%p + %b Email + %br/ + = @user.email +%p + %b Is pm + %br/ + = @user.is_pm +%b Skills +%ul.inline + - @user.experiences.each do |e| + %li.skill{:class => "skill-level-#{e.level}"} + = e.skill.name + \  + \#{e.level} +%b Projects +%ul.inline + - @matched_projects.each do |match| + %li + = match[0] + \  + \#{match[1]} +.form-actions + - if can? :index, User + = link_to 'Back', users_path, :class => 'btn' + - if can? :update, @user + = link_to 'Edit', edit_user_path(@user), :class => 'btn' + - if can? :destroy, @user + = link_to 'Delete', user_path(@user), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger' diff --git a/app/views/users/skills.html.erb b/app/views/users/skills.html.erb deleted file mode 100644 index 96601cb..0000000 --- a/app/views/users/skills.html.erb +++ /dev/null @@ -1,32 +0,0 @@ - -<%= form_for setup_user(@user), :html => { :class => 'form-horizontal' } do |f| %> -
    - Edit User Skills - -
    - <%= f.label :skills, :class => 'control-label' %> - - <%= f.fields_for :experiences do |ff| %> -
    - <%= ff.hidden_field :skill_id %> - <%= ff.check_box :_destroy, {:checked => ff.object.persisted?}, '0', '1' %> - <%= ff.label :_destroy, ff.object.skill.name, :class => 'checkbox inline' %> - <%#= ff.label :_destroy, :level, :xclass => 'control-label' %> - <%#= ff.number_field :level, value: ff.object.level, :in => (1..5)%> - <%= ff.select :level, options_for_select([1,2,3,4,5], selected: ff.object.level), include_blank: true, size: 3, class: "span1" %> -
    - <% end %> -
    -
    - <%= f.submit "Update User Skills", :class => 'btn btn-primary' %> - <%= link_to 'Cancel', users_path, :class => 'btn' %> -
    -
    -<% end %> diff --git a/app/views/users/skills.html.haml b/app/views/users/skills.html.haml new file mode 100644 index 0000000..565e12e --- /dev/null +++ b/app/views/users/skills.html.haml @@ -0,0 +1,19 @@ +%ul.nav.nav-tabs + %li + = link_to "Settings", edit_user_path(@user) + %li.active + = link_to "Skills", skills_user_path(@user) += form_for setup_user(@user), :html => { :class => 'form-horizontal' } do |f| + %fieldset + %legend Edit User Skills + .control-group.skills + = f.label :skills, :class => 'control-label' + = f.fields_for :experiences do |ff| + .controls + = ff.hidden_field :skill_id + = ff.check_box :_destroy, {:checked => ff.object.persisted?}, '0', '1' + = ff.label :_destroy, ff.object.skill.name, :class => 'checkbox inline' + = ff.select :level, options_for_select([1,2,3,4,5], selected: ff.object.level), include_blank: true, size: 3, class: "span1" + .form-actions + = f.submit "Update User Skills", :class => 'btn btn-primary' + = link_to 'Cancel', users_path, :class => 'btn' diff --git a/app/views/week_hours/_form.html.erb b/app/views/week_hours/_form.html.erb deleted file mode 100644 index ed300ce..0000000 --- a/app/views/week_hours/_form.html.erb +++ /dev/null @@ -1,31 +0,0 @@ -<%= form_for @week_hour, :html => { :class => 'form-horizontal' } do |f| %> -
    - <%= controller.action_name.capitalize %> Week Hour - -
    - <%= f.label :raw_item_id, :class => 'control-label' %> -
    - <%= f.number_field :raw_item_id, :class => 'number_field' %> -
    -
    - -
    - <%= f.label :week, :class => 'control-label' %> -
    - <%= f.text_field :week, :class => 'text_field' %> -
    -
    - -
    - <%= f.label :hours, :class => 'control-label' %> -
    - <%= f.text_field :hours, :class => 'text_field' %> -
    -
    - -
    - <%= f.submit nil, :class => 'btn btn-primary' %> - <%= link_to 'Cancel', week_hours_path, :class => 'btn' %> -
    -
    -<% end %> diff --git a/app/views/week_hours/_form.html.haml b/app/views/week_hours/_form.html.haml new file mode 100644 index 0000000..dd2b83f --- /dev/null +++ b/app/views/week_hours/_form.html.haml @@ -0,0 +1,20 @@ += form_for @week_hour, :html => { :class => 'form-horizontal' } do |f| + %fieldset + %legend + = controller.action_name.capitalize + Week Hour + .control-group + = f.label :raw_item_id, :class => 'control-label' + .controls + = f.number_field :raw_item_id, :class => 'number_field' + .control-group + = f.label :week, :class => 'control-label' + .controls + = f.text_field :week, :class => 'text_field' + .control-group + = f.label :hours, :class => 'control-label' + .controls + = f.text_field :hours, :class => 'text_field' + .form-actions + = f.submit nil, :class => 'btn btn-primary' + = link_to 'Cancel', week_hours_path, :class => 'btn' diff --git a/app/views/week_hours/edit.html.erb b/app/views/week_hours/edit.html.erb deleted file mode 100644 index 786950e..0000000 --- a/app/views/week_hours/edit.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/app/views/week_hours/edit.html.haml b/app/views/week_hours/edit.html.haml new file mode 100644 index 0000000..c66fabf --- /dev/null +++ b/app/views/week_hours/edit.html.haml @@ -0,0 +1 @@ += render :partial => 'form' diff --git a/app/views/week_hours/index.html.erb b/app/views/week_hours/index.html.erb deleted file mode 100644 index d83398d..0000000 --- a/app/views/week_hours/index.html.erb +++ /dev/null @@ -1,28 +0,0 @@ -

    Week Hours

    - - - - - - - - - - - - <% @week_hours.each do |week_hour| %> - - - - - - - - <% end %> - -
    IDUserWeekHoursActions
    <%= week_hour.id %><%= week_hour.raw_item.user.name %><%= week_hour.week.to_date.to_s(:db) %><%= week_hour.hours %> - <%= link_to 'Edit', edit_week_hour_path(week_hour), :class => 'btn btn-mini' %> - <%= link_to 'Destroy', week_hour_path(week_hour), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' %> -
    - -<%= link_to 'New', new_week_hour_path, :class => 'btn btn-primary' %> diff --git a/app/views/week_hours/index.html.haml b/app/views/week_hours/index.html.haml new file mode 100644 index 0000000..a1a9079 --- /dev/null +++ b/app/views/week_hours/index.html.haml @@ -0,0 +1,20 @@ +%h1 Week Hours +%table.table.table-striped + %thead + %tr + %th ID + %th User + %th Week + %th Hours + %th Actions + %tbody + - @week_hours.each do |week_hour| + %tr + %td= week_hour.id + %td= week_hour.raw_item.user.name + %td= week_hour.week.to_date.to_s(:db) + %td= week_hour.hours + %td + = link_to 'Edit', edit_week_hour_path(week_hour), :class => 'btn btn-mini' + = link_to 'Destroy', week_hour_path(week_hour), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' += link_to 'New', new_week_hour_path, :class => 'btn btn-primary' diff --git a/app/views/week_hours/new.html.erb b/app/views/week_hours/new.html.erb deleted file mode 100644 index 786950e..0000000 --- a/app/views/week_hours/new.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/app/views/week_hours/new.html.haml b/app/views/week_hours/new.html.haml new file mode 100644 index 0000000..c66fabf --- /dev/null +++ b/app/views/week_hours/new.html.haml @@ -0,0 +1 @@ += render :partial => 'form' diff --git a/app/views/week_hours/show.html.erb b/app/views/week_hours/show.html.erb deleted file mode 100644 index c1cd763..0000000 --- a/app/views/week_hours/show.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -

    Week Hour

    - -

    - Raw item
    - <%= @week_hour.raw_item_id %> -

    - -

    - Week
    - <%= @week_hour.week %> -

    - -

    - Hours
    - <%= @week_hour.hours %> -

    - -
    - <%= link_to 'Back', week_hours_path, :class => 'btn' %> - <%= link_to 'Edit', edit_week_hour_path(@week_hour), :class => 'btn' %> - <%= link_to 'Delete', week_hour_path(@week_hour), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger' %> -
    diff --git a/app/views/week_hours/show.html.haml b/app/views/week_hours/show.html.haml new file mode 100644 index 0000000..1a45bbc --- /dev/null +++ b/app/views/week_hours/show.html.haml @@ -0,0 +1,17 @@ +%h1 Week Hour +%p + %b Raw item + %br/ + = @week_hour.raw_item_id +%p + %b Week + %br/ + = @week_hour.week +%p + %b Hours + %br/ + = @week_hour.hours +.form-actions + = link_to 'Back', week_hours_path, :class => 'btn' + = link_to 'Edit', edit_week_hour_path(@week_hour), :class => 'btn' + = link_to 'Delete', week_hour_path(@week_hour), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger'