Skip to content
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
83 changes: 41 additions & 42 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore uploaded files in development
/storage/*
!/storage/.keep

/node_modules
/yarn-error.log

/public/assets
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key

# Ignore .vscode
/.vscode

# Ignore all DS_Store file
```
# Dependencies
node_modules/

# Build artifacts
dist/
build/
*.css.map

# Cache directories
.sass-cache/
.tailwind/
.postcss-cache/

# Environment
.env
.env.local
*.env.*

# Logs
*.log

# Editor
.vscode/
.idea/
*.swp
*.swo

# OS
.DS_Store

TODO.task
# Ignore application configuration
/config/application.yml

coverage
Thumbs.db

# Ruby/Rails specific
*.gem
.bundle/
vendor/bundle/
.ruby-version
.rubocop.yml
coverage/
tmp/
log/
```
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ gem 'pg'
gem 'puma', '~> 4.3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Tailwind CSS for styling
gem 'tailwindcss-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
Expand All @@ -28,8 +30,7 @@ gem 'bcrypt', '~> 3.1.7'
# User slim for views
gem 'slim-rails'

# Use Bootstrap for CSS framework
gem 'twitter-bootstrap-rails', '~> 2.2.8'


# Wysiwig editor
gem 'tinymce-rails'
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// about supported directives.
//
//= require jquery3
//= require twitter/bootstrap
//= require rails-ujs
//= require activestorage
//= require turbolinks
Expand Down
3 changes: 2 additions & 1 deletion app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
* It is generally better to create a new file per style scope.
*
*= require_self
*= require bootstrap_and_overrides
*= require font-awesome
*= require jquery-ui
*= require jquery.jqplot/jquery.jqplot.min.css
*= require jqtree
*= require layout-base
*/

/* Tailwind imports will be handled via the tailwind.config.js and import in the main application layout */

5 changes: 5 additions & 0 deletions app/assets/stylesheets/application.tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom styles can go here */
2 changes: 1 addition & 1 deletion app/views/ahp_comparisons/_toolbar.html.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#toolbar.button-toolbar
button.btn.btn-primary Save
'
= link_to :back, class: 'btn' do
= link_to :back, class: "px-4 py-2 bg-blue-500 text-white rounded" do
i.icon-remove
| Close
2 changes: 1 addition & 1 deletion app/views/alternatives/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
== render partial: 'fields', locals: { form: alt_form }

#toolbar.button-toolbar
= alt_form.submit 'Save', class:"btn btn-primary"
= alt_form.submit 'Save', class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"

= link_to '<i class="icon-remove"></i> Cancel'.html_safe,
alternative_path(@alternative),
Expand Down
2 changes: 1 addition & 1 deletion app/views/alternatives/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
= render partial: 'table'

#toolbar.button-toolbar
= conditional_link_to new_article_alternative_path(@article), can?(:update, @article), class: "btn btn-primary"
= conditional_link_to new_article_alternative_path(@article), can?(:update, @article), class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"
| Add new alternative
2 changes: 1 addition & 1 deletion app/views/alternatives/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
= form_with model: [@article, @alternative] do |f|
== render partial: 'fields', locals: { form: f }
#toolbar.button-toolbar
= f.submit 'Save', class:"btn btn-primary"
= f.submit 'Save', class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"
= link_to '<i class="icon-remove"></i> Cancel'.html_safe,
article_alternatives_path(@article),
class:"btn"
4 changes: 2 additions & 2 deletions app/views/alternatives/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
= property.value

#toolbar.button-toolbar
= conditional_link_to edit_alternative_path(@alternative), can?(:update, @article), class:"btn btn-primary" do
= conditional_link_to edit_alternative_path(@alternative), can?(:update, @article), class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700" do
i.icon-edit
| Edit
= conditional_link_to new_article_alternative_path(@article), can?(:update, @article), class:'btn btn-primary' do
= conditional_link_to new_article_alternative_path(@article), can?(:update, @article), class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700" do
i.icon-plus
| Add new alternative

Expand Down
2 changes: 1 addition & 1 deletion app/views/articles/_article_content.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
.clearfix
br
#toolbar.button-toolbar
= conditional_link_to edit_article_path(@article), can?(:update, @article), class:'btn btn-primary'
= conditional_link_to edit_article_path(@article), can?(:update, @article), class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"
i.icon-edit
| Edit
-if current_user != @article.user
Expand Down
2 changes: 1 addition & 1 deletion app/views/articles/_form.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
= f.label :active, class: "checkbox"

