Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Convert erb to HAML #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -94,3 +93,4 @@ end

gem 'cancan'
gem 'rest-client'

11 changes: 8 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -381,6 +385,7 @@ DEPENDENCIES
guard-rspec
guard-spork
guard-yard
haml-rails (~> 0.4.0)
heroku
jbuilder
jquery-rails
Expand Down
9 changes: 0 additions & 9 deletions app/views/dashboards/_announcements.html.erb

This file was deleted.

6 changes: 6 additions & 0 deletions app/views/dashboards/_announcements.html.haml
Original file line number Diff line number Diff line change
@@ -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
33 changes: 0 additions & 33 deletions app/views/dashboards/_faq.html.erb

This file was deleted.

16 changes: 16 additions & 0 deletions app/views/dashboards/_faq.html.haml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 0 additions & 27 deletions app/views/dashboards/_my_schedule.html.erb

This file was deleted.

17 changes: 17 additions & 0 deletions app/views/dashboards/_my_schedule.html.haml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 0 additions & 22 deletions app/views/dashboards/_projects_chart.html.erb

This file was deleted.

15 changes: 15 additions & 0 deletions app/views/dashboards/_projects_chart.html.haml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 0 additions & 20 deletions app/views/dashboards/_pto.html.erb

This file was deleted.

12 changes: 12 additions & 0 deletions app/views/dashboards/_pto.html.haml
Original file line number Diff line number Diff line change
@@ -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}
60 changes: 0 additions & 60 deletions app/views/dashboards/index.html.erb

This file was deleted.

35 changes: 35 additions & 0 deletions app/views/dashboards/index.html.haml
Original file line number Diff line number Diff line change
@@ -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
/ <p>Here's what's trending from Github commits.</p>
%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
38 changes: 0 additions & 38 deletions app/views/doc_auths/_form.html.erb

This file was deleted.

24 changes: 24 additions & 0 deletions app/views/doc_auths/_form.html.haml
Original file line number Diff line number Diff line change
@@ -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'
Loading