diff --git a/Gemfile b/Gemfile index 79d384b..025630b 100644 --- a/Gemfile +++ b/Gemfile @@ -9,6 +9,8 @@ group :development do end # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' +gem 'bootstrap-sass', '~> 3.2.0' +gem 'autoprefixer-rails' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # Use CoffeeScript for .coffee assets and views diff --git a/Gemfile.lock b/Gemfile.lock index 1f45644..bfd9ef3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -38,9 +38,14 @@ GEM thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) arel (6.0.3) + autoprefixer-rails (6.0.2) + execjs + json bcrypt (3.1.10) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) + bootstrap-sass (3.2.0.2) + sass (~> 3.2) builder (3.2.2) byebug (6.0.2) coffee-rails (4.1.0) @@ -151,7 +156,9 @@ PLATFORMS DEPENDENCIES action_mailer_tls + autoprefixer-rails bcrypt (~> 3.1.7) + bootstrap-sass (~> 3.2.0) byebug coffee-rails (~> 4.1.0) jbuilder (~> 2.0) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 7c7d1e1..2efd51e 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -14,4 +14,5 @@ //= require jquery_ujs //= require jquery.turbolinks //= require turbolinks +//= require bootstrap-sprockets //= require_tree . diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.scss similarity index 54% rename from app/assets/stylesheets/application.css rename to app/assets/stylesheets/application.scss index 9deacaf..45aa704 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.scss @@ -10,10 +10,51 @@ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new * file per style scope. * - *= require_tree . - *= require_self + */ +@import "bootstrap-sprockets"; +@import "bootstrap"; + +.header{ + height: 50px; + width: 100%; + display: block; +} #output{ width: 500px; -} \ No newline at end of file +} + +.container{ + width: 550px; + border: 1px solid gray; + border-radius: 15px; + padding: 10px; + float:left; + margin-left: 100px; + display:inline; +} + +.right-container{ + width: 500px; + border: 1px solid gray; + border-radius: 15px; + padding: 10px; + margin-left: 30px; + display:inline; +} + +.email-container{ + border: 1px solid gray; + width: 400px; + margin: 0 auto; + border-radius: 15px; + padding: 15px; +} + +.center{ + margin: 0 auto; + width: 600px; + text-align: center; +} + diff --git a/app/views/emails/_beginningweek.html.erb b/app/views/emails/_beginningweek.html.erb new file mode 100644 index 0000000..3a19038 --- /dev/null +++ b/app/views/emails/_beginningweek.html.erb @@ -0,0 +1,31 @@ +
+ + (To: <%=@user.coworkers.first.email%>) + +
++ (Subject line: Work plan for this week) +
+ Hi <%=@user.coworkers.first.first_name%>, ++ After reviewing my activities here is my plan for the week in order of priority. Let me know if you think I should re-prioritize: +
+ ++ Let me know if you have any comments. Thank you! +
+
+ -<%=@user.name.capitalize%>
+ Sent via Translucent
+
+ <%= f.submit "Send email", class: "btn btn-default", data: { confirm: 'Are you ready to send your email to your boss?' } %> +
\ No newline at end of file diff --git a/app/views/emails/index.html.erb b/app/views/emails/index.html.erb index f40b21c..c77cf02 100644 --- a/app/views/emails/index.html.erb +++ b/app/views/emails/index.html.erb @@ -1,9 +1,9 @@ <% if @user.coworkers.length > 0 %> <% if sat_through_wed %> -Fill in the following fields to autogenerate an email about your plans for this week.
+
+ Fill in the following fields to autogenerate an email about your plans for this week.
+ Once you hit send, the email will be sent to your boss.
+
Once you hit send, the email will be sent to your boss.
- -<%= form_for @email, url: {action: "create"}, html: {class: "email_form"} do |f| %> -Email Recipient: <%= f.text_field :addressee_email, :value => @user.coworkers.first.email, :id => 'boss-email', :onkeyup => "bossEmailKeyPress()", :onkeypress => "bossEmailKeyPress()" %>
-Email Subject Line: <%= f.text_field :subject_line_beginning_week, :value => "Work plan for this week", :id => 'subject-line', :onkeyup => "subjectLineKeyPress()", :onkeypress => "subjectLineKeyPress()" %>
-Recipient name: <%= f.text_field :addressee_name, :value => @user.coworkers.first.first_name, :id => 'boss-name', :onkeyup => "bossNameKeyPress()", :onkeypress => "bossNameKeyPress()" %>
-Major Projects (separate by comma): <%= f.text_field :major_projects, :id => 'text' %>
-Open Projects (separate by comma): <%= f.text_field :open_projects, :id => 'text2' %>
- -- <%= f.submit "Send email" %> -
-<% end %> -- (To: <%=@user.coworkers.first.email%>) -
+<% elsif thurs_through_sat %> +- (Subject line: Work plan for this week) + Fill in the following fields to autogenerate an email about what you already completed this week.
- Hi <%=@user.coworkers.first.first_name%>, -- After reviewing my activities here is my plan for the week in order of priority. Let me know if you think I should re-prioritize:
- -Let me know if you have any comments. Thank you!
- -<%=@user.name.capitalize%> -Sent via Translucent
- -<% elsif thurs_through_sat %> - -Fill in the following fields to autogenerate an email about what you already completed this week.
- -Once you hit send, the email will be sent to your boss.
+ Once you hit send, the email will be sent to your boss. + -<%= form_for @email, url: {action: "create"}, html: {class: "email_form"} do |f| %> -Email Recipient: <%= f.text_field :addressee_email, :value => @user.coworkers.first.email, :id => 'boss-email', :onkeyup => "bossEmailKeyPress()", :onkeypress => "bossEmailKeyPress()" %>
-Email Subject Line: <%= f.text_field :subject_line_end_week, :value => "Completed tasks and progress this week", :id => 'subject-line', :onkeyup => "subjectLineKeyPress()", :onkeypress => "subjectLineKeyPress()" %>
+ <%= form_for @email, url: {action: "create"}, html: {class: "form_horizontal"} do |f| %> +Email Recipient: <%= f.text_field :addressee_email, :value => @user.coworkers.first.email, :id => 'boss-email', :onkeyup => "bossEmailKeyPress()", :onkeypress => "bossEmailKeyPress()" %>
+Email Subject Line: <%= f.text_field :subject_line_end_week, :value => "Completed tasks and progress this week", :id => 'subject-line', :onkeyup => "subjectLineKeyPress()", :onkeypress => "subjectLineKeyPress()" %>
+Recipient name: <%= f.text_field :addressee_name, :value => @user.coworkers.first.first_name, :id => 'boss-name', :onkeyup => "bossNameKeyPress()", :onkeypress => "bossNameKeyPress()" %>
-COMPLETED Projects (separate by comma): <%= f.text_field :major_projects, :id => 'text' %>
-OPEN Projects (separate by comma): <%= f.text_field :open_projects, :id => 'text2' %>
+COMPLETED Projects (separate by comma): <%= f.text_field :major_projects, :id => 'text' %>
+OPEN Projects (separate by comma): <%= f.text_field :open_projects, :id => 'text2' %>
+- <%= f.submit "Send email" %> + <%= f.submit "Send email", class: "btn btn-default" %>
<% end %>