#toolbar.button-toolbar
= f.submit 'Save', class:'btn btn-primary', disable_with: 'Please wait...'
= f.submit 'Save', class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700", disable_with: 'Please wait...'
= link_to @article, class:'btn' do
i.icon-remove
| Cancel
Expand Down
4 changes: 2 additions & 2 deletions app/views/bookmarks/_bookmark_form.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
| &nbsp;&nbsp;
| Bookmark:
-if user.following_articles.include? article
= link_to user_bookmark_path(current_user, id: article.id), method: :delete, remote: true, class: 'btn btn-small'
= link_to user_bookmark_path(current_user, id: article.id), method: :delete, remote: true, class: "px-3 py-1 bg-blue-500 text-white rounded text-sm"
i.icon-trash style="color: salmon"
-else
= link_to user_bookmarks_path(current_user, id: article.id), method: :post, remote: true, class: 'btn btn-small'
= link_to user_bookmarks_path(current_user, id: article.id), method: :post, remote: true, class: "px-3 py-1 bg-blue-500 text-white rounded text-sm"
| Add
4 changes: 2 additions & 2 deletions app/views/criteria/_table.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
.section style="padding-top:0px; padding-bottom:0px"
.btn-toolbar.button-toolbar.mid-section
.btn-group
= conditional_link_to edit_criterion_path(criterion.id), can?(:update, presenter.article), class:"btn btn-primary"
= conditional_link_to edit_criterion_path(criterion.id), can?(:update, presenter.article), class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"
i.icon-edit
| Edit
.btn-group
= conditional_link_to new_criterion_path(criterion), can?(:update, presenter.article),
class:"btn btn-primary",
class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700",
data: presenter.confirm_destroy_related_appraisals
i.icon-plus
| New subcriterion
Expand Down
2 changes: 1 addition & 1 deletion app/views/criteria/_toolbar.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
button.btn.btn-inverse.disabled
| Compare
- if can?(:update, presenter.article)
= link_to_comparison_method(presenter.comparison_type || 'AHPComparison', presenter, {class:'btn btn-primary', 'data-skip'=>true })
= link_to_comparison_method(presenter.comparison_type || 'AHPComparison', presenter, {class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700", 'data-skip'=>true })
button.btn.btn-primary.dropdown-toggle data-toggle='dropdown'
span.caret
ul.dropdown-menu
Expand Down
2 changes: 1 addition & 1 deletion app/views/criteria/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
== render partial: 'fields', locals: { form: f, criterion: @criterion, parent_id: @presenter.parent_id, cost: false }

#toolbar.button-toolbar
= f.submit 'Save', class:"btn btn-primary"
= f.submit 'Save', class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"
= link_to @criterion, class:"btn" do
i.icon-remove
| Cancel
Expand Down
2 changes: 1 addition & 1 deletion app/views/criteria/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
== render partial: 'fields', locals: { form: f, criterion: @criterion, parent_id: @presenter.parent_id, cost: false }
br
#toolbar.button-toolbar
= f.submit 'Save', class:"btn btn-primary"
= f.submit 'Save', class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"
' &nbsp;
= link_to criterion_path(@presenter.parent), class:'btn' do
i.icon-remove
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/confirmations/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
= f.label :email
= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email)
.button-toolbar
= f.submit "Resend confirmation instructions", class: 'btn btn-primary'
= f.submit "Resend confirmation instructions", class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"
= render "devise/shared/links"
2 changes: 1 addition & 1 deletion app/views/devise/passwords/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
= f.label :password_confirmation, "Confirm new password"
= f.password_field :password_confirmation, autocomplete: "new-password"
.button-toolbar
= f.submit "Change my password", class: 'btn btn-primary'
= f.submit "Change my password", class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"
= render "devise/shared/links"
2 changes: 1 addition & 1 deletion app/views/devise/passwords/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
.controls
= f.email_field :email, autofocus: true, autocomplete: "email"
.button-toolbar
= f.submit "Send me reset password instructions", class: 'btn btn-primary'
= f.submit "Send me reset password instructions", class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"

= render "devise/shared/links"
2 changes: 1 addition & 1 deletion app/views/devise/registrations/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
| (we need your current password to confirm your changes)
= f.password_field :current_password, autocomplete: "current-password"
.button-toolbar
= f.submit "Update", class: 'btn btn-primary'
= f.submit "Update", class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"

= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete
= link_to "Back", :back
2 changes: 1 addition & 1 deletion app/views/devise/registrations/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
= f.password_field :password_confirmation, class: 'form-control', autocomplete: "new-password"

.button-toolbar
= f.submit "Sign Up", class: 'btn btn-primary'
= f.submit "Sign Up", class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"

= render "devise/shared/links"

2 changes: 1 addition & 1 deletion app/views/devise/sessions/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
= f.label :remember_me, class: "checkbox"

.button-toolbar
= f.submit "Log in", class: 'btn btn-primary'
= f.submit "Log in", class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"

= render "devise/shared/links"
2 changes: 1 addition & 1 deletion app/views/devise/unlocks/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
= f.label :email
= f.email_field :email, autofocus: true, autocomplete: "email"
.button-toolbar
= f.submit "Resend unlock instructions", class: 'btn btn-primary'
= f.submit "Resend unlock instructions", class: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"

= render "devise/shared/links"
2 changes: 1 addition & 1 deletion app/views/direct_comparisons/_direct_form.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@
#toolbar.button-toolbar
button.btn.btn-primary Save
'
= link_to :back, class: 'btn' do
= link_to :back, class: "px-4 py-2 bg-blue-500 text-white rounded" do
i.icon-remove
| Close
20 changes: 10 additions & 10 deletions app/views/layouts/_footer.html.slim
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#footer-spacer
#footer
.container-fluid.clearfix
.row-fluid
.span1
.span2
h5 Foreplot
.span2
span.copyright © 2020 Foreplot
br
br
div 45832-19278
.container.mx-auto.px-4.py-6
.grid.grid-cols-1.md:grid-cols-3.gap-4
.col-span-1
.col-span-1
h5.font-bold.text-lg Foreplot
.col-span-1
span.copyright © 2020 Foreplot
br
br
div 45832-19278
Loading
Loading