Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
Completed articles dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
msdundar committed Jul 13, 2018
1 parent b9f0996 commit f8cc193
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 0 deletions.
100 changes: 100 additions & 0 deletions app/views/studies/articles/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<div class="row">
<div class="col-sm-6">
<div class="card">
<div class="card-body p-3 d-flex align-items-center">
<i class="fa fa-cogs bg-primary p-3 font-2xl mr-3"></i>
<div>
<div class="text-value-sm text-primary"><%= Article.unique_count %></div>
<div class="text-muted text-uppercase font-weight-bold small"><%= t('.article') %></div>
</div>
</div>
</div>
</div>
</div>

<div class="row">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<i class="fa fa-align-justify"></i> <%= t('.top_publishers') %>
</div>
<div class="card-body">
<ul class="list-group">
<% User.most_publishing.each do |user| %>
<li class="list-group-item"><%= user.identities.first.try(:first_name) %></li>
<% end %>
</ul>
</div>
</div>
</div>

<div class="col-sm-6">
<div class="card">
<div class="card-header">
<i class="fa fa-align-justify"></i> <%= t('.recently_added') %>
</div>
<div class="card-body">
<ul class="list-group">
<% Article.most_recent.each do |article| %>
<small><li class="list-group-item"><%= apa_citation(article) %></li></small>
<% end %>
</ul>
</div>
</div>
</div>

<div class="col-sm-12">
<div class="card">
<div class='card-header'>
<%= t('.number_of_articles_by_years') %>
</div>
<div class="card-body">
<%= line_chart Article.active.group(:year).count %>
</div>
</div>
</div>


<div class="col-sm-6">
<div class="card">
<div class='card-header'>
<%= t('.publications_by_index_types') %>
</div>
<div class="card-body">
<%= column_chart Article.active.group(:index).count %>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<div class='card-header'>
<%= t('.publications_by_publication_types') %>
</div>
<div class="card-body">
<%= column_chart Article.active.group(:type).count %>
</div>
</div>
</div>

<div class="col-sm-6">
<div class="card">
<div class='card-header'>
<%= t('.publications_by_language') %>
</div>
<div class="card-body">
<%= pie_chart Article.active.group(:language_of_publication).count %>
</div>
</div>
</div>

<div class="col-sm-6">
<div class="card">
<div class='card-header'>
<%= t('.publications_by_number_of_authors') %>
</div>
<div class="card-body">
<%= bar_chart Article.active.group(:number_of_authors).count %>
</div>
</div>
</div>
</div>
19 changes: 19 additions & 0 deletions app/views/studies/dashboard/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<nav class="nav">
<%= link_to studies_articles_path, class: 'nav-link' do %>
<%= t('.articles') %>
<% end %>
<%= link_to studies_projects_path, class: 'nav-link' do %>
<%= t('.projects') %>
<% end %>
<%= link_to studies_certifications_path, class: 'nav-link' do %>
<%= t('.certifications') %>
<% end %>
</nav>
</div>
</div>
</div>
</div>
17 changes: 17 additions & 0 deletions config/locales/models/studies/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
en:
studies:
dashboard:
index:
articles: Articles
projects: Projects
certifications: Certifications
articles:
index:
article: Article
top_publishers: Top Publishing Academics
recently_added: Recently Added Articles
number_of_articles_by_years: Number of Articles by Years
publications_by_index_types: Publications by Index Types
publications_by_publication_types: Publications by Publication Types
publications_by_language: Publications by Publication Language
publications_by_number_of_authors: Publications by Number of Authors
17 changes: 17 additions & 0 deletions config/locales/models/studies/tr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
tr:
studies:
dashboard:
index:
articles: Makaleler
projects: Projeler
certifications: Sertifikalar
articles:
index:
article: Makale
top_publishers: En Çok Makalesi Olanlar
recently_added: En Son Eklenen Makaleler
number_of_articles_by_years: Yıllara Göre Makale Sayısı
publications_by_index_types: Index Türüne Göre Makaleler
publications_by_publication_types: Yayın Türüne Göre Makaleler
publications_by_language: Yayın Dili Göre Makaleler
publications_by_number_of_authors: Yazar Sayısına Göre Makaleler

0 comments on commit f8cc193

Please sign in to comment.