Skip to content

[UI/UX] some random small enhancements 💅 #679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2023
Merged
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
1 change: 1 addition & 0 deletions app/admin/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
end
column :entry_date
column :member_uid
column :tag_list
end
end
end
Expand Down
10 changes: 7 additions & 3 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ html {
}

.content {
margin-bottom: 76px;
margin-bottom: 120px;
}

.actions-menu {
margin-bottom: 16px;
padding: 0 15px;
margin-bottom: 10px;
padding: 0 10px;

@media(max-width: $screen-sm-min) {
padding: 0;
Expand Down Expand Up @@ -670,6 +670,10 @@ label[required]::after{
margin: 0 !important;
}

.organization-logo {
padding-top: 120px;
}

.input__password-eye {
display: flex;
align-items: center;
Expand Down
7 changes: 0 additions & 7 deletions app/assets/stylesheets/application/member-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@
}
}

&__tags {
a {
margin-left: 4px;
color: white;
}
}

&__activity {
font-size: 14px;
color: #78adb9;
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def organization_logo
return unless org && org.logo.attached?
return if "#{controller_name}##{action_name}".in? %w(organizations#index pages#show)

content_tag(:div, class: "row") do
content_tag(:div, class: "row organization-logo") do
image_tag(org.logo.variant(resize: "x200^"), class: 'img-responsive center-block')
end
end
Expand Down
50 changes: 22 additions & 28 deletions app/views/inquiries/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h1>
<%= Inquiry.model_name.human(count: :many) %>
<%= render "shared/show_filter_hint" %>
</h1>
</div>
<div class="row">
<div class="col-md-12">
<h1>
<%= Inquiry.model_name.human(count: :many) %>
<%= render "shared/show_filter_hint" %>
</h1>
</div>
</div>

<div class="container-fluid">
<div class="row">
<%= render "shared/post_filters", base_path: inquiries_path %>
<div class="row">
<%= render "shared/post_filters", base_path: inquiries_path %>

<div class="col-md-4">
<% if current_user && current_organization && !params[:org] %>
<ul class="nav navbar-nav pull-right">
<li>
<%= link_to new_inquiry_path do %>
<%= glyph :plus %>
<%= t "helpers.submit.create", model: Inquiry.model_name.human %>
<% end %>
</li>
</ul>
<% end %>
</div>
<div class="col-md-4">
<% if current_user && current_organization && !params[:org] %>
<ul class="nav navbar-nav pull-right">
<li>
<%= link_to new_inquiry_path do %>
<%= glyph :plus %>
<%= t "helpers.submit.create", model: Inquiry.model_name.human %>
<% end %>
</li>
</ul>
<% end %>
</div>
</div>

<div class="container-fluid inquiries">
<div class="row">
<div class="col-md-12">
<%= render "shared/posts", posts: @inquiries %>
</div>
<div class="row">
<div class="col-md-12">
<%= render "shared/posts", posts: @inquiries %>
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions app/views/inquiries/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<% if @inquiry.organization == current_organization %>
<p class="actions text-right">
<div class="actions text-right">
<% if admin? or @inquiry.user == current_user %>
<%= render 'shared/post_actions', post: @inquiry %>
<% end %>
</p>
</div>
<% end %>
<%= render "shared/post", post: @inquiry %>
4 changes: 3 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
<%= render 'navbar' %>
<div class="container content">
<%= render 'layouts/messages' unless devise_controller? %>
<%= yield %>
<div class="container-fluid">
<%= yield %>
</div>
<%= organization_logo %>
</div>
<div class="modal fade" id="modal">
Expand Down
8 changes: 3 additions & 5 deletions app/views/multi_transfers/step.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
<% end %>

<div class="form-group">
<div class="container">
<div class="row">
<div class="col-md-2 col-md-offset-10">
<button class="btn btn-primary btn-lg"><%= @is_last_step ? t('global.create') : t('global.next') %></button>
</div>
<div class="row">
<div class="col-md-2 col-md-offset-10">
<button class="btn btn-primary btn-lg"><%= @is_last_step ? t('global.create') : t('global.next') %></button>
</div>
</div>
</div>
Expand Down
50 changes: 22 additions & 28 deletions app/views/offers/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h1>
<%= Offer.model_name.human(count: :many) %>
<%= render "shared/show_filter_hint" %>
</h1>
</div>
<div class="row">
<div class="col-md-12">
<h1>
<%= Offer.model_name.human(count: :many) %>
<%= render "shared/show_filter_hint" %>
</h1>
</div>
</div>

<div class="container-fluid">
<div class="row">
<%= render "shared/post_filters", base_path: offers_path %>
<div class="row">
<%= render "shared/post_filters", base_path: offers_path %>

<div class="col-md-4">
<% if current_user && current_organization && !params[:org] %>
<ul class="nav navbar-nav pull-right">
<li>
<%= link_to new_offer_path do %>
<%= glyph :plus %>
<%= t "helpers.submit.create", model: Offer.model_name.human %>
<% end %>
</li>
</ul>
<% end %>
</div>
<div class="col-md-4">
<% if current_user && current_organization && !params[:org] %>
<ul class="nav navbar-nav pull-right">
<li>
<%= link_to new_offer_path do %>
<%= glyph :plus %>
<%= t "helpers.submit.create", model: Offer.model_name.human %>
<% end %>
</li>
</ul>
<% end %>
</div>
</div>

<div class="container-fluid offers">
<div class="row">
<div class="col-md-12">
<%= render "shared/posts", posts: @offers %>
</div>
<div class="row">
<div class="col-md-12">
<%= render "shared/posts", posts: @offers %>
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions app/views/offers/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% if @offer.organization == current_organization %>
<p class="actions text-right">
<div class="actions text-right">
<% if admin? or @offer.user == current_user %>
<%= render 'shared/post_actions', post: @offer %>
<% end %>
Expand All @@ -10,6 +10,6 @@
<%= t ".give_time_for" %>
<% end %>
<% end %>
</p>
</div>
<% end %>
<%= render "shared/post", post: @offer %>
88 changes: 42 additions & 46 deletions app/views/petitions/manage.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h1><%= t('petitions.applications') %></h1>
</div>
<div class="row">
<div class="col-md-12">
<h1><%= t('petitions.applications') %></h1>
</div>
</div>

Expand Down Expand Up @@ -31,49 +29,47 @@
</div>
</div>

<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-hover table-condensed panel">
<thead>
<tr>
<th></th>
<th><%= 'ID' %></th>
<th><%= t('activerecord.attributes.user.username') %></th>
<th><%= User.human_attribute_name(:email) %></th>
<th><%= User.human_attribute_name(:phone) %></th>
<% if current_user.manages?(current_organization) && @status == 'pending' %>
<th>
<span class="glyphicon glyphicon-hand-down"></span>
<%= t("global.table.actions") %>
</th>
<% end %>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<%= content_tag(:tr) do %>
<% petition = user.petitions.where(organization_id: current_organization.id).last %>
<td><%= image_tag avatar_url(user.user) %></td>
<td><%= user.id %></td>
<td><%= user.username %></td>
<td><%= user.email %></td>
<td><%= phone_to user.phone %></td>
<% if current_user.manages?(current_organization) && @status == 'pending' %>
<td>
<%= link_to t('terms.accept'), petition_path(id: petition.id, status: 'accepted'), class: 'btn btn-primary', method: :put %>
<%= link_to t('global.decline'), petition_path(id: petition.id, status: 'declined'), class: 'btn btn-danger', method: :put %>
</td>
<% end %>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-hover table-condensed panel">
<thead>
<tr>
<th></th>
<th><%= 'ID' %></th>
<th><%= t('activerecord.attributes.user.username') %></th>
<th><%= User.human_attribute_name(:email) %></th>
<th><%= User.human_attribute_name(:phone) %></th>
<% if current_user.manages?(current_organization) && @status == 'pending' %>
<th>
<span class="glyphicon glyphicon-hand-down"></span>
<%= t("global.table.actions") %>
</th>
<% end %>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<%= content_tag(:tr) do %>
<% petition = user.petitions.where(organization_id: current_organization.id).last %>
<td><%= image_tag avatar_url(user.user) %></td>
<td><%= user.id %></td>
<td><%= user.username %></td>
<td><%= user.email %></td>
<td><%= phone_to user.phone %></td>
<% if current_user.manages?(current_organization) && @status == 'pending' %>
<td>
<%= link_to t('terms.accept'), petition_path(id: petition.id, status: 'accepted'), class: 'btn btn-primary', method: :put %>
<%= link_to t('global.decline'), petition_path(id: petition.id, status: 'declined'), class: 'btn btn-danger', method: :put %>
</td>
<% end %>
<% end %>
</tbody>
</table>
</div>
<div class="paginate-align">
<%= paginate @users %>
</div>
<% end %>
</tbody>
</table>
</div>
<div class="paginate-align">
<%= paginate @users %>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/shared/_post.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<p></p>
<% if post.tags.present? %>
<% post.tags.each do |tag| %>
<span class="badge alert-success">
<span class="badge alert-info">
<%= glyph(:tag) %>
<%= link_to [post.class, tag: tag] do %>
<%= tag %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_post_actions.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= link_to [:edit, post], class: "btn btn-warning" do %>
<%= link_to [:edit, post], class: "btn btn-default" do %>
<%= glyph :pencil %>
<%= t "global.edit" %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_post_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@
required: true %>
</div>
<% end %>
<%= f.button label_button, class: "btn btn-default", style: "margin-bottom: 20px;" %>
<%= f.button label_button, class: "btn btn-default" %>
<% end %>
10 changes: 6 additions & 4 deletions app/views/shared/_posts.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
</span>
<% end %>
<% (post.tags || []).each do |tag| %>
<%= glyph :tag %>
<%= link_to [post.class, tag: tag] do %>
<%= tag %>
<% end %>
<span class="badge alert-info">
<%= glyph :tag %>
<%= link_to [post.class, tag: tag] do %>
<%= tag %>
<% end %>
</span>
<% end %>
</small>
</p>
Expand Down
10 changes: 2 additions & 8 deletions app/views/terms/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
<header class="page-header">
<h1>
<%= @document.title %>
</h1>
<h1><%= @document.title %></h1>
</header>

<%= m @document.content %>

<%= form_tag accept_terms_path, method: :post do %>
<button class="btn" type="submit">
<%= t '.accept' %>
</button>
<% end %>
<%= button_to t('.accept'), accept_terms_path, class: "btn btn-primary" %>
2 changes: 1 addition & 1 deletion app/views/users/_member_card.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<%= t('.no_activity') %>
<% end %>
<% member.tags[0..2].each do |tag| %>
<span class="to-member-card__header__text__tags">
<span class="badge alert-info">
<%= link_to users_path tag: tag do %>
<%= glyph :tag %>
<%= tag&.truncate(29) %>
Expand Down
Loading