-
-
-
Success!
-User information successfully updated.
+
+
+
diff --git a/app/views/benefit_forms/index.html.erb b/app/views/benefit_forms/index.html.erb
index 818ab0877..14920ad8e 100644
--- a/app/views/benefit_forms/index.html.erb
+++ b/app/views/benefit_forms/index.html.erb
@@ -1,108 +1,137 @@
-
+
+
-
+
-
+
+
+
+
Success!
+User information successfully updated.
+
-
+
-
+
-
- Error!
-Something went wrong.
+ +
+
-
+
+
+
+
Error!
+Something went wrong. Please try again.
+
-
- <%= link_to "Edit", "#", {:onClick => "javascript:openEditModal(#{u.id});", :role => "button", :style => "width:70px", :class => "btn btn-inverse", "data-toggle" => "modal"}%>
+ <%= link_to "Edit", admin_get_user_path(u.id), {:style => "width:70px", :class => "btn btn-inverse"}%>
<% end %>
-
-
-<%= javascript_include_tag "jquery.dataTables.min.js"%>
+<%= javascript_include_tag "jquery.dataTables.min.js" %>
diff --git a/app/views/admin/get_all_users.html.erb b/app/views/admin/get_all_users.html.erb
index bf092ea47..d262be118 100755
--- a/app/views/admin/get_all_users.html.erb
+++ b/app/views/admin/get_all_users.html.erb
@@ -29,27 +29,18 @@
<%= u.admin ? %{
-
-
- Manage Users
+
+
+
+
+
+ + Manage Users +
+
+
+
+
+
-
-
+ Loading users...
+ Loading user data...
-
-
-
-
-
-
-
-
-
-
-
-
-
- Health Insurance
-
-
- Click on PDF to download
- <%= link_to download_path(:type => "File", :name => "public/docs/Health_n_Stuff.pdf") do %> -
- <%= link_to download_path(:type => "File", :name => "public/docs/Health_n_Stuff.pdf") do %> -
-
-
-
-
- PDF
-
-
+
+
+
+
+
-
+
+ + Benefit Forms +
+Download benefit documents and upload completed forms
+
+
+
+
+
+
+
+
-
-
+
+
+ Health Insurance
+Download your health insurance benefit forms and information
+ <%= link_to download_path(type: "File", name: "public/docs/Health_n_Stuff.pdf"), class: "btn btn-primary btn-lg" do %> + Download PDF <% end %> -
-
-
-
-
-
-
- Dental Insurance
-
-
- Click on PDF to download
- <%= link_to download_path(:type => "File", :name => "public/docs/Dental_n_Stuff.pdf") do %> -
- <%= link_to download_path(:type => "File", :name => "public/docs/Dental_n_Stuff.pdf") do %> -
-
+
+
-
-
- PDF
-
-
-
-
+
+
+
+
-
-
+
+
+ Dental Insurance
+Download your dental insurance benefit forms and information
+ <%= link_to download_path(type: "File", name: "public/docs/Dental_n_Stuff.pdf"), class: "btn btn-success btn-lg" do %> + Download PDF <% end %> -
-
-
-
-
- Health Insurance
+
+
+
+
+
+
+
+
+ + Upload Completed Forms +
+
+ <%= form_for @benefits, url: upload_path, html: { multipart: true, id: "fi", class: "needs-validation" } do |f| %>
+ <%= hidden_field "benefits", "backup", value: false %>
+
+
+
-
-
+
-
+
+
Select File to Upload
+Choose a file from your computer
+ +
+
+ <%= f.file_field :upload, class: "d-none", id: "benefits_upload" %>
+
+
+
+
+ No file selected
+
+
+
-
+
+
+
-
+ Upload file
- <%= form_for @benefits, :url => upload_path, :html => { :action => "upload", :multipart => true, :id => "fi" } do |f| %> - -
-
+
- <%= hidden_field "benefits", "backup", :value => false %>
-
-
-
- Add file
- <%= f.file_field :upload %>
-
-
+
+
+
+
+
diff --git a/app/views/dashboard/bar_graph.html.erb b/app/views/dashboard/bar_graph.html.erb
index ed8c550c0..7be7cd179 100644
--- a/app/views/dashboard/bar_graph.html.erb
+++ b/app/views/dashboard/bar_graph.html.erb
@@ -1,54 +1,94 @@
-
-
-
+
+
@@ -111,16 +140,91 @@
+
+
+
Important Information
+-
+
- Download benefit forms, fill them out completely, and upload them back +
- Accepted file formats: PDF, DOC, DOCX, JPG, PNG +
- Maximum file size: 10MB +
- All uploaded documents are securely stored +
+
diff --git a/app/views/dashboard/home.html.erb b/app/views/dashboard/home.html.erb
index c923c4949..baa1acb16 100644
--- a/app/views/dashboard/home.html.erb
+++ b/app/views/dashboard/home.html.erb
@@ -1,56 +1,90 @@
-
+
+
+
+
-
\ No newline at end of file
+ | Year | +Visitors | +Orders | +Income | +Expenses | +
|---|---|---|---|---|
| 2007 | +300 | +800 | +900 | +300 | +
| 2008 | +1,170 | +860 | +1,220 | +564 | +
| 2009 | +260 | +1,120 | +2,870 | +2,340 | +
| 2010 | +1,030 | +540 | +3,430 | +1,200 | +
| 2011 | +200 | +700 | +1,700 | +770 | +
| 2012 | +1,170 | +2,160 | +3,920 | +800 | +
+
+
+
+
+
+
+
+ Total Visitors
+ 3,130
+
+
+
+
+
+
+ Total Orders
+ 6,180
+
+
+
+
+
+
+ Total Income
+ 14,040
+
+
+
+
+
+
+ Total Expenses
+ 5,174
+
-
-
-
-
-
- RailsGoat
- <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
- <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
+
+
+ RailsGoat - OWASP Security Training
+
<%#= csrf_meta_tags %>
-
+
+
+
+
+
+
+
+
+
+
+
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => "reload" %>
+ <%= javascript_include_tag "application", "data-turbolinks-track" => "reload" %>
+
+
+
+
+
+
+
+
+
+
+
+ body { font-size:<%= raw cookies[:font] %> !important;}
<%
end
%>
+
<%= render "layouts/shared/header" %>
<%= render "layouts/shared/sidebar" %>
-
+ <%= render "layouts/shared/messages" %>
+ <%= yield %>
+
+ <%= render "layouts/shared/footer" %>
diff --git a/app/views/layouts/shared/_footer.html.erb b/app/views/layouts/shared/_footer.html.erb
index f2a9c18dc..a19761201 100755
--- a/app/views/layouts/shared/_footer.html.erb
+++ b/app/views/layouts/shared/_footer.html.erb
@@ -1,22 +1,56 @@
-
+<% if current_user %>
+
+<% end %>
-
\ No newline at end of file
+
diff --git a/app/views/layouts/shared/_header.html.erb b/app/views/layouts/shared/_header.html.erb
index 24b39cada..a97f59528 100755
--- a/app/views/layouts/shared/_header.html.erb
+++ b/app/views/layouts/shared/_header.html.erb
@@ -1,88 +1,115 @@
<% if current_user %>
-
-
-
- Font Size:
- A
- A
-
-
-
+
+
+<% end %>
diff --git a/app/views/layouts/shared/_messages.html.erb b/app/views/layouts/shared/_messages.html.erb
index 6ca554275..ea71b53af 100755
--- a/app/views/layouts/shared/_messages.html.erb
+++ b/app/views/layouts/shared/_messages.html.erb
@@ -1,19 +1,38 @@
<% flash.each do |name, msg| %>
<% name = name.to_sym %>
- <% if name == :error %>
-
- Current Statistics
-
-
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
diff --git a/app/views/dashboard/pie_charts.html.erb b/app/views/dashboard/pie_charts.html.erb
index e4059dac6..eb98bcb54 100755
--- a/app/views/dashboard/pie_charts.html.erb
+++ b/app/views/dashboard/pie_charts.html.erb
@@ -48,8 +48,18 @@
<% end %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 960c52126..8ecd6a071 100755
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -1,43 +1,438 @@
-
+
-
+
+
+
+
+ + Current Statistics +
+ +
+
+ Bar Graph
+
+
+ Pie Charts
+
-
- <%#= render partial: "dashboard_stats" %>
-
-
+
+
+
+
-
+
+ Loading charts...
+
+ Loading statistics...
- <% if current_user %>
-
- <%= render "layouts/shared/footer" %>
-
-
+
- <%= render "layouts/shared/messages" %>
- <%= yield %>
-
- <% else %>
-
- <%= render "layouts/shared/messages" %>
- <%= yield %>
-
- <% end %>
-
-
-
-
-
-
+
+
<% else %>
-
-
-
+
+
+
+
- -
-
- - <%= link_to "Account settings", user_account_settings_path(user_id: current_user.id) %> - -
- - <%= link_to "Logout", logout_path %> - -
+
+
-
+
+ RailsGoat
+
+
+
+
+
+
+
+
+
+
+
+ <%= button_to "https://github.com/OWASP/railsgoat/wiki", {
+ method: "get",
+ class: "btn btn-sm btn-outline-primary",
+ onclick: "window.open('https://github.com/OWASP/railsgoat/wiki', '_blank'); return false;"
+ } do %>
+ Tutorials
+ <% end %>
+
+
+
+
+
+
+
+
+
+
+
+ <%= current_user.first_name.html_safe %>
+ -
+
- + <%= link_to user_account_settings_path(user_id: current_user.id), class: "dropdown-item" do %> + Account Settings + <% end %> + +
- + <%= link_to logout_path, class: "dropdown-item text-danger" do %> + Logout + <% end %> + +
-
-
- - - Welcome, <%= current_user.first_name.html_safe %> - -
-
-
- - <%= button_to "Visit Tutorial", nil, - { - :class => "btn", - :method => "get", - :onclick => "window.open('https://github.com/OWASP/railsgoat/wiki', '_blank')" - } %> - -
-
-
- - <%= button_to "Signup", signup_path, {:class => "btn btn-primary", :method => "get"} %> - -
-
-
- - <%= button_to "login", login_path, {:class => "btn", :method => "get"} %> - -
-
-
- - <%= button_to "Tutorial Credentials", "#myModalLabel1", {:id => "show_creds_btn", :class => "btn btn-danger", :method => "get"} %> - -
-
-
- - <%= button_to "Visit Tutorial", nil, - { - :class => "btn", - :method => "get", - :onclick => "window.open('https://github.com/OWASP/railsgoat/wiki', '_blank')" - } %> - -
+
+
+
+
+
+ RailsGoat
+
+
-
-
+
-
+ <%= button_to "https://github.com/OWASP/railsgoat/wiki", {
+ method: "get",
+ class: "btn btn-sm btn-outline-primary",
+ onclick: "window.open('https://github.com/OWASP/railsgoat/wiki', '_blank'); return false;"
+ } do %>
+ Tutorials
+ <% end %>
-<% end %>
+ <%= button_to signup_path, {
+ class: "btn btn-sm btn-primary",
+ method: "get"
+ } do %>
+ Sign Up
+ <% end %>
+ <%= button_to login_path, {
+ class: "btn btn-sm btn-outline-primary",
+ method: "get"
+ } do %>
+ Login
+ <% end %>
+
- ×
- <%= content_tag :div, msg, :id => "flash_notice" %>
+ <%
+ alert_class = case name
+ when :error, :alert
+ 'alert-danger'
+ when :success, :notice
+ 'alert-success'
+ when :info
+ 'alert-info'
+ when :warning
+ 'alert-warning'
+ else
+ 'alert-secondary'
+ end
+
+ icon_class = case name
+ when :error, :alert
+ 'bi-exclamation-circle-fill'
+ when :success, :notice
+ 'bi-check-circle-fill'
+ when :info
+ 'bi-info-circle-fill'
+ when :warning
+ 'bi-exclamation-triangle-fill'
+ else
+ 'bi-bell-fill'
+ end
+ %>
+
+
+
+
+
+ <%= link_to user_benefit_forms_path(user_id: current_user.id), class: "#{controller_name == 'benefit_forms' ? 'active' : ''}" do %>
+
+ Benefit Forms
+ <% end %>
+
+
+
+ <%= link_to user_retirement_index_path(user_id: current_user.id), class: "#{controller_name == 'retirement' ? 'active' : ''}" do %>
+
+ 401k Info
+ <% end %>
+
+
+
+ <%= link_to user_paid_time_off_index_path(user_id: current_user.id), class: "#{controller_name == 'paid_time_off' ? 'active' : ''}" do %>
+
+ PTO
+ <% end %>
+
-
+
+
+
+
<% end %>
diff --git a/app/views/messages/index.html.erb b/app/views/messages/index.html.erb
index 49578b9a1..eee66785a 100644
--- a/app/views/messages/index.html.erb
+++ b/app/views/messages/index.html.erb
@@ -1,138 +1,309 @@
-
+
+
+
+<% end %>
diff --git a/app/views/layouts/shared/_sidebar.html.erb b/app/views/layouts/shared/_sidebar.html.erb
index 8b1a67301..61ce5bfc8 100755
--- a/app/views/layouts/shared/_sidebar.html.erb
+++ b/app/views/layouts/shared/_sidebar.html.erb
@@ -1,142 +1,90 @@
<% if current_user %>
-
+ <%= msg %>
- <% elsif name == :success %>
-
- ×
- <%= content_tag :div, msg, :id => "flash_notice" %>
-
- <% elsif name == :info %>
-
- ×
- <%= content_tag :div, msg, :id => "flash_notice" %>
-
- <% end %>
-<% end %>
\ No newline at end of file
+
-
+ <% end %>
+
+ -
-
-
- <%= link_to home_dashboard_index_path do %>
- - -- Dashboard - <% end %> -
- <% if is_admin? %>
-
-
-
- - -- Admin - -
-
-
- - <%= link_to admin_dashboard_path(:admin_id => "1") do %> - Manage Users - <% end %> - -
- - <%= link_to admin_analytics_path(:admin_id => "1") do %> - View Analytics - <% end %> - -
- <% end %>
- -
- <%= link_to user_benefit_forms_path(user_id: current_user.id) do %>
- - -- Benefit Forms - <% end %> -
-
-
- <%= link_to user_retirement_index_path(user_id: current_user.id) do %>
- - -- 401k Info - <% end %> -
-
-
- <%= link_to user_paid_time_off_index_path(user_id: current_user.id) do %>
- - -- PTO - <% end %> -
-
-
- <%= link_to user_work_info_index_path(user_id: current_user.id) do %>
- - -- Work Info - <% end %> -
-
-
- <%= link_to user_performance_index_path(user_id: current_user.id) do %>
- - -- Performance - <% end %> +
Employee
+
+
+ OWASP RailsGoat <%= Rails::VERSION::STRING %>
+
+
-
-
-
-
-
-
-
-
- Messages for <%= current_user.full_name %>
-
-
+
+
+
+
+
+
+
+ + Messages +
+Inbox for <%= current_user.full_name %>
+
+
+
+
-
-
-
+
+
+ + Inbox +
+Your received messages
+
+ <% if @messages.any? %>
+
-
+
+ <% @messages.each do |message| %>
+
-
+
+ <% end %>
+
+
+
+
+
+
+
+
+
+ <%= message.creator_name %>
+
+
+
+ <%= message.created_at.strftime("%b %d, %Y") %>
+
+
+ <%= message.message %>
+
+
+ <%= link_to user_message_path(:id => message.id), class: "btn btn-sm btn-outline-primary" do %>
+ Details
+ <% end %>
+ <%= link_to user_message_path(:id => message.id), method: 'delete', data: { confirm: 'Are you sure?' }, class: "btn btn-sm btn-outline-danger" do %>
+ Delete
+ <% end %>
+
+
-
-
-
+ <% else %>
+
+ <% end %>
| From: | -Date | -Message | -Actions | -||||
|---|---|---|---|---|---|---|---|
| <%= "No messages!" %> | - <% end %> - <% @messages.each do |message| %> - | <%= message.creator_name %> | -<%= message.created_at.to_date %> | -<%= message.message %> | -<%= link_to "Details", user_message_path(:id => message.id), {:class => "btn btn-info pull-left"}%> - <%= link_to "Delete", user_message_path(:id => message.id), {:method => 'delete', :class => "btn btn-danger pull-left"}%> | -
+
+
- No Messages Yet
+Your inbox is empty. Send a message to get started!
-
-
-
-
-
- Send Message
+
+
+
+
-
-
+
+
+ + Send Message +
+Compose a new message
+
+
+
-
+
+
+
-
+ Success!
+
Message sent successfully.
-
-
+
-
- - Success! -
-- Message successfully sent. -
-
-
- - Error! -
-- Failed to send message. -
-
-
+
+
-
- <%= form_for @message, :url => user_messages_path, :method => :post, :html => {:id => "send_message"} do |f|%>
- <%= f.hidden_field :creator_id, :value => current_user.id %>
- <%= f.hidden_field :read, :value => '0' %>
-
+
- <%= f.label "To:", nil, {:class => "control-label"}%>
- <%= f.select(:receiver_id, options_from_collection_for_select(User.all, :id, :full_name)) %>
-
-
-
- <%= f.label :message, nil, {:class => "control-label"}%>
- <%= f.text_area :message, {:class => "span12"} %>
-
-
-
- <%= f.submit "Submit", {:id => 'submit_button', :class => "btn btn-info pull-right"} %>
-
-
-
- <% end %>
-
-
+
+
+ <%= form_for @message, url: user_messages_path, method: :post, html: { id: "send_message" } do |f| %>
+ <%= f.hidden_field :creator_id, value: current_user.id %>
+ <%= f.hidden_field :read, value: '0' %>
+
+
+
+
+
+ Error!
+
Failed to send message.
+
+
+ <%= f.select(:receiver_id,
+ options_from_collection_for_select(User.all, :id, :full_name),
+ {},
+ { class: "form-select form-select-lg" }) %>
+ Select message recipient
+
+
+
+
+ <%= f.text_area :message,
+ class: "form-control form-control-lg",
+ rows: 6,
+ placeholder: "Type your message here...",
+ style: "resize: vertical;" %>
+ Write your message content
+
+
+
+ <%= f.submit "Send Message",
+ id: 'submit_button',
+ class: "btn btn-success btn-lg" %>
+
+
+
+
+
+ Tip: Messages are delivered instantly
+
+
+ <% end %>