mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-10 00:11:22 +08:00
Fix activities [SCI-1412]
This commit is contained in:
parent
b830be3ec6
commit
e474cda03a
5 changed files with 5 additions and 6 deletions
|
|
@ -60,7 +60,6 @@ function initFormSubmitLinks(el) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable loading bars */
|
/* Enable loading bars */
|
||||||
Turbolinks.enableProgressBar();
|
|
||||||
$(document)
|
$(document)
|
||||||
.bind("ajaxSend", function(){
|
.bind("ajaxSend", function(){
|
||||||
animateLoading();
|
animateLoading();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
class ActivitiesController < ApplicationController
|
class ActivitiesController < ApplicationController
|
||||||
include ActivityHelper
|
include ActivityHelper
|
||||||
|
|
||||||
before_filter :load_vars
|
before_action :load_vars
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@per_page = Constants::ACTIVITY_AND_NOTIF_SEARCH_LIMIT
|
@per_page = Constants::ACTIVITY_AND_NOTIF_SEARCH_LIMIT
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ module Users
|
||||||
|
|
||||||
before_action :check_invite_users_permission, only: :invite_users
|
before_action :check_invite_users_permission, only: :invite_users
|
||||||
|
|
||||||
before_filter :update_sanitized_params, only: :update
|
before_action :update_sanitized_params, only: :update
|
||||||
|
|
||||||
def update
|
def update
|
||||||
# Instantialize a new team with the provided name
|
# Instantialize a new team with the provided name
|
||||||
|
|
|
||||||
|
|
@ -64,12 +64,11 @@ class Activity < ApplicationRecord
|
||||||
]
|
]
|
||||||
|
|
||||||
validates :type_of, presence: true
|
validates :type_of, presence: true
|
||||||
validates :project, :user, presence: true
|
|
||||||
|
|
||||||
belongs_to :project, inverse_of: :activities, optional: true
|
belongs_to :project, inverse_of: :activities
|
||||||
belongs_to :experiment, inverse_of: :activities, optional: true
|
belongs_to :experiment, inverse_of: :activities, optional: true
|
||||||
belongs_to :my_module, inverse_of: :activities, optional: true
|
belongs_to :my_module, inverse_of: :activities, optional: true
|
||||||
belongs_to :user, inverse_of: :activities, optional: true
|
belongs_to :user, inverse_of: :activities
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ if ENV['PAPERCLIP_STORAGE'] == "s3"
|
||||||
original: :private,
|
original: :private,
|
||||||
medium: :private
|
medium: :private
|
||||||
},
|
},
|
||||||
|
s3_region: ENV['AWS_REGION'],
|
||||||
s3_storage_class: {
|
s3_storage_class: {
|
||||||
medium: :reduced_redundancy,
|
medium: :reduced_redundancy,
|
||||||
thumb: :reduced_redundancy,
|
thumb: :reduced_redundancy,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue