mirror of
https://github.com/beatriceo/polyglot.git
synced 2025-10-25 18:52:11 +00:00
Add dotenv - Protect my secret data in .env file
This commit is contained in:
32
app/views/users/edit.html.erb
Normal file
32
app/views/users/edit.html.erb
Normal file
@@ -0,0 +1,32 @@
|
||||
<div class="profile-container">
|
||||
<%= simple_form_for(@user) do |t| %>
|
||||
<div class="profile-form">
|
||||
<div>
|
||||
<%= t.input :email %>
|
||||
<%= t.input :first_name %>
|
||||
<%= t.input :last_name %>
|
||||
<%= t.input :photo %>
|
||||
<%= t.input :password %>
|
||||
|
||||
<%= t.submit :Save, class: "btn btn-primary save-btn form-control" %>
|
||||
<p></p>
|
||||
<%= link_to "View my profile", user_path(@user), class: "btn btn-primary save-btn form-control" %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="profile-pic">
|
||||
<% if @user.photo.nil? %>
|
||||
<%= image_tag "https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png"%>
|
||||
<% else %>
|
||||
<%= cl_image_tag current_user.photo%>
|
||||
<% end %>
|
||||
|
||||
<%= t.input_field :photo, onchange: 'this.form.submit();' %>
|
||||
<%= t.input_field :photo, as: :hidden %>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
2
app/views/users/index.html.erb
Normal file
2
app/views/users/index.html.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
<h1>Users#index</h1>
|
||||
<p>Find me in app/views/users/index.html.erb</p>
|
||||
2
app/views/users/new.html.erb
Normal file
2
app/views/users/new.html.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
<h1>Users#index</h1>
|
||||
<p>Find me in app/views/users/new.html.erb</p>
|
||||
26
app/views/users/show.html.erb
Normal file
26
app/views/users/show.html.erb
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
|
||||
|
||||
<div class="user-container">
|
||||
<div class="profile">
|
||||
<div class="profile-pic">
|
||||
<% if @user&.photo&.url.nil? %>
|
||||
<%= image_tag "https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png", class: "img-circle"%>
|
||||
<% else %>
|
||||
<%= cl_image_tag @user.photo, class: "img-circle"%>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<div class="profile-text">
|
||||
<h1><%= @user.first_name %> <%= @user.last_name %></h1>
|
||||
<h2 class="italics" ><%= @user.email %></h2>
|
||||
</div>
|
||||
|
||||
<div class="flex-end">
|
||||
<%= link_to "Edit Information", user_edit_path(@user), class: "btn btn-primary" %>
|
||||
<%= link_to "Delete Account", user_path(@user), class: "btn btn-danger", method: :delete, data: {
|
||||
confirm: "Are you sure?"
|
||||
} %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user