-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/main' into issue_448
# Conflicts: # db/schema.rb
- Loading branch information
Showing
81 changed files
with
1,664 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.2.1 | ||
3.2.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright (c) Universidade Federal Fluminense (UFF). | ||
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file. | ||
|
||
# frozen_string_literal: true | ||
|
||
class GrantsController < ApplicationController | ||
authorize_resource | ||
|
||
active_scaffold :grant do |config| | ||
config.create.label = :create_grant_label | ||
config.columns = [:title, :start_year, :end_year, :professor, :kind, :funder, :amount] | ||
config.actions.swap :search, :field_search | ||
config.columns[:professor].form_ui = :record_select | ||
config.columns[:kind].form_ui = :select | ||
config.columns[:kind].options = { | ||
options: Grant::KINDS, | ||
default: Grant::PUBLIC, | ||
include_blank: I18n.t("active_scaffold._select_") | ||
} | ||
config.columns[:amount].options[:format] = :currency | ||
config.columns[:start_year].options[:format] = "%d" | ||
config.columns[:end_year].options[:format] = "%d" | ||
config.actions.exclude :deleted_records | ||
end | ||
|
||
protected | ||
def do_new | ||
super | ||
unless current_user.professor.blank? | ||
@record.professor = current_user.professor | ||
end | ||
end | ||
end |
Oops, something went wrong.