diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb new file mode 100644 index 0000000..df5df52 --- /dev/null +++ b/app/helpers/members_helper.rb @@ -0,0 +1,17 @@ +module MembersHelper + def complete_profile(profile) + profile ? "Yes" : "No" + end + + def display_provider(provider) + provider ? provider.titleize : "Email" + end + + def display_user_name(user) + user.name.blank? ? details = "(Name not set yet)" : details = user.name + end + + def display_user_description(biography) + biography.blank? ? "Biography not set yet" : truncate(biography, length: 200, omission: '...') + end +end \ No newline at end of file diff --git a/app/views/directory/users/show.html.erb b/app/views/directory/users/show.html.erb index 60bdd0e..23ef737 100644 --- a/app/views/directory/users/show.html.erb +++ b/app/views/directory/users/show.html.erb @@ -161,10 +161,10 @@ <% end %> - <% end %> -
-
+
+
+ <% end %> <% unless @user.profile.twitter_handle.blank? %> @@ -189,9 +189,87 @@

- <% end %> + <% if current_user.admin? %> + + + <% end %> diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index a588237..65fe76a 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -68,19 +68,19 @@
-
+
+
+
Active Members and Counting
-
*
+
*
Channels
-
+
+
+
Messages Per Week (on average)
diff --git a/app/views/invitations/admin_index.html.erb b/app/views/invitations/admin_index.html.erb index ee96d0b..f1ebf43 100644 --- a/app/views/invitations/admin_index.html.erb +++ b/app/views/invitations/admin_index.html.erb @@ -5,7 +5,7 @@
-

Sent invitations [ADMIN]

+

Sent invitations - Admin view

Browse all invitations sent on MENAdevs
@@ -26,7 +26,9 @@ <% if @admin_invitations %> <%= render "admin_invitations_table", locals: { admin_invitations: @admin_invitations } %> - <%= paginate @admin_invitations %> +
+ <%= paginate @admin_invitations %> +
<% end %>
@@ -34,21 +36,3 @@ - - - -<%= javascript_include_tag "components/bs-datatable.js", "data-turbolinks-track" => false %> -<%= stylesheet_link_tag('bs-datatable', media: 'all', - 'data-turbolinks-track': false) %> - - diff --git a/app/views/members/index.html.erb b/app/views/members/index.html.erb index 3508f0d..b63e962 100644 --- a/app/views/members/index.html.erb +++ b/app/views/members/index.html.erb @@ -5,7 +5,7 @@
-

Platform users

+

Platform users - Admin view

@@ -29,7 +29,11 @@ Name + Profile + Provider Join date + Signed in last + Sign in count @@ -38,21 +42,29 @@ <%= image_tag(user.profile.avatar.url(:thumb), size: '50x50', class: 'img-thumbnail') %> - + <%= link_to directory_user_path(user) do %> - <%= user.name %> | <%= user.email %> - <% if user_signed_in? && current_user == user %> -
- <%= fa_icon("check") %> - me -
- <% end %> + <%= display_user_name(user) %> <% end %>
- <%= user.profile.biography %> + <%= user.email %> +
+ <%= display_user_description(user.profile.biography) %> + + + <%= complete_profile(user.profile.complete?) %> + + + <%= display_provider(user.provider) %> + + + <%= user.created_at.try(:strftime, '%a %e %b %Y') %> + + + <%= user.last_sign_in_at.try(:strftime, '%a %e %b %Y, %H:%m:%S') %> - - <%= user.created_at.strftime('%A %e %B %Y ') %> + + <%= user.sign_in_count %> <% end %> diff --git a/app/views/shared/_footer.html.erb b/app/views/shared/_footer.html.erb index 389824b..9e51f80 100644 --- a/app/views/shared/_footer.html.erb +++ b/app/views/shared/_footer.html.erb @@ -12,8 +12,11 @@
- Headquarters:
- No fixed office space, we're spread across Lebanon and the region
+ Headquarters: +
+ We have no fixed space as we are an online community. +
+ Our members are spread across the world but mainly clustered in the middle-east region.
@@ -26,12 +29,12 @@
-
+
Total Messages
-
+
Members
@@ -99,11 +102,6 @@ - - - - -
diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb index 0ac244e..aac5be4 100644 --- a/app/views/shared/_navbar.html.erb +++ b/app/views/shared/_navbar.html.erb @@ -74,7 +74,7 @@ <% end %> <%= content_tag(:li) do %> - <%= navbar_link_to('History', + <%= navbar_link_to('Invitations Archive', invitations_path) %> <% end %> <% end %>