From 8991d7e2c2ee15f5a50f805ccce9193bb33daad3 Mon Sep 17 00:00:00 2001 From: Felipe de Araujo Date: Wed, 28 Jan 2015 10:09:31 -0300 Subject: [PATCH 1/2] Add haml gem --- Gemfile | 4 ++-- Gemfile.lock | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) 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 From 46f975241e61540b8f5340b50c22af1edd5a1e89 Mon Sep 17 00:00:00 2001 From: Felipe de Araujo Date: Thu, 29 Jan 2015 15:14:34 -0300 Subject: [PATCH 2/2] Convert erb to haml --- app/views/dashboards/_announcements.html.erb | 9 -- app/views/dashboards/_announcements.html.haml | 6 + app/views/dashboards/_faq.html.erb | 33 ---- app/views/dashboards/_faq.html.haml | 16 ++ app/views/dashboards/_my_schedule.html.erb | 27 ---- app/views/dashboards/_my_schedule.html.haml | 17 +++ app/views/dashboards/_projects_chart.html.erb | 22 --- .../dashboards/_projects_chart.html.haml | 15 ++ app/views/dashboards/_pto.html.erb | 20 --- app/views/dashboards/_pto.html.haml | 12 ++ app/views/dashboards/index.html.erb | 60 -------- app/views/dashboards/index.html.haml | 35 +++++ app/views/doc_auths/_form.html.erb | 38 ----- app/views/doc_auths/_form.html.haml | 24 +++ app/views/doc_auths/edit.html.erb | 1 - app/views/doc_auths/edit.html.haml | 1 + app/views/doc_auths/index.html.erb | 31 ---- app/views/doc_auths/index.html.haml | 21 +++ app/views/doc_auths/new.html.erb | 1 - app/views/doc_auths/new.html.haml | 1 + app/views/doc_auths/show.html.erb | 17 --- app/views/doc_auths/show.html.haml | 13 ++ app/views/experiences/_form.html.erb | 37 ----- app/views/experiences/_form.html.haml | 31 ++++ app/views/experiences/edit.html.erb | 6 - app/views/experiences/edit.html.haml | 4 + app/views/experiences/index.html.erb | 31 ---- app/views/experiences/index.html.haml | 23 +++ app/views/experiences/new.html.erb | 5 - app/views/experiences/new.html.haml | 3 + app/views/experiences/show.html.erb | 30 ---- app/views/experiences/show.html.haml | 18 +++ app/views/groups/_form.html.erb | 53 ------- app/views/groups/_form.html.haml | 34 +++++ app/views/groups/edit.html.erb | 1 - app/views/groups/edit.html.haml | 1 + app/views/groups/index.html.erb | 38 ----- app/views/groups/index.html.haml | 24 +++ app/views/groups/new.html.erb | 1 - app/views/groups/new.html.haml | 1 + app/views/groups/show.html.erb | 36 ----- app/views/groups/show.html.haml | 24 +++ app/views/layouts/_feedback.html.erb | 3 - app/views/layouts/_feedback.html.haml | 2 + app/views/layouts/_nav_demo.html.erb | 9 -- app/views/layouts/_nav_demo.html.haml | 5 + app/views/layouts/_nav_dropdown.html.erb | 47 ------ app/views/layouts/_nav_dropdown.html.haml | 25 +++ app/views/layouts/application.html.erb | 83 ---------- app/views/layouts/application.html.haml | 54 +++++++ app/views/leave_requests/_form.html.erb | 51 ------- app/views/leave_requests/_form.html.haml | 37 +++++ .../_leave_request_modal.html.erb | 7 - .../_leave_request_modal.html.haml | 5 + .../_recent_leave_requests.html.erb | 22 --- .../_recent_leave_requests.html.haml | 18 +++ .../_recent_leave_requests_panel.html.erb | 7 - .../_recent_leave_requests_panel.html.haml | 7 + app/views/leave_requests/edit.html.erb | 1 - app/views/leave_requests/edit.html.haml | 1 + app/views/leave_requests/index.html.erb | 16 -- app/views/leave_requests/index.html.haml | 11 ++ app/views/leave_requests/new.html.erb | 1 - app/views/leave_requests/new.html.haml | 1 + app/views/leave_requests/show.html.erb | 1 - app/views/leave_requests/show.html.haml | 1 + app/views/mail_settings/edit.html.erb | 61 -------- app/views/mail_settings/edit.html.haml | 41 +++++ app/views/mailer/_no_schedule.html.erb | 1 - app/views/mailer/_no_schedule.html.haml | 1 + app/views/mailer/_pm_table.html.erb | 23 --- app/views/mailer/_pm_table.html.haml | 17 +++ app/views/mailer/_regular_table.html.erb | 33 ---- app/views/mailer/_regular_table.html.haml | 25 +++ .../project_date_change_notification.html.erb | 18 --- ...project_date_change_notification.html.haml | 12 ++ app/views/mailer/schedule_summary.html.erb | 7 - app/views/mailer/schedule_summary.html.haml | 7 + .../send_leave_request_notification.html.erb | 12 -- .../send_leave_request_notification.html.haml | 13 ++ .../send_pm_changed_notification.html.erb | 4 - .../send_pm_changed_notification.html.haml | 9 ++ ....erb => send_token_notification.html.haml} | 0 app/views/projects/_form.html.erb | 143 ------------------ app/views/projects/_form.html.haml | 96 ++++++++++++ app/views/projects/_milestone_fields.html.erb | 22 --- .../projects/_milestone_fields.html.haml | 14 ++ app/views/projects/edit.html.erb | 6 - app/views/projects/edit.html.haml | 7 + app/views/projects/index.html.erb | 60 -------- app/views/projects/index.html.haml | 53 +++++++ app/views/projects/new.html.erb | 6 - app/views/projects/new.html.haml | 7 + app/views/projects/show.html.erb | 78 ---------- app/views/projects/show.html.haml | 114 ++++++++++++++ app/views/raw_items/_form.html.erb | 52 ------- app/views/raw_items/_form.html.haml | 32 ++++ app/views/raw_items/edit.html.erb | 1 - app/views/raw_items/edit.html.haml | 1 + app/views/raw_items/index.html.erb | 36 ----- app/views/raw_items/index.html.haml | 28 ++++ app/views/raw_items/new.html.erb | 1 - app/views/raw_items/new.html.haml | 1 + app/views/raw_items/show.html.erb | 37 ----- app/views/raw_items/show.html.haml | 29 ++++ app/views/reports/_delivery_chart.html.erb | 48 ------ app/views/reports/_delivery_chart.html.haml | 31 ++++ app/views/reports/_filter.html.erb | 36 ----- app/views/reports/_filter.html.haml | 24 +++ app/views/reports/_project_popover.html.erb | 29 ---- app/views/reports/_project_popover.html.haml | 19 +++ app/views/reports/_projects_table.html.erb | 31 ++-- app/views/reports/_user_popover.html.erb | 25 --- app/views/reports/_user_popover.html.haml | 15 ++ app/views/reports/index.html.erb | 52 ++++--- app/views/schedules/_form.html.erb | 54 ------- app/views/schedules/_form.html.haml | 40 +++++ app/views/schedules/_index_actions.html.erb | 26 ---- app/views/schedules/_index_actions.html.haml | 13 ++ app/views/schedules/edit.html.erb | 2 - app/views/schedules/edit.html.haml | 2 + app/views/schedules/new.html.erb | 1 - app/views/schedules/new.html.haml | 1 + app/views/schedules/show.html.erb | 37 ----- app/views/schedules/show.html.haml | 29 ++++ .../sessions/{new.html.erb => new.html.haml} | 0 app/views/settings/app_settings/edit.html.erb | 29 ---- .../settings/app_settings/edit.html.haml | 18 +++ app/views/settings/confluence/edit.html.erb | 50 ------ app/views/settings/confluence/edit.html.haml | 30 ++++ app/views/settings/google/edit.html.erb | 22 --- app/views/settings/google/edit.html.haml | 14 ++ app/views/settings/harvest/edit.html.erb | 39 ----- app/views/settings/harvest/edit.html.haml | 26 ++++ app/views/settings/index.html.erb | 7 - app/views/settings/index.html.haml | 6 + .../settings/mail_settings/edit.html.erb | 46 ------ .../settings/mail_settings/edit.html.haml | 30 ++++ app/views/settings/setup.html.erb | 54 ------- app/views/settings/setup.html.haml | 34 +++++ app/views/skills/_form.html.erb | 20 --- app/views/skills/_form.html.haml | 13 ++ app/views/skills/edit.html.erb | 6 - app/views/skills/edit.html.haml | 6 + app/views/skills/index.html.erb | 58 ------- app/views/skills/index.html.haml | 39 +++++ app/views/skills/new.html.erb | 6 - app/views/skills/new.html.haml | 6 + app/views/skills/show.html.erb | 43 ------ app/views/skills/show.html.haml | 35 +++++ app/views/users/_form.html.erb | 47 ------ app/views/users/_form.html.haml | 29 ++++ app/views/users/edit.html.erb | 47 ------ app/views/users/edit.html.haml | 28 ++++ app/views/users/index.html.erb | 53 ------- app/views/users/index.html.haml | 30 ++++ app/views/users/new.html.erb | 1 - app/views/users/new.html.haml | 1 + app/views/users/show.html.erb | 44 ------ app/views/users/show.html.haml | 34 +++++ app/views/users/skills.html.erb | 32 ---- app/views/users/skills.html.haml | 19 +++ app/views/week_hours/_form.html.erb | 31 ---- app/views/week_hours/_form.html.haml | 20 +++ app/views/week_hours/edit.html.erb | 1 - app/views/week_hours/edit.html.haml | 1 + app/views/week_hours/index.html.erb | 28 ---- app/views/week_hours/index.html.haml | 20 +++ app/views/week_hours/new.html.erb | 1 - app/views/week_hours/new.html.haml | 1 + app/views/week_hours/show.html.erb | 22 --- app/views/week_hours/show.html.haml | 17 +++ 172 files changed, 1678 insertions(+), 2325 deletions(-) delete mode 100644 app/views/dashboards/_announcements.html.erb create mode 100644 app/views/dashboards/_announcements.html.haml delete mode 100644 app/views/dashboards/_faq.html.erb create mode 100644 app/views/dashboards/_faq.html.haml delete mode 100644 app/views/dashboards/_my_schedule.html.erb create mode 100644 app/views/dashboards/_my_schedule.html.haml delete mode 100644 app/views/dashboards/_projects_chart.html.erb create mode 100644 app/views/dashboards/_projects_chart.html.haml delete mode 100644 app/views/dashboards/_pto.html.erb create mode 100644 app/views/dashboards/_pto.html.haml delete mode 100644 app/views/dashboards/index.html.erb create mode 100644 app/views/dashboards/index.html.haml delete mode 100644 app/views/doc_auths/_form.html.erb create mode 100644 app/views/doc_auths/_form.html.haml delete mode 100644 app/views/doc_auths/edit.html.erb create mode 100644 app/views/doc_auths/edit.html.haml delete mode 100644 app/views/doc_auths/index.html.erb create mode 100644 app/views/doc_auths/index.html.haml delete mode 100644 app/views/doc_auths/new.html.erb create mode 100644 app/views/doc_auths/new.html.haml delete mode 100644 app/views/doc_auths/show.html.erb create mode 100644 app/views/doc_auths/show.html.haml delete mode 100644 app/views/experiences/_form.html.erb create mode 100644 app/views/experiences/_form.html.haml delete mode 100644 app/views/experiences/edit.html.erb create mode 100644 app/views/experiences/edit.html.haml delete mode 100644 app/views/experiences/index.html.erb create mode 100644 app/views/experiences/index.html.haml delete mode 100644 app/views/experiences/new.html.erb create mode 100644 app/views/experiences/new.html.haml delete mode 100644 app/views/experiences/show.html.erb create mode 100644 app/views/experiences/show.html.haml delete mode 100644 app/views/groups/_form.html.erb create mode 100644 app/views/groups/_form.html.haml delete mode 100644 app/views/groups/edit.html.erb create mode 100644 app/views/groups/edit.html.haml delete mode 100644 app/views/groups/index.html.erb create mode 100644 app/views/groups/index.html.haml delete mode 100644 app/views/groups/new.html.erb create mode 100644 app/views/groups/new.html.haml delete mode 100644 app/views/groups/show.html.erb create mode 100644 app/views/groups/show.html.haml delete mode 100644 app/views/layouts/_feedback.html.erb create mode 100644 app/views/layouts/_feedback.html.haml delete mode 100644 app/views/layouts/_nav_demo.html.erb create mode 100644 app/views/layouts/_nav_demo.html.haml delete mode 100644 app/views/layouts/_nav_dropdown.html.erb create mode 100644 app/views/layouts/_nav_dropdown.html.haml delete mode 100644 app/views/layouts/application.html.erb create mode 100644 app/views/layouts/application.html.haml delete mode 100644 app/views/leave_requests/_form.html.erb create mode 100644 app/views/leave_requests/_form.html.haml delete mode 100644 app/views/leave_requests/_leave_request_modal.html.erb create mode 100644 app/views/leave_requests/_leave_request_modal.html.haml delete mode 100644 app/views/leave_requests/_recent_leave_requests.html.erb create mode 100644 app/views/leave_requests/_recent_leave_requests.html.haml delete mode 100644 app/views/leave_requests/_recent_leave_requests_panel.html.erb create mode 100644 app/views/leave_requests/_recent_leave_requests_panel.html.haml delete mode 100644 app/views/leave_requests/edit.html.erb create mode 100644 app/views/leave_requests/edit.html.haml delete mode 100644 app/views/leave_requests/index.html.erb create mode 100644 app/views/leave_requests/index.html.haml delete mode 100644 app/views/leave_requests/new.html.erb create mode 100644 app/views/leave_requests/new.html.haml delete mode 100644 app/views/leave_requests/show.html.erb create mode 100644 app/views/leave_requests/show.html.haml delete mode 100644 app/views/mail_settings/edit.html.erb create mode 100644 app/views/mail_settings/edit.html.haml delete mode 100644 app/views/mailer/_no_schedule.html.erb create mode 100644 app/views/mailer/_no_schedule.html.haml delete mode 100644 app/views/mailer/_pm_table.html.erb create mode 100644 app/views/mailer/_pm_table.html.haml delete mode 100644 app/views/mailer/_regular_table.html.erb create mode 100644 app/views/mailer/_regular_table.html.haml delete mode 100644 app/views/mailer/project_date_change_notification.html.erb create mode 100644 app/views/mailer/project_date_change_notification.html.haml delete mode 100644 app/views/mailer/schedule_summary.html.erb create mode 100644 app/views/mailer/schedule_summary.html.haml delete mode 100644 app/views/mailer/send_leave_request_notification.html.erb create mode 100644 app/views/mailer/send_leave_request_notification.html.haml delete mode 100644 app/views/mailer/send_pm_changed_notification.html.erb create mode 100644 app/views/mailer/send_pm_changed_notification.html.haml rename app/views/mailer/{send_token_notification.html.erb => send_token_notification.html.haml} (100%) delete mode 100644 app/views/projects/_form.html.erb create mode 100644 app/views/projects/_form.html.haml delete mode 100644 app/views/projects/_milestone_fields.html.erb create mode 100644 app/views/projects/_milestone_fields.html.haml delete mode 100644 app/views/projects/edit.html.erb create mode 100644 app/views/projects/edit.html.haml delete mode 100644 app/views/projects/index.html.erb create mode 100644 app/views/projects/index.html.haml delete mode 100644 app/views/projects/new.html.erb create mode 100644 app/views/projects/new.html.haml delete mode 100644 app/views/projects/show.html.erb create mode 100644 app/views/projects/show.html.haml delete mode 100644 app/views/raw_items/_form.html.erb create mode 100644 app/views/raw_items/_form.html.haml delete mode 100644 app/views/raw_items/edit.html.erb create mode 100644 app/views/raw_items/edit.html.haml delete mode 100644 app/views/raw_items/index.html.erb create mode 100644 app/views/raw_items/index.html.haml delete mode 100644 app/views/raw_items/new.html.erb create mode 100644 app/views/raw_items/new.html.haml delete mode 100644 app/views/raw_items/show.html.erb create mode 100644 app/views/raw_items/show.html.haml delete mode 100644 app/views/reports/_delivery_chart.html.erb create mode 100644 app/views/reports/_delivery_chart.html.haml delete mode 100644 app/views/reports/_filter.html.erb create mode 100644 app/views/reports/_filter.html.haml delete mode 100644 app/views/reports/_project_popover.html.erb create mode 100644 app/views/reports/_project_popover.html.haml delete mode 100644 app/views/reports/_user_popover.html.erb create mode 100644 app/views/reports/_user_popover.html.haml delete mode 100644 app/views/schedules/_form.html.erb create mode 100644 app/views/schedules/_form.html.haml delete mode 100644 app/views/schedules/_index_actions.html.erb create mode 100644 app/views/schedules/_index_actions.html.haml delete mode 100644 app/views/schedules/edit.html.erb create mode 100644 app/views/schedules/edit.html.haml delete mode 100644 app/views/schedules/new.html.erb create mode 100644 app/views/schedules/new.html.haml delete mode 100644 app/views/schedules/show.html.erb create mode 100644 app/views/schedules/show.html.haml rename app/views/sessions/{new.html.erb => new.html.haml} (100%) delete mode 100644 app/views/settings/app_settings/edit.html.erb create mode 100644 app/views/settings/app_settings/edit.html.haml delete mode 100644 app/views/settings/confluence/edit.html.erb create mode 100644 app/views/settings/confluence/edit.html.haml delete mode 100644 app/views/settings/google/edit.html.erb create mode 100644 app/views/settings/google/edit.html.haml delete mode 100644 app/views/settings/harvest/edit.html.erb create mode 100644 app/views/settings/harvest/edit.html.haml delete mode 100644 app/views/settings/index.html.erb create mode 100644 app/views/settings/index.html.haml delete mode 100644 app/views/settings/mail_settings/edit.html.erb create mode 100644 app/views/settings/mail_settings/edit.html.haml delete mode 100644 app/views/settings/setup.html.erb create mode 100644 app/views/settings/setup.html.haml delete mode 100644 app/views/skills/_form.html.erb create mode 100644 app/views/skills/_form.html.haml delete mode 100644 app/views/skills/edit.html.erb create mode 100644 app/views/skills/edit.html.haml delete mode 100644 app/views/skills/index.html.erb create mode 100644 app/views/skills/index.html.haml delete mode 100644 app/views/skills/new.html.erb create mode 100644 app/views/skills/new.html.haml delete mode 100644 app/views/skills/show.html.erb create mode 100644 app/views/skills/show.html.haml delete mode 100644 app/views/users/_form.html.erb create mode 100644 app/views/users/_form.html.haml delete mode 100644 app/views/users/edit.html.erb create mode 100644 app/views/users/edit.html.haml delete mode 100644 app/views/users/index.html.erb create mode 100644 app/views/users/index.html.haml delete mode 100644 app/views/users/new.html.erb create mode 100644 app/views/users/new.html.haml delete mode 100644 app/views/users/show.html.erb create mode 100644 app/views/users/show.html.haml delete mode 100644 app/views/users/skills.html.erb create mode 100644 app/views/users/skills.html.haml delete mode 100644 app/views/week_hours/_form.html.erb create mode 100644 app/views/week_hours/_form.html.haml delete mode 100644 app/views/week_hours/edit.html.erb create mode 100644 app/views/week_hours/edit.html.haml delete mode 100644 app/views/week_hours/index.html.erb create mode 100644 app/views/week_hours/index.html.haml delete mode 100644 app/views/week_hours/new.html.erb create mode 100644 app/views/week_hours/new.html.haml delete mode 100644 app/views/week_hours/show.html.erb create mode 100644 app/views/week_hours/show.html.haml 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:

- -
    - <% @experience.errors.full_messages.each do |msg| %> -
  • <%= msg %>
  • - <% end %> -
-
- <% 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:

    -
      - <% leave_request.errors.full_messages.each do |msg| %> -
    • <%= msg %>
    • - <% end -%> -
    -
    - <% 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? %> -
      -<% if leave_requests.present? %> -<% leave_requests.each do |leave_request| %> -
    • - <% if show_name %> - <%= leave_request.user.name %>: - <% end %> - <%= leave_request_date(leave_request) %> - <%= leave_request.reason_for_leaving %> - - - <%= leave_request_status(leave_request) %> - - - -
    • -<% end %> -<% else %> -
    • You have no leave requests!
    • -<% end %> -
        diff --git a/app/views/leave_requests/_recent_leave_requests.html.haml b/app/views/leave_requests/_recent_leave_requests.html.haml new file mode 100644 index 0000000..0d97a7b --- /dev/null +++ b/app/views/leave_requests/_recent_leave_requests.html.haml @@ -0,0 +1,18 @@ +- show_name = false if local_assigns[:show_name].nil? +%ul.leave + - if leave_requests.present? + - leave_requests.each do |leave_request| + %li + - if show_name + %strong + = leave_request.user.name + \: + %strong= leave_request_date(leave_request) + = leave_request.reason_for_leaving + %a{:href => edit_leave_request_url(leave_request)} + %span{:class => leave_request_class(leave_request)} + = leave_request_status(leave_request) + %span{:class => "glyphicon #{leave_request_glyph(leave_request)}"} + - else + %li You have no leave requests! + %ul diff --git a/app/views/leave_requests/_recent_leave_requests_panel.html.erb b/app/views/leave_requests/_recent_leave_requests_panel.html.erb deleted file mode 100644 index 6ed7c30..0000000 --- a/app/views/leave_requests/_recent_leave_requests_panel.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -
        -

        Take a load off, <%= current_user.first_name %>.

        - <%= link_to 'Submit leave request', '#leaveRequestModal', { class: 'btn btn-primary btn-lg active', role: 'button', data: { toggle:'modal' } } %> - <%= render 'leave_requests/recent_leave_requests', { - leave_requests: current_user.leave_requests.recent, - show_name: false } %> -
        diff --git a/app/views/leave_requests/_recent_leave_requests_panel.html.haml b/app/views/leave_requests/_recent_leave_requests_panel.html.haml new file mode 100644 index 0000000..2610439 --- /dev/null +++ b/app/views/leave_requests/_recent_leave_requests_panel.html.haml @@ -0,0 +1,7 @@ +.vis-mod.leave + %h3 + Take a load off, #{current_user.first_name}. + = link_to 'Submit leave request', '#leaveRequestModal', { class: 'btn btn-primary btn-lg active', role: 'button', data: { toggle:'modal' } } + = render 'leave_requests/recent_leave_requests', { | + leave_requests: current_user.leave_requests.recent, | + show_name: false } | diff --git a/app/views/leave_requests/edit.html.erb b/app/views/leave_requests/edit.html.erb deleted file mode 100644 index d615fda..0000000 --- a/app/views/leave_requests/edit.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render partial: "form", locals: {leave_request: @leave_request} %> diff --git a/app/views/leave_requests/edit.html.haml b/app/views/leave_requests/edit.html.haml new file mode 100644 index 0000000..e8374bf --- /dev/null +++ b/app/views/leave_requests/edit.html.haml @@ -0,0 +1 @@ += render partial: "form", locals: {leave_request: @leave_request} diff --git a/app/views/leave_requests/index.html.erb b/app/views/leave_requests/index.html.erb deleted file mode 100644 index c2b45d6..0000000 --- a/app/views/leave_requests/index.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -
        -

        <%= link_to 'Create new leave request', new_leave_request_url %>

        - - <% if @pending_leave_requests.present? %> -

        Pending Leave Requests

        - <%= render 'recent_leave_requests', { - leave_requests: @pending_leave_requests, - show_name: can?(:manage, LeaveRequest) } %> - <% end %> - - <% if @recent_leave_requests.present? %> -

        Recent Leave Requests

        - <%= render 'recent_leave_requests', { - leave_requests: @recent_leave_requests } %> - <% end %> -
        diff --git a/app/views/leave_requests/index.html.haml b/app/views/leave_requests/index.html.haml new file mode 100644 index 0000000..2a922d9 --- /dev/null +++ b/app/views/leave_requests/index.html.haml @@ -0,0 +1,11 @@ +.vis-mod.leave + %p= link_to 'Create new leave request', new_leave_request_url + - if @pending_leave_requests.present? + %h3 Pending Leave Requests + = render 'recent_leave_requests', { | + leave_requests: @pending_leave_requests, | + show_name: can?(:manage, LeaveRequest) } | + - if @recent_leave_requests.present? + %h3 Recent Leave Requests + = render 'recent_leave_requests', { | + leave_requests: @recent_leave_requests } | diff --git a/app/views/leave_requests/new.html.erb b/app/views/leave_requests/new.html.erb deleted file mode 100644 index 4e8194b..0000000 --- a/app/views/leave_requests/new.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render "form", leave_request: @leave_request %> diff --git a/app/views/leave_requests/new.html.haml b/app/views/leave_requests/new.html.haml new file mode 100644 index 0000000..f355868 --- /dev/null +++ b/app/views/leave_requests/new.html.haml @@ -0,0 +1 @@ += render "form", leave_request: @leave_request diff --git a/app/views/leave_requests/show.html.erb b/app/views/leave_requests/show.html.erb deleted file mode 100644 index 0e96b4c..0000000 --- a/app/views/leave_requests/show.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= @leave_request.inspect %> diff --git a/app/views/leave_requests/show.html.haml b/app/views/leave_requests/show.html.haml new file mode 100644 index 0000000..9e47c3c --- /dev/null +++ b/app/views/leave_requests/show.html.haml @@ -0,0 +1 @@ += @leave_request.inspect diff --git a/app/views/mail_settings/edit.html.erb b/app/views/mail_settings/edit.html.erb deleted file mode 100644 index ff63ed2..0000000 --- a/app/views/mail_settings/edit.html.erb +++ /dev/null @@ -1,61 +0,0 @@ -<%= link_to "<< Back to Settings", settings_path %> -<%= form_tag mail_settings_path, :method => :put, :html => { :class => 'form-horizontal' } do %> -
        - East's Schedule Message Configuration -
        - <%= label_tag 'From', nil, :class => 'control-label' %> -
        - <%= select_tag 'settings[east_from]', options_for_select(@users_for_select, AppSettings.east_from), :prompt => 'Select From', :style => "width:385px;", :class => 'text_field chzn-select' %> -
        -
        -
        - <%= label_tag 'CC', nil, :class => 'control-label' %> -
        - <%= select_tag "settings[east_cc]", options_for_select(@users_for_select, AppSettings.east_cc), :multiple => true, :prompt => 'Select Some People', :style => "width:385px;", :class => 'text_field chzn-select' %> -
        -
        -
        - <%= label_tag "Message", nil, :class => 'control-label' %> -
        - <%= text_area_tag "settings[east_message]", AppSettings.east_message, :class => 'text_area', :style => "width:385px;height:200px;" %> -
        -
        -
        - <%= label_tag "Ending Content", nil, :class => 'control-label' %> -
        - <%= text_area_tag "settings[east_ending_content]", AppSettings.east_ending_content, :class => 'text_area', :style => "width:385px;height:200px;" %> -
        -
        -
        -
        - West's Schedule Message Configuration -
        - <%= label_tag 'From', nil, :class => 'control-label' %> -
        - <%= select_tag 'settings[west_from]', options_for_select(@users_for_select, AppSettings.west_from), :prompt => 'Select From', :style => "width:385px;", :class => 'text_field chzn-select' %> -
        -
        -
        - <%= label_tag 'CC', nil, :class => 'control-label' %> -
        - <%= select_tag "settings[west_cc]", options_for_select(@users_for_select, AppSettings.west_cc), :multiple => true, :prompt => 'Select Some People', :style => "width:385px;", :class => 'text_field chzn-select' %> -
        -
        -
        - <%= label_tag "Message", nil, :class => 'control-label' %> -
        - <%= text_area_tag "settings[west_message]", AppSettings.west_message, :class => 'text_area', :style => "width:385px;height:200px;" %> -
        -
        -
        - <%= label_tag "Ending Content", nil, :class => 'control-label' %> -
        - <%= text_area_tag "settings[west_ending_content]", AppSettings.west_ending_content, :class => 'text_area', :style => "width:385px;height:200px;" %> -
        -
        -
        -
        - <%= submit_tag "Save Mail Settings", :class => 'btn btn-primary' %> - <%= link_to 'Cancel', edit_settings_mail_settings_path, :class => 'btn' %> -
        -<% end %> diff --git a/app/views/mail_settings/edit.html.haml b/app/views/mail_settings/edit.html.haml new file mode 100644 index 0000000..8f010ab --- /dev/null +++ b/app/views/mail_settings/edit.html.haml @@ -0,0 +1,41 @@ += link_to "<< Back to Settings", settings_path += form_tag mail_settings_path, :method => :put, :html => { :class => 'form-horizontal' } do + %fieldset{:style => "width:500px;float:right;"} + %legend East's Schedule Message Configuration + .control-group + = label_tag 'From', nil, :class => 'control-label' + .controls + = select_tag 'settings[east_from]', options_for_select(@users_for_select, AppSettings.east_from), :prompt => 'Select From', :style => "width:385px;", :class => 'text_field chzn-select' + .control-group + = label_tag 'CC', nil, :class => 'control-label' + .controls + = select_tag "settings[east_cc]", options_for_select(@users_for_select, AppSettings.east_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 + = text_area_tag "settings[east_message]", AppSettings.east_message, :class => 'text_area', :style => "width:385px;height:200px;" + .control-group + = label_tag "Ending Content", nil, :class => 'control-label' + .controls + = text_area_tag "settings[east_ending_content]", AppSettings.east_ending_content, :class => 'text_area', :style => "width:385px;height:200px;" + %fieldset{:style => "width:500px;"} + %legend West's Schedule Message Configuration + .control-group + = label_tag 'From', nil, :class => 'control-label' + .controls + = select_tag 'settings[west_from]', options_for_select(@users_for_select, AppSettings.west_from), :prompt => 'Select From', :style => "width:385px;", :class => 'text_field chzn-select' + .control-group + = label_tag 'CC', nil, :class => 'control-label' + .controls + = select_tag "settings[west_cc]", options_for_select(@users_for_select, AppSettings.west_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 + = text_area_tag "settings[west_message]", AppSettings.west_message, :class => 'text_area', :style => "width:385px;height:200px;" + .control-group + = label_tag "Ending Content", nil, :class => 'control-label' + .controls + = text_area_tag "settings[west_ending_content]", AppSettings.west_ending_content, :class => 'text_area', :style => "width:385px;height:200px;" + .form-actions + = submit_tag "Save Mail Settings", :class => 'btn btn-primary' + = link_to 'Cancel', edit_settings_mail_settings_path, :class => 'btn' diff --git a/app/views/mailer/_no_schedule.html.erb b/app/views/mailer/_no_schedule.html.erb deleted file mode 100644 index d3cc1b3..0000000 --- a/app/views/mailer/_no_schedule.html.erb +++ /dev/null @@ -1 +0,0 @@ -No schedule this week. diff --git a/app/views/mailer/_no_schedule.html.haml b/app/views/mailer/_no_schedule.html.haml new file mode 100644 index 0000000..1cc88bf --- /dev/null +++ b/app/views/mailer/_no_schedule.html.haml @@ -0,0 +1 @@ +%em No schedule this week. diff --git a/app/views/mailer/_pm_table.html.erb b/app/views/mailer/_pm_table.html.erb deleted file mode 100644 index 3d1c8be..0000000 --- a/app/views/mailer/_pm_table.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% border = '1' %> -<% bgcolor = 'white' %> - - - - - - - <%= schedule_hours_cells(builder.hours_headers, bgcolor) %> - - - <% last_client = last_project = nil %> - <% builder.summary(:pm)[:raw_items].each_with_index do |item, i| %> - - - - - <%= schedule_hours_cells(builder.summary(:pm)[:hours][i], bgcolor) %> - <% last_client = item.client %> - <% last_project = item.project %> - - <% end %> -
        ClientProjectEngineer
        <%= item.client if item.client != last_client %><%= item.project if item.project != last_project %><%= item.user_name %>
        diff --git a/app/views/mailer/_pm_table.html.haml b/app/views/mailer/_pm_table.html.haml new file mode 100644 index 0000000..9761fb4 --- /dev/null +++ b/app/views/mailer/_pm_table.html.haml @@ -0,0 +1,17 @@ +- border = '1' +- bgcolor = 'white' +%table{:border => border, :cellpadding => "3", :cellspacing => "0"} + %tr + %td{:align => "center", :bgcolor => bgcolor} Client + %td{:align => "center", :bgcolor => bgcolor} Project + %td{:align => "center", :bgcolor => bgcolor} Engineer + = schedule_hours_cells(builder.hours_headers, bgcolor) + - last_client = last_project = nil + - builder.summary(:pm)[:raw_items].each_with_index do |item, i| + %tr + %td{:bgcolor => bgcolor}= item.client if item.client != last_client + %td{:bgcolor => bgcolor}= item.project if item.project != last_project + %td{:bgcolor => bgcolor}= item.user_name + = schedule_hours_cells(builder.summary(:pm)[:hours][i], bgcolor) + - last_client = item.client + - last_project = item.project diff --git a/app/views/mailer/_regular_table.html.erb b/app/views/mailer/_regular_table.html.erb deleted file mode 100644 index f2797f8..0000000 --- a/app/views/mailer/_regular_table.html.erb +++ /dev/null @@ -1,33 +0,0 @@ -<% border = '1' %> -<% bgcolor = 'white' %> - -<% if builder.schedule.daily_schedule.present? %> -

        - <% builder.schedule.daily_schedule.each do |i, name, project_hours| %> - <%= name %>: <%= project_hours_summary(project_hours) %>
        - <% end %> -

        -<% end %> - - - - - - - <%= schedule_hours_cells(builder.hours_headers, bgcolor) %> - - - <% builder.summary(:regular)[:raw_items].each_with_index do |item, i| %> - - - - - <%= schedule_hours_cells(builder.summary(:regular)[:hours][i], bgcolor) %> - - <% end %> - - - - <%= schedule_hours_cells(builder.summary(:regular)[:totals], bgcolor) %> - -
        ClientProjectPM
        <%= item.client %><%= item.project %><%= item.linked_project.project_manager %>
        Total Hours
        diff --git a/app/views/mailer/_regular_table.html.haml b/app/views/mailer/_regular_table.html.haml new file mode 100644 index 0000000..b09b208 --- /dev/null +++ b/app/views/mailer/_regular_table.html.haml @@ -0,0 +1,25 @@ +- border = '1' +- bgcolor = 'white' +- if builder.schedule.daily_schedule.present? + %p + - builder.schedule.daily_schedule.each do |i, name, project_hours| + %strong + = name + \: + = project_hours_summary(project_hours) + %br/ +%table{:border => border, :cellpadding => "3", :cellspacing => "0"} + %tr + %td{:align => "center", :bgcolor => bgcolor} Client + %td{:align => "center", :bgcolor => bgcolor} Project + %td{:align => "center", :bgcolor => bgcolor} PM + = schedule_hours_cells(builder.hours_headers, bgcolor) + - builder.summary(:regular)[:raw_items].each_with_index do |item, i| + %tr + %td{:bgcolor => bgcolor}= item.client + %td{:bgcolor => bgcolor}= item.project + %td{:bgcolor => bgcolor}= item.linked_project.project_manager + = schedule_hours_cells(builder.summary(:regular)[:hours][i], bgcolor) + %tr + %td{:align => "center", :bgcolor => bgcolor, :colspan => "3"} Total Hours + = schedule_hours_cells(builder.summary(:regular)[:totals], bgcolor) diff --git a/app/views/mailer/project_date_change_notification.html.erb b/app/views/mailer/project_date_change_notification.html.erb deleted file mode 100644 index 0dd8159..0000000 --- a/app/views/mailer/project_date_change_notification.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -

        - Hi <%= @pm.name %>, -

        - -

        - The target date of following projects has been changed in last 24 hours: -

        - -<% @changesets.each do |project, changesets| %> -
        - <%= pluralize(changesets.size, 'change') %> on <%= link_to "#{project.client} - #{project.name}", edit_project_url(project) %> target date: -
          - <% changesets.each do |changeset| %> -
        • from <%= changeset['date_target'].first %> to <%= changeset['date_target'].last %>
        • - <% end %> -
        -
        -<% end %> diff --git a/app/views/mailer/project_date_change_notification.html.haml b/app/views/mailer/project_date_change_notification.html.haml new file mode 100644 index 0000000..0b017ac --- /dev/null +++ b/app/views/mailer/project_date_change_notification.html.haml @@ -0,0 +1,12 @@ +%p + Hi #{@pm.name}, +%p + The target date of following projects has been changed in last 24 hours: +- @changesets.each do |project, changesets| + %div{:style => "margin-top: 20px; padding: 10px; border: 1px solid #ccc;"} + = pluralize(changesets.size, 'change') + on #{link_to "#{project.client} - #{project.name}", edit_project_url(project)} target date: + %ul + - changesets.each do |changeset| + %li + from #{changeset['date_target'].first} to #{changeset['date_target'].last} diff --git a/app/views/mailer/schedule_summary.html.erb b/app/views/mailer/schedule_summary.html.erb deleted file mode 100644 index 464715c..0000000 --- a/app/views/mailer/schedule_summary.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -Hi <%= @builder.greeting_name %>, -
        -
        -<%= @builder.message_in_html %> -<%= render_summary_table(@builder) %> -
        -<%= @builder.ending_content_in_html %> diff --git a/app/views/mailer/schedule_summary.html.haml b/app/views/mailer/schedule_summary.html.haml new file mode 100644 index 0000000..2b9b5ee --- /dev/null +++ b/app/views/mailer/schedule_summary.html.haml @@ -0,0 +1,7 @@ +Hi #{@builder.greeting_name}, +%br/ +%br/ += @builder.message_in_html += render_summary_table(@builder) +%br/ += @builder.ending_content_in_html diff --git a/app/views/mailer/send_leave_request_notification.html.erb b/app/views/mailer/send_leave_request_notification.html.erb deleted file mode 100644 index 1447312..0000000 --- a/app/views/mailer/send_leave_request_notification.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -Hi <%= @leave_request.user.first_name %>, -
        -
        -Your leave request has been <%= @status %> -<% if !@leave_request.approved? %> - Please contact <%= @leave_request.approver.first_name %> if you have any questions. -<% end %> -
        -
        -Reason: <%= @leave_request.reason_for_leaving %>
        -Start Date: <%= @leave_request.formatted_start_date %>
        -End Date: <%= @leave_request.formatted_end_date %> diff --git a/app/views/mailer/send_leave_request_notification.html.haml b/app/views/mailer/send_leave_request_notification.html.haml new file mode 100644 index 0000000..e4f30a4 --- /dev/null +++ b/app/views/mailer/send_leave_request_notification.html.haml @@ -0,0 +1,13 @@ +Hi #{@leave_request.user.first_name}, +%br/ +%br/ +Your leave request has been #{@status} +- if !@leave_request.approved? + Please contact #{@leave_request.approver.first_name} if you have any questions. +%br/ +%br/ +Reason: #{@leave_request.reason_for_leaving} +%br/ +Start Date: #{@leave_request.formatted_start_date} +%br/ +End Date: #{@leave_request.formatted_end_date} diff --git a/app/views/mailer/send_pm_changed_notification.html.erb b/app/views/mailer/send_pm_changed_notification.html.erb deleted file mode 100644 index 982c4b0..0000000 --- a/app/views/mailer/send_pm_changed_notification.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -Hi Patti, -
        -
        -The PM in project <%= @project.name %> is changed from <%= @project.project_manager %> to <%= @new_project_manager %> diff --git a/app/views/mailer/send_pm_changed_notification.html.haml b/app/views/mailer/send_pm_changed_notification.html.haml new file mode 100644 index 0000000..b95c836 --- /dev/null +++ b/app/views/mailer/send_pm_changed_notification.html.haml @@ -0,0 +1,9 @@ +Hi Patti, +%br/ +%br/ +The PM in project +%b= @project.name +is changed from +%b= @project.project_manager +to +%b= @new_project_manager diff --git a/app/views/mailer/send_token_notification.html.erb b/app/views/mailer/send_token_notification.html.haml similarity index 100% rename from app/views/mailer/send_token_notification.html.erb rename to app/views/mailer/send_token_notification.html.haml diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb deleted file mode 100644 index 85c6d35..0000000 --- a/app/views/projects/_form.html.erb +++ /dev/null @@ -1,143 +0,0 @@ -<%= form_for setup_project(@project), :html => { :class => 'form-horizontal projects' } do |f| %> -
        - <%= f.label :client, :class => 'control-label' %> -
        - <%= f.text_field :client, :class => 'text_field' %> -
        -
        -
        - <%= f.label :name, :class => 'control-label' %> -
        - <%= f.text_field :name, :class => 'text_field' %> -
        -
        -
        - <%= f.label :project_manager, :class => 'control-label' %> -
        - <%= f.select :project_manager, options_for_select(@project_managers, selected: @project.project_manager), include_blank: true, size: 3, class: "span1" %> -
        -
        -
        - <%= f.label :date_signed, :class => 'control-label' %> -
        - <%= f.date_select :date_signed, :class => 'date_select' %> -
        -
        -
        - <%= f.label :date_kickoff, :class => 'control-label' %> -
        - <%= f.date_select :date_kickoff, :class => 'date_select' %> -
        -
        -
        - <%= f.label :date_target, :class => 'control-label' %> -
        - <%= f.date_select :date_target, :class => 'date_select' %> -
        -
        -
        - <%= f.label :is_confirmed, :class => 'control-label' %> -
        - <%= f.check_box :is_confirmed, :class => 'check_box' %> - <% if @project.is_confirmed? %> - <%= confirmed_info(@project) %> - <% end %> -
        -
        -
        - <%= f.label :date_delivered, :class => 'control-label' %> -
        - <%= f.date_select :date_delivered, :class => 'date_select' %> -
        -
        -
        - <%= f.label :is_delivered, :class => 'control-label' %> -
        - <%= f.check_box :is_delivered, :class => 'check_box' %> -
        -
        -
        - <%= f.label :status, :class => 'control-label' %> -
        - <%#= f.text_field :status, :class => 'text_field' %> - <%= f.select :status, options_for_select(["green", "yellow", "red", "pipeline"], selected: f.object.status), include_blank: true, size: 3, class: "span1" %> -
        -
        -
        - <%= f.label "% Complete", :class => 'control-label' %> -
        - <%= f.text_field :percent_complete, :class => 'text_field' %> - ex. 0.90 -
        -
        -
        - <%= f.label "Bug Tracker", :class => 'control-label' %> -
        - <%= f.text_field :url_pmtool, :class => 'text_field' %> - ex. http://company.atlassian.com/browse/PROJ -
        -
        -
        - <%= f.label "Demo", :class => 'control-label' %> -
        - <%= f.text_field :url_demo, :class => 'text_field' %> - ex. http://awesome.herokuapp.com -
        -
        -
        - <%= f.label :hours_budget, :class => 'control-label' %> -
        - <%= f.text_field :hours_budget, :class => 'text_field' %> -
        -
        -
        - <%= f.label :hours_used, :class => 'control-label' %> -
        - <%= f.text_field :hours_used, :class => 'text_field' %> -
        -
        -
        - <%= f.label :rate, :class => 'control-label' %> -
        - <%= f.text_field :rate, :class => 'text_field' %> -
        -
        -
        - <%= f.label :comment, :class => 'control-label' %> -
        - <%= f.text_area :comment, :class => 'text_area span4', :rows => 5 %> - Supports Markdown -
        -
        - - - -

        Skills

        -
        - - <%= f.fields_for :required_skills 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.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 t('.cancel', :default => t("helpers.links.cancel")), - projects_path, :class => 'btn' %> -
        -<% end %> diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml new file mode 100644 index 0000000..42c9a32 --- /dev/null +++ b/app/views/projects/_form.html.haml @@ -0,0 +1,96 @@ += form_for setup_project(@project), :html => { :class => 'form-horizontal projects' } do |f| + .control-group + = f.label :client, :class => 'control-label' + .controls + = f.text_field :client, :class => 'text_field' + .control-group + = f.label :name, :class => 'control-label' + .controls + = f.text_field :name, :class => 'text_field' + .control-group + = f.label :project_manager, :class => 'control-label' + .controls + = f.select :project_manager, options_for_select(@project_managers, selected: @project.project_manager), include_blank: true, size: 3, class: "span1" + .control-group + = f.label :date_signed, :class => 'control-label' + .controls + = f.date_select :date_signed, :class => 'date_select' + .control-group + = f.label :date_kickoff, :class => 'control-label' + .controls + = f.date_select :date_kickoff, :class => 'date_select' + .control-group + = f.label :date_target, :class => 'control-label' + .controls + = f.date_select :date_target, :class => 'date_select' + .control-group + = f.label :is_confirmed, :class => 'control-label' + .controls + = f.check_box :is_confirmed, :class => 'check_box' + - if @project.is_confirmed? + %span.help-block= confirmed_info(@project) + .control-group + = f.label :date_delivered, :class => 'control-label' + .controls + = f.date_select :date_delivered, :class => 'date_select' + .control-group + = f.label :is_delivered, :class => 'control-label' + .controls + = f.check_box :is_delivered, :class => 'check_box' + .control-group + = f.label :status, :class => 'control-label' + .controls + = f.select :status, options_for_select(["green", "yellow", "red", "pipeline"], selected: f.object.status), include_blank: true, size: 3, class: "span1" + .control-group + = f.label "% Complete", :class => 'control-label' + .controls + = f.text_field :percent_complete, :class => 'text_field' + %span.help-block ex. 0.90 + .control-group + = f.label "Bug Tracker", :class => 'control-label' + .controls + = f.text_field :url_pmtool, :class => 'text_field' + %span.help-block ex. http://company.atlassian.com/browse/PROJ + .control-group + = f.label "Demo", :class => 'control-label' + .controls + = f.text_field :url_demo, :class => 'text_field' + %span.help-block ex. http://awesome.herokuapp.com + .control-group + = f.label :hours_budget, :class => 'control-label' + .controls + = f.text_field :hours_budget, :class => 'text_field' + .control-group + = f.label :hours_used, :class => 'control-label' + .controls + = f.text_field :hours_used, :class => 'text_field' + .control-group + = f.label :rate, :class => 'control-label' + .controls + = f.text_field :rate, :class => 'text_field' + .control-group + = f.label :comment, :class => 'control-label' + .controls + = f.text_area :comment, :class => 'text_area span4', :rows => 5 + %span.help-block Supports Markdown + / +

        Milestones


        +
        + f.fields_for :milestones do |milestone| + render 'milestone_fields', :f => milestone + +
        + %h3 Skills + .control-group.skills + = f.fields_for :required_skills 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 t('.cancel', :default => t("helpers.links.cancel")), | + projects_path, :class => 'btn' | diff --git a/app/views/projects/_milestone_fields.html.erb b/app/views/projects/_milestone_fields.html.erb deleted file mode 100644 index 9d150c9..0000000 --- a/app/views/projects/_milestone_fields.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -
        -
        - <%= f.label :date, :class => 'control-label' %> -
        - <%= f.text_field :date, :class => 'milestone_date', 'data-provide' => 'datepicker', 'data-date-format' => "yyyy-mm-dd" %> - Format: yyyy-mm-dd -
        -
        -
        - <%= f.label :notes, :class => 'control-label' %> -
        - <%= f.text_area :notes, rows: '3' %> -
        -
        -
        -
        - <%= link_to_remove_association "Remove Milestone", f %> -
        -
        -
        - -
        diff --git a/app/views/projects/_milestone_fields.html.haml b/app/views/projects/_milestone_fields.html.haml new file mode 100644 index 0000000..bc38e19 --- /dev/null +++ b/app/views/projects/_milestone_fields.html.haml @@ -0,0 +1,14 @@ +.nested-fields + .field.control-group + = f.label :date, :class => 'control-label' + .controls + = f.text_field :date, :class => 'milestone_date', 'data-provide' => 'datepicker', 'data-date-format' => "yyyy-mm-dd" + %span.help-block Format: yyyy-mm-dd + .field.control-group + = f.label :notes, :class => 'control-label' + .controls + = f.text_area :notes, rows: '3' + .control-group + .controls + = link_to_remove_association "Remove Milestone", f + %hr/ diff --git a/app/views/projects/edit.html.erb b/app/views/projects/edit.html.erb deleted file mode 100644 index 2e94e24..0000000 --- a/app/views/projects/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -<%- model_class = Project -%> - -<%= render :partial => 'form' %> diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml new file mode 100644 index 0000000..f7f0257 --- /dev/null +++ b/app/views/projects/edit.html.haml @@ -0,0 +1,7 @@ +- model_class = Project +.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/projects/index.html.erb b/app/views/projects/index.html.erb deleted file mode 100644 index 2b19b58..0000000 --- a/app/views/projects/index.html.erb +++ /dev/null @@ -1,60 +0,0 @@ -<%- model_class = Project -%> - - - - - - - - - - - - - - - - - - <% @projects.each do |project| %> - - - - - - - - - - - - - <% end %> - -
        <%= model_class.human_attribute_name(:id) %><%= model_class.human_attribute_name(:client) %><%= model_class.human_attribute_name(:name) %><%= model_class.human_attribute_name(:date_kickoff) %><%= model_class.human_attribute_name(:date_target) %><%= model_class.human_attribute_name(:date_delivered) %><%= model_class.human_attribute_name(:status) %><%= model_class.human_attribute_name(:hours_budget) %><%= model_class.human_attribute_name(:hours_used) %><%=t '.actions', :default => t("helpers.actions") %>
        <%= link_to project.id, project_path(project) %><%= project.client %><%= project.name %><%= project.date_kickoff %><%= project.date_target %><%= project.date_delivered %><%= project.status %><%= project.hours_budget %><%= project.hours_used %> - <% if can? :show, project %> - <%= link_to t('.show', :default => t("helpers.links.show")), - project_path(project), :class => 'btn btn-mini' %> - <% end %> - - <% if can? :update, project %> - <%= link_to t('.edit', :default => t("helpers.links.edit")), - edit_project_path(project), :class => 'btn btn-mini' %> - <% end %> - - <% if can? :destroy, project %> - <%= link_to t('.destroy', :default => t("helpers.links.destroy")), - project_path(project), - :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, Project %> -<%= link_to t('.new', :default => t("helpers.links.new")), - new_project_path, - :class => 'btn btn-primary' %> -<% end %> diff --git a/app/views/projects/index.html.haml b/app/views/projects/index.html.haml new file mode 100644 index 0000000..ce3d37b --- /dev/null +++ b/app/views/projects/index.html.haml @@ -0,0 +1,53 @@ +- model_class = Project +.page-header + %h1= t '.title', :default => model_class.model_name.human.pluralize +%table.table.table-striped + %thead + %tr + %th= model_class.human_attribute_name(:id) + %th= model_class.human_attribute_name(:client) + %th= model_class.human_attribute_name(:name) + %th= model_class.human_attribute_name(:date_kickoff) + %th= model_class.human_attribute_name(:date_target) + %th= model_class.human_attribute_name(:date_delivered) + %th= model_class.human_attribute_name(:status) + %th= model_class.human_attribute_name(:hours_budget) + %th= model_class.human_attribute_name(:hours_used) + %th= t '.actions', :default => t("helpers.actions") + %tbody + - @projects.each do |project| + %tr + %td= link_to project.id, project_path(project) + %td= project.client + %td= project.name + %td= project.date_kickoff + %td= project.date_target + %td= project.date_delivered + %td= project.status + %td= project.hours_budget + %td= project.hours_used + %td + - if can? :show, project + = link_to t('.show', | + :default => t("helpers.links.show")), | + project_path(project), | + :class => 'btn btn-mini' | + - if can? :update, project + = link_to t('.edit', | + :default => t("helpers.links.edit")), | + edit_project_path(project), | + :class => 'btn btn-mini' | + - if can? :destroy, project + = link_to t('.destroy', | + :default => t("helpers.links.destroy")), | + project_path(project), | + :method => :delete, | + :data => { :confirm => t('.confirm', | + :default => t("helpers.links.confirm", | + :default => 'Are you sure?')) }, | + :class => 'btn btn-mini btn-danger' | +- if can? :create, Project + = link_to t('.new', | + :default => t("helpers.links.new")), | + new_project_path, | + :class => 'btn btn-primary' | diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb deleted file mode 100644 index 07a0fe4..0000000 --- a/app/views/projects/new.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -<%- model_class = Project -%> - -<%= render :partial => 'form' %> diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml new file mode 100644 index 0000000..9ea7d32 --- /dev/null +++ b/app/views/projects/new.html.haml @@ -0,0 +1,7 @@ +- model_class = Project +.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/projects/show.html.erb b/app/views/projects/show.html.erb deleted file mode 100644 index 33ee937..0000000 --- a/app/views/projects/show.html.erb +++ /dev/null @@ -1,78 +0,0 @@ -<%- model_class = Project -%> - - -
        -
        <%= model_class.human_attribute_name(:client) %>:
        -
        <%= @project.client %>
        -
        <%= model_class.human_attribute_name(:name) %>:
        -
        <%= @project.name %>
        -
        <%= model_class.human_attribute_name(:project_manager) %>:
        -
        <%= @project.project_manager.presence || ' '.html_safe %>
        -
        <%= model_class.human_attribute_name(:date_signed) %>:
        -
        <%= @project.date_signed %>
        -
        <%= model_class.human_attribute_name(:date_kickoff) %>:
        -
        <%= @project.date_kickoff %>
        -
        <%= model_class.human_attribute_name(:date_target) %>:
        -
        <%= @project.date_target %>
        -
        <%= model_class.human_attribute_name(:date_delivered) %>:
        -
        <%= @project.date_delivered %>
        -
        <%= model_class.human_attribute_name(:is_confirmed) %>:
        -
        <%= @project.is_confirmed %> <%= confirmed_info(@project) %>
        -
        <%= model_class.human_attribute_name(:is_delivered) %>:
        -
        <%= @project.is_delivered %>
        -
        <%= model_class.human_attribute_name(:status) %>:
        -
        <%= @project.status %>
        -
        <%= model_class.human_attribute_name(:hours_budget) %>:
        -
        <%= @project.hours_budget %>
        -
        <%= model_class.human_attribute_name(:hours_used) %>:
        -
        <%= @project.hours_used %>
        -
        <%= model_class.human_attribute_name(:rate) %>:
        -
        <%= @project.rate %>
        -
        <%= model_class.human_attribute_name(:comment) %>:
        -
        <%= @project.comment %>
        -
        - -
        -
        Skills:
        -
        -
          - <% @project.required_skills.each do |e| %> -
        • <%= e.skill.name %> <%= e.level %>
        • - <% end %> -
        -
        -
        - -
        -
        Suitable users:
        -
        -
          - <% @matched_users.each do |data| %> -
        • <%= data.first %> <%= data.last %>
        • - <% end %> -
        -
        -
        - - -
        - <% if can? :index, Project %> - <%= link_to t('.back', :default => t("helpers.links.back")), - projects_path, :class => 'btn' %> - <% end %> - - <% if can? :update, @project %> - <%= link_to t('.edit', :default => t("helpers.links.edit")), - edit_project_path(@project), :class => 'btn' %> - <% end %> - - <% if can? :destroy, @project %> - <%= link_to t('.destroy', :default => t("helpers.links.destroy")), - project_path(@project), - :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/projects/show.html.haml b/app/views/projects/show.html.haml new file mode 100644 index 0000000..b4d196f --- /dev/null +++ b/app/views/projects/show.html.haml @@ -0,0 +1,114 @@ +- model_class = Project +.page-header + %h1= t '.title', :default => model_class.model_name.human +%dl.dl-horizontal + %dt + %strong + = model_class.human_attribute_name(:client) + \: + %dd= @project.client + %dt + %strong + = model_class.human_attribute_name(:name) + \: + %dd= @project.name + %dt + %strong + = model_class.human_attribute_name(:project_manager) + \: + %dd= @project.project_manager.presence || ' '.html_safe + %dt + %strong + = model_class.human_attribute_name(:date_signed) + \: + %dd= @project.date_signed + %dt + %strong + = model_class.human_attribute_name(:date_kickoff) + \: + %dd= @project.date_kickoff + %dt + %strong + = model_class.human_attribute_name(:date_target) + \: + %dd= @project.date_target + %dt + %strong + = model_class.human_attribute_name(:date_delivered) + \: + %dd= @project.date_delivered + %dt + %strong + = model_class.human_attribute_name(:is_confirmed) + \: + %dd + = @project.is_confirmed + %span.hint= confirmed_info(@project) + %dt + %strong + = model_class.human_attribute_name(:is_delivered) + \: + %dd= @project.is_delivered + %dt + %strong + = model_class.human_attribute_name(:status) + \: + %dd= @project.status + %dt + %strong + = model_class.human_attribute_name(:hours_budget) + \: + %dd= @project.hours_budget + %dt + %strong + = model_class.human_attribute_name(:hours_used) + \: + %dd= @project.hours_used + %dt + %strong + = model_class.human_attribute_name(:rate) + \: + %dd= @project.rate + %dt + %strong + = model_class.human_attribute_name(:comment) + \: + %dd= @project.comment +%dl.dl-horizontal + %dt + %strong Skills: + %dd + %ul.inline + - @project.required_skills.each do |e| + %li.skill{:class => "skill-level-\#{e.level}"} + = e.skill.name + \ #{e.level} +%dl.dl-horizontal + %dt + %strong Suitable users: + %dd + %ul.inline + - @matched_users.each do |data| + %li + = data.first + \ #{data.last} +.form-actions + - if can? :index, Project + = link_to t('.back', | + :default => t("helpers.links.back")), | + projects_path, | + :class => 'btn' | + - if can? :update, @project + = link_to t('.edit', | + :default => t("helpers.links.edit")), | + edit_project_path(@project), | + :class => 'btn' | + - if can? :destroy, @project + = link_to t('.destroy', | + :default => t("helpers.links.destroy")), | + project_path(@project), | + :method => 'delete', | + :data => { :confirm => t('.confirm', | + :default => t("helpers.links.confirm", | + :default => 'Are you sure?')) }, | + :class => 'btn btn-danger' | diff --git a/app/views/raw_items/_form.html.erb b/app/views/raw_items/_form.html.erb deleted file mode 100644 index 5f08d1d..0000000 --- a/app/views/raw_items/_form.html.erb +++ /dev/null @@ -1,52 +0,0 @@ -<%= form_for @raw_item, :html => { :class => 'form-horizontal' } do |f| %> -
        - <%= controller.action_name.capitalize %> Raw Item - -
        - <%= f.label :status, :class => 'control-label' %> -
        - <%= f.text_field :status, :class => 'text_field' %> -
        -
        - -
        - <%= f.label :user_id, :class => 'control-label' %> -
        - <%= f.number_field :user_id, :class => 'number_field' %> -
        -
        - -
        - <%= f.label :client, :class => 'control-label' %> -
        - <%= f.text_field :client, :class => 'text_field' %> -
        -
        - -
        - <%= f.label :project, :class => 'control-label' %> -
        - <%= f.text_field :project, :class => 'text_field' %> -
        -
        - -
        - <%= f.label :skill, :class => 'control-label' %> -
        - <%= f.text_field :skill, :class => 'text_field' %> -
        -
        - -
        - <%= f.label :billable, :class => 'control-label' %> -
        - <%= f.check_box :billable, :class => 'check_box' %> -
        -
        - -
        - <%= f.submit nil, :class => 'btn btn-primary' %> - <%= link_to 'Cancel', raw_items_path, :class => 'btn' %> -
        -
        -<% end %> diff --git a/app/views/raw_items/_form.html.haml b/app/views/raw_items/_form.html.haml new file mode 100644 index 0000000..a15a12d --- /dev/null +++ b/app/views/raw_items/_form.html.haml @@ -0,0 +1,32 @@ += form_for @raw_item, :html => { :class => 'form-horizontal' } do |f| + %fieldset + %legend + = controller.action_name.capitalize + Raw Item + .control-group + = f.label :status, :class => 'control-label' + .controls + = f.text_field :status, :class => 'text_field' + .control-group + = f.label :user_id, :class => 'control-label' + .controls + = f.number_field :user_id, :class => 'number_field' + .control-group + = f.label :client, :class => 'control-label' + .controls + = f.text_field :client, :class => 'text_field' + .control-group + = f.label :project, :class => 'control-label' + .controls + = f.text_field :project, :class => 'text_field' + .control-group + = f.label :skill, :class => 'control-label' + .controls + = f.text_field :skill, :class => 'text_field' + .control-group + = f.label :billable, :class => 'control-label' + .controls + = f.check_box :billable, :class => 'check_box' + .form-actions + = f.submit nil, :class => 'btn btn-primary' + = link_to 'Cancel', raw_items_path, :class => 'btn' diff --git a/app/views/raw_items/edit.html.erb b/app/views/raw_items/edit.html.erb deleted file mode 100644 index 786950e..0000000 --- a/app/views/raw_items/edit.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/app/views/raw_items/edit.html.haml b/app/views/raw_items/edit.html.haml new file mode 100644 index 0000000..c66fabf --- /dev/null +++ b/app/views/raw_items/edit.html.haml @@ -0,0 +1 @@ += render :partial => 'form' diff --git a/app/views/raw_items/index.html.erb b/app/views/raw_items/index.html.erb deleted file mode 100644 index e1aed9b..0000000 --- a/app/views/raw_items/index.html.erb +++ /dev/null @@ -1,36 +0,0 @@ -

        Raw Items

        -

        Note: This data is loaded from Google SpreadSheet

        - - - - - - - - - - - - - - - - <% @raw_items.each do |raw_item| %> - - - - - - - - - - - - <% end %> - -
        IDROW NO.StatusResourceClientProjectSkillBillableActions
        <%= raw_item.id %><%= raw_item.row %><%= raw_item.status %><%= raw_item.user.name %><%= raw_item.client %><%= raw_item.project %><%= raw_item.skill %><%= raw_item.billable %> - <% if can? :destroy, raw_item %> - <%= link_to 'Destroy', raw_item_path(raw_item), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' %> - <% end %> -
        diff --git a/app/views/raw_items/index.html.haml b/app/views/raw_items/index.html.haml new file mode 100644 index 0000000..a92d842 --- /dev/null +++ b/app/views/raw_items/index.html.haml @@ -0,0 +1,28 @@ +%h1 Raw Items +%p{:style => "color:red;"} Note: This data is loaded from Google SpreadSheet +%table.table.table-striped + %thead + %tr + %th ID + %th ROW NO. + %th Status + %th Resource + %th Client + %th Project + %th Skill + %th Billable + %th Actions + %tbody + - @raw_items.each do |raw_item| + %tr + %td= raw_item.id + %td= raw_item.row + %td= raw_item.status + %td= raw_item.user.name + %td{:style => "width: 20%;"}= raw_item.client + %td= raw_item.project + %td= raw_item.skill + %td= raw_item.billable + %td + - if can? :destroy, raw_item + = link_to 'Destroy', raw_item_path(raw_item), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-mini btn-danger' diff --git a/app/views/raw_items/new.html.erb b/app/views/raw_items/new.html.erb deleted file mode 100644 index 786950e..0000000 --- a/app/views/raw_items/new.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/app/views/raw_items/new.html.haml b/app/views/raw_items/new.html.haml new file mode 100644 index 0000000..c66fabf --- /dev/null +++ b/app/views/raw_items/new.html.haml @@ -0,0 +1 @@ += render :partial => 'form' diff --git a/app/views/raw_items/show.html.erb b/app/views/raw_items/show.html.erb deleted file mode 100644 index f89a3ac..0000000 --- a/app/views/raw_items/show.html.erb +++ /dev/null @@ -1,37 +0,0 @@ -

        Raw Item

        - -

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

        - -

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

        - -

        - Client
        - <%= @raw_item.client %> -

        - -

        - Project
        - <%= @raw_item.project %> -

        - -

        - Skill
        - <%= @raw_item.skill %> -

        - -

        - Billable
        - <%= @raw_item.billable %> -

        - -
        - <%= link_to 'Back', raw_items_path, :class => 'btn' %> - <%= link_to 'Edit', edit_raw_item_path(@raw_item), :class => 'btn' %> - <%= link_to 'Delete', raw_item_path(@raw_item), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger' %> -
        diff --git a/app/views/raw_items/show.html.haml b/app/views/raw_items/show.html.haml new file mode 100644 index 0000000..4d25a2d --- /dev/null +++ b/app/views/raw_items/show.html.haml @@ -0,0 +1,29 @@ +%h1 Raw Item +%p + %b Status + %br/ + = @raw_item.status +%p + %b User + %br/ + = @raw_item.user_id +%p + %b Client + %br/ + = @raw_item.client +%p + %b Project + %br/ + = @raw_item.project +%p + %b Skill + %br/ + = @raw_item.skill +%p + %b Billable + %br/ + = @raw_item.billable +.form-actions + = link_to 'Back', raw_items_path, :class => 'btn' + = link_to 'Edit', edit_raw_item_path(@raw_item), :class => 'btn' + = link_to 'Delete', raw_item_path(@raw_item), :method => 'delete', :confirm => 'Are you sure?', :class => 'btn btn-danger' diff --git a/app/views/reports/_delivery_chart.html.erb b/app/views/reports/_delivery_chart.html.erb deleted file mode 100644 index ae0328b..0000000 --- a/app/views/reports/_delivery_chart.html.erb +++ /dev/null @@ -1,48 +0,0 @@ -
        -

        Active Client Projects -
        -

        - - - - - - - - - - - - - <% if !projects.empty? %> - <% projects.each do |proj| %> - <% hours_budget = (proj.hours_budget.to_i || 0) %> - <% hours_used = (proj.hours_used.to_i || 0) %> - <% hours_remaining = (hours_budget - hours_used) %> - - - - - - - - - - - <% end %> - <% else %> - - - - - <% end %> - -
         Milestones, Used vs Projected, RemainingGet 'er DoneHours UsedHours Rem.Weeks Rem.
        <%= proj.name %> - <%= proj.date_target.strftime('%m/%d') %><%= proj.fuzzy_due_date %><%= hours_used %><%= hours_remaining %><%= proj.weeks_remaining %>
         No projects!
        -
        diff --git a/app/views/reports/_delivery_chart.html.haml b/app/views/reports/_delivery_chart.html.haml new file mode 100644 index 0000000..58fff11 --- /dev/null +++ b/app/views/reports/_delivery_chart.html.haml @@ -0,0 +1,31 @@ +.well + %h4 + Active Client Projects + %br/ + %table#active-projects.table + %thead + %tr + %th{:width => "200"}   + %th{:width => "350"} Milestones, Used vs Projected, Remaining + %th{:colspan => "2"} Get 'er Done + %th{:width => "20"} Hours Used + %th{:width => "20"} Hours Rem. + %th{:width => "20"} Weeks Rem. + %tbody + - if !projects.empty? + - projects.each do |proj| + - hours_budget = (proj.hours_budget.to_i || 0) + - hours_used = (proj.hours_used.to_i || 0) + - hours_remaining = (hours_budget - hours_used) + %tr + %td.proj-name= proj.name + %td.chart-green{"data-end" => proj.date_target.to_time.to_i, "data-expected" => proj.expected_progress, "data-milestones" => proj.milestones.to_json, "data-remaining" => hours_remaining, "data-start" => proj.date_kickoff.to_time.to_i, "data-used" => hours_used} + %td= proj.date_target.strftime('%m/%d') + %td.muted= proj.fuzzy_due_date + %td= hours_used + %td= hours_remaining + %td= proj.weeks_remaining + - else + %tr + %td   + %td.muted{:colspan => "4"} No projects! diff --git a/app/views/reports/_filter.html.erb b/app/views/reports/_filter.html.erb deleted file mode 100644 index 62131bb..0000000 --- a/app/views/reports/_filter.html.erb +++ /dev/null @@ -1,36 +0,0 @@ -
        - - Filter: - <% unless params[:skill].blank? %> - <%= params[:skill] %> - <% else %> - Skill (PM, UX, Rails, etc.) - <% end %> - - - -
        - -
        - - Filter: - <% unless params[:team].blank? %> - <%= params[:team] %> - <% else %> - Team (PM, UX, Rails, etc.) - <% end %> - - - -
        - diff --git a/app/views/reports/_filter.html.haml b/app/views/reports/_filter.html.haml new file mode 100644 index 0000000..1d9fe2a --- /dev/null +++ b/app/views/reports/_filter.html.haml @@ -0,0 +1,24 @@ +.span3.btn-group.filter.pull-right + %a.btn.dropdown-toggle.pull-right{"data-toggle" => "dropdown", :href => "#"} + Filter: + - unless params[:skill].blank? + %em= params[:skill] + - else + %em Skill (PM, UX, Rails, etc.) + %span.caret + %ul.dropdown-menu.pull-left + %li= link_to "All", reports_path(:anchor => "bench") + - @skills.each do |skill| + %li= link_to skill, reports_path(:skill => skill, :anchor => "bench") +.span3.btn-group.filter.pull-right + %a.btn.dropdown-toggle.pull-right{"data-toggle" => "dropdown", :href => "#"} + Filter: + - unless params[:team].blank? + %em= params[:team] + - else + %em Team (PM, UX, Rails, etc.) + %span.caret + %ul.dropdown-menu + %li= link_to "All", reports_path() + - @teams.each do |team| + %li= link_to team, reports_path(:team => team, :anchor => "bench") diff --git a/app/views/reports/_project_popover.html.erb b/app/views/reports/_project_popover.html.erb deleted file mode 100644 index fe19cd8..0000000 --- a/app/views/reports/_project_popover.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -
        - <% report = Report::ProjectPopover.new proj %> - <% if !report.rows.empty? %> - - - - - <% week_beginning_dates.take(5).each do |date| %> - <%= table_head_for_week_beginning(date, width: '10') %> - <% end %> - - <% report.rows.each do |row| %> - - - - <% Dashboard.week_endings.take(5).each do |week_ending| %> - - <% end %> - - <% end %> -
        NameRole
        <%= row.user_name %><%= row.skill %> - <% wh = row.week_hours.select{|wh| wh.week == week_ending } %> - <%= wh.empty? ? " ".html_safe : wh.first.hours %> -
        - <% else %> -

        No schedules for this project

        - <% end %> -
        - diff --git a/app/views/reports/_project_popover.html.haml b/app/views/reports/_project_popover.html.haml new file mode 100644 index 0000000..df3f9cd --- /dev/null +++ b/app/views/reports/_project_popover.html.haml @@ -0,0 +1,19 @@ +.popover-html + - report = Report::ProjectPopover.new proj + - if !report.rows.empty? + %table.table.table-bordered.table-condensed + %tr + %th{:width => "150"} Name + %th Role + - week_beginning_dates.take(5).each do |date| + = table_head_for_week_beginning(date, width: '10') + - report.rows.each do |row| + %tr + %td= row.user_name + %td= row.skill + - Dashboard.week_endings.take(5).each do |week_ending| + %td + - wh = row.week_hours.select{|wh| wh.week == week_ending } + = wh.empty? ? " ".html_safe : wh.first.hours + - else + %p No schedules for this project diff --git a/app/views/reports/_projects_table.html.erb b/app/views/reports/_projects_table.html.erb index 9c0f055..7ca90a7 100644 --- a/app/views/reports/_projects_table.html.erb +++ b/app/views/reports/_projects_table.html.erb @@ -1,8 +1,4 @@ -<% - -delivered ||= false - - %> +<% delivered ||= false %> @@ -39,14 +35,27 @@ delivered ||= false <%= link_to proj.name, "#", :class => "popover-trigger" %> <%= render partial: 'project_popover', locals: { proj: proj } %> - - + + - ><%= proj.date_delivered.to_s(:xshort) %> - ><%= proj.date_target.to_s(:xshort) %> - + ><%= proj.date_delivered.to_s(:xshort) %> + + ><%= proj.date_target.to_s(:xshort) %> + + - (proj.hours_budget.to_i || 0) %>><%= ((proj.hours_budget.to_i || 0) - (proj.hours_used.to_i || 0)) %> + (proj.hours_budget.to_i || 0) %>> + <%= ((proj.hours_budget.to_i || 0) - (proj.hours_used.to_i || 0)) %> + <% end %> <% else %> diff --git a/app/views/reports/_user_popover.html.erb b/app/views/reports/_user_popover.html.erb deleted file mode 100644 index bce9929..0000000 --- a/app/views/reports/_user_popover.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -
        -
        <%= link_to("go", proj.url_pmtool, :title => "Bug tracker: #{proj.url_pmtool}", :class => proj.pmtool_type) if proj.url_pmtool.present? %><%= link_to("go", proj.url_demo, :title => "Demo: #{proj.url_demo}") if proj.url_demo.present? %> + <%= link_to("go", proj.url_pmtool, + :title => "Bug tracker: #{proj.url_pmtool}", + :class => proj.pmtool_type) if proj.url_pmtool.present? %> + + <%= link_to("go", proj.url_demo, + :title => "Demo: #{proj.url_demo}") if proj.url_demo.present? %> + <%= proj.project_manager %><%= proj.date_kickoff.to_s(:xshort) %> + <%= proj.date_kickoff.to_s(:xshort) %> + <%= proj.hours_used.to_i %>
        - - - - - <% week_beginning_dates.each do |date| %> - <%= table_head_for_week_beginning(date, 'width' => 10) %> - <% end %> - - - <% last_client = nil %> - <% row.each_project do |client, project, week_hours| %> - - - - <% week_hours.each do |hours| %> - - <% end %> - - <% last_client = client %> - <% end %> - -
        ClientProject
        <%= client unless client == last_client %><%= project %><%= hours > 0 ? hours.to_i : '' %>
        -
    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:

    -
      - <% @config.errors.full_messages.each do |msg| %> -
    • * <%= msg %>
    • - <% end %> -
    -
    -<% 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
    -
    -
      - <% @skill.experiences.each do |e| %> -
    • <%= e.user.name %> <%= e.level %>
    • - <% end %> -
    - -
    - -
    - - -
    - <% 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'