Commit graph

177 commits

Author SHA1 Message Date
Oleksii Kriuchykhin
3376fd012c Improve error loggin in protocol import [SCI-3023] 2019-02-07 14:00:24 +01:00
Jure Grabnar
6ec2c99a28 Hound styling 2018-11-26 13:52:01 +01:00
Jure Grabnar
0086e4dcf3 Catch some of templates error when import protocols.io 2018-11-26 13:43:05 +01:00
Jure Grabnar
1c7a051551 Catch all errors on PIO import and show message 2018-11-23 20:47:48 +01:00
Zanz2
b26530a02f Found a new, and more elegant fix inside controller with Luka 2018-08-28 14:48:23 +02:00
zmagod
db1944cc90 move maximum file size limit to an ENV variable [fixes SCI-2415] 2018-06-19 14:15:14 +02:00
okriuchykhin
fc06f8c60b
Merge pull request #1055 from okriuchykhin/ok_SCI_2250
Skip asset if file is missing in protocol export [SCI-2250]
2018-03-26 14:19:49 +02:00
zmagod
c61efb0624 rename before_acton hook 2018-03-26 13:07:00 +02:00
Oleksii Kriuchykhin
ecd3c73772 Skip asset if file is missing in protocol export [SCI-2250] 2018-03-25 13:36:24 +02:00
zmagod
c46da5cc67 fixes import protocol bug for guest user [fixes SCI-2197] 2018-03-19 16:10:28 +01:00
mz3944
bb21f6543c
Merge pull request #1004 from mz3944/mz-SCI-2011
Wrapping up the permissions [SCI-2011]
2018-03-06 07:10:40 +01:00
Zanz2
29aea1ebd2 refactored according to PR 2018-02-21 16:17:53 +01:00
Matej Zrimšek
b8b9707c06 Fixed protocol and archive permission calls, fixed result permissions; module group managing is now also allowed on newly created groups; other permission call fixes and some refactoring. 2018-02-19 14:51:14 +01:00
Matej Zrimšek
7b07e7b347 Fixed protocol in repository permissions, and refactored it a bit. 2018-02-16 12:04:11 +01:00
Matej Zrimšek
6ba226d514 Added missing '?' to the canaid permission calls that were missing it. 2018-02-16 11:12:30 +01:00
Matej Zrimšek
5bda53eebf Overall refactoring of all canaid permissions and code related to their calls. 2018-02-16 10:54:06 +01:00
Zanz2
c963c948a1 Fixed main issue, bad step structure now gets fixed to empty template 2018-02-15 23:28:20 +01:00
Zanz2
95501eb046 saving work for later 2018-02-15 20:01:36 +01:00
Matej Zrimšek
1182ce5da1 Fixed experiment level permission checks in the controllers. 2018-02-14 14:19:22 +01:00
Matej Zrimšek
d6e7ef465c Grouped remaining permissions for experiment, protocol, task, and partially step levels. [SCI-1964] 2018-02-14 14:19:22 +01:00
Matej Zrimšek
854333b0e6 Grouped permissions for experiment with canaid gem (WIP). 2018-02-14 14:19:00 +01:00
Zanz2
367eff6401 re-pushing this, this got merged into master already but i accidentally deleted it when merging two branches 2018-02-07 11:17:53 +01:00
Zanz2
dac59cf4d0 Refactored to PR, deleted unrelated things 2018-02-06 09:06:33 +01:00
Zanz2
e8f6dc0d24
Merge pull request #962 from Zanz2/missing_error_SCI1993
A red error messagge is now displayed when not selecting protocol [SCI-1993]
2018-01-26 16:00:15 +01:00
Zanz2
4ee51959eb fixed hound 2018-01-26 09:56:59 +01:00
Zanz2
346f9feaef Refactored pull request, but also just did a quick fix on a bug where special characters in titles of steps (% & #) got escaped by sanitize helper, now the string gets sanitized first, then the special characters get unescaped by CGI. unescape html 2018-01-26 09:34:58 +01:00
Zanz2
24e772d7e5 Merge branch 'steps_order_SCI1816' of https://github.com/Zanz2/scinote-web into steps_order_SCI1816 2018-01-26 08:26:38 +01:00
Zanz2
fc541147c8 A red error messagge is now displayed when selecting no protocol and pressing upload on protocols io import, and after the modal is closed the messagge is gone 2018-01-25 15:54:38 +01:00
Zanz2
7fe1c20ebe Finished the protocol reorder functions and implemented them 2018-01-24 09:31:43 +01:00
zmagod
f8a3fca2db Merge branch 'master' of https://github.com/biosistemika/scinote-web into decoupling 2018-01-23 11:06:33 +01:00
mlorb
99185871c4 fix naming things 2018-01-05 15:15:50 +01:00
mlorb
0d37f9c85a refactor clone protocol permission 2017-12-14 14:18:16 +01:00
mlorb
f6d36ae6a2 refactor update protocol type in repository 2017-12-14 14:18:16 +01:00
mlorb
806fcbce36 refactor update protocol in repository permission 2017-12-14 14:18:16 +01:00
mlorb
e0d1ae174e refactor read protocol in repository permission 2017-12-14 14:18:15 +01:00
mlorb
43c01b74b1 refactor create protocol permission 2017-12-14 14:18:14 +01:00
mlorb
a0b2d3f5ef refactor read_team permission 2017-12-14 14:18:14 +01:00
Zanz2
835ac6910f Code refactor part 1 2017-12-02 00:29:47 +01:00
Zanz2
bb8aef3b73
Merge pull request #893 from Zanz2/step_desc_2small_SCI-1833
Fixed validations lengths and added workarounds for bugs [SCI-1833]
2017-11-24 17:55:20 +01:00
Zmago Devetak
027f4a5921
Merge pull request #890 from ZmagoD/zd_SCI_1651
export and import RTE images
2017-11-24 16:28:28 +01:00
Zanz2
dc5904aed9 Fixed this jira issue and added workarounds for bugs 2017-11-24 01:45:40 +01:00
Zanz2
f577bf93b5 Fixed pull request review 2017-11-21 19:20:15 +01:00
zmagod
91fec89cab adds tiny_mce_assets to protocol export 2017-11-21 16:30:48 +01:00
Zanz2
d8c809ffd0 Reviewed pull request 2017-11-20 23:19:34 +01:00
Zanz2
cf66d94d45 Reworked functions into one function, defined all protocols.io attributes as dynamic constants, applied length checking to all protocols.io attribute fields 2017-11-20 00:59:32 +01:00
Zanz2
fa25a6785b Made the propper files and functionality for the text truncation to function 2017-11-17 02:43:32 +01:00
Zanz2
b2e1623cf1 Merge branch 'master' of https://github.com/biosistemika/scinote-web into validations_cutoff_SCI-1784 2017-11-16 20:04:12 +01:00
Zanz2
c44465817d Added the functions and put in limitations from my validations files, changed controller name, added some locals 2017-11-16 20:03:44 +01:00
Zanz2
1b540a75a1 Fixed to use .megabytes 2017-11-16 15:17:13 +01:00
Zanz2
41c1193a78 Fixed unit error;Now when comparing file size, both are in bytes 2017-11-16 01:34:38 +01:00
mlorb
288e3ddcbd
Merge pull request #877 from mlorb/ml-sci-1190
Fix bug when removing all keywords in protocol [SCI-1190]
2017-11-15 11:22:18 +01:00
Mojca Lorber
c2a5b52767 fix bug when removing all keywords in protocol 2017-11-14 15:04:37 +01:00
Zanz2
6b9a10ffe4 Made validations for JSON format and .txt and .json files 2017-11-14 12:02:17 +01:00
Zanz2
f35ab78849 Added some code to make the two seperate jira issues work together (protocol info and scinote tables 2017-11-14 00:56:39 +01:00
Zanz2
b265beb386
Merge pull request #864 from Zanz2/move_desc
Move protocol.io protocol description to step 1 of protocols [SCI-1695]
2017-11-13 10:07:01 +01:00
Zanz2
23d3ffa5a4 Fixed PR 2017-11-12 15:48:45 +01:00
Zanz2
e7384ac38d Code review fixes, made seperate helper file 2017-11-12 15:31:04 +01:00
Zanz2
fa2c0fe556 merging 2017-11-09 18:55:17 +01:00
Zanz2
812fa3f1d5 Hopefully this will resolve my merge problems 2017-11-09 17:42:17 +01:00
Zanz2
aa03a889c7 Fixed PR review 2017-11-03 16:28:15 +01:00
Zanz2
de9a3a1d0d Preview tables are now functional but with inline javascript , ugly styling and a few major bugs (they dont display fully until you click on them, and i dug deep on the handson table wiki and hot table wiki for issues like this, and while they exist, idk how to implement the solutions because they use angular js mostly 2017-10-28 23:57:29 +02:00
Zanz2
2413dc251a Added new preview tables code 2017-10-28 02:19:22 +02:00
Zanz2
a732c8afa7 Code for protocol repository scinote table elements view 2017-10-26 17:28:27 +02:00
Zanz2
79e0a11054 Fixed before start and link not displaying in protocol description 2017-10-25 17:39:01 +02:00
Zanz2
19b9da2e83 deleted comment 2017-10-24 19:44:34 +02:00
Zanz2
49501b3d3d Finished review refactor 2017-10-24 19:24:53 +02:00
Zanz2
67b09adaeb Fixed last few rubocop errors 2017-10-17 19:43:46 +02:00
Zanz2
6cf775a4b1 Refactored code, made html render on preview too 2017-10-17 19:27:20 +02:00
Zanz2
e72c1bebcb deleted comments 2017-10-12 19:18:22 +02:00
Zanz2
8d0d6f0502 refactored methods 2017-10-12 19:10:16 +02:00
Zanz2
21036a1081 Deleted unnecesarry if's 2017-10-12 17:22:02 +02:00
Zanz2
414a15872c Made seperate method for steps mapping 2017-10-12 17:15:43 +02:00
Zanz2
5d667f146e Moved .js form reset and made a standalone description method 2017-10-11 17:59:09 +02:00
Zanz2
8720222ac2 Added sanitising for all input, this escapes javascript too as far as i know (sanitize_input function from sanitize helper) 2017-10-07 22:45:01 +02:00
Zanz2
183c93d21b Refactoring to git review specifications 2017-10-07 22:13:31 +02:00
Zanz2
9655c98566 Github review refactor 2017-10-07 20:47:05 +02:00
Zanz2
f5b2ad0d34 Refactor github code review 2017-10-07 16:07:04 +02:00
Zanz2
66e5004e60 Changed import text to be inside en.yml, as said in the code review, deleted some blank lines 2017-10-07 15:56:43 +02:00
Zanz2
b23ca33e73 Deleted todo-list comments :D 2017-09-26 16:46:17 +02:00
Zanz2
c72cf6320a Finished rubocop refactoring 2017-09-26 16:19:09 +02:00
Zanz2
8d961c934a Rubocop refactored part of the controller code 2017-09-26 13:17:00 +02:00
Zanz2
2bfe8f0b95 Testing why rubocop gives errors 2017-09-25 15:27:24 +02:00
Zanz2
292c1e3c31 Fixed bug, seems like unconssistent indexes instead of hash values can also happen in steps that arent first 2017-09-25 14:14:27 +02:00
Zanz2
11b2ef3112 Made code nicer, hopefully not unintentionally breaking something 2017-09-25 13:53:32 +02:00
Zanz2
dd4d4072e8 Made code more aesthetic 2017-09-22 16:02:56 +02:00
Zanz2
6ebdea5dce Fixed old workaround with inconsistent protocols.io json formatting and made the workaround nicer (now its only one if statement, instead of one whole block of duplicated code) 2017-09-22 15:12:29 +02:00
Zanz2
deef790951 added validations to controllers (file too big, names too big), some javascript error messagges, and fixed some nil exceptions in controllers appending nil strings to descriptions 2017-09-22 11:56:50 +02:00
Zanz2
1dbb03e22d Added all the fields into description of protocol steps and protocol itself, need to make protocols description format nicer 2017-09-21 16:05:33 +02:00
Zanz2
f48833c47a added format .js response which hides the preview modal and refreshes the page with protocolsDatatable.ajax.reload(); 2017-09-21 08:40:05 +02:00
Zanz2
d59234a1e3 minor changes, working on refresh after submit 2017-09-20 16:04:52 +02:00
Zanz2
72c707ae88 protocol importing into database works, still need to decide how to add other fields from protocols.io to step description and protocol description, but that can be added easily, and need to make it refresh after submit 2017-09-20 15:31:10 +02:00
Zanz2
7b85d74a23 added jquery code to reset file selector selected file after it is canceled in the preview modal 2017-09-20 09:32:31 +02:00
Zanz2
3812b2e64b Removed on modal hide refresh, no longer needed, works without data gets updated without refresh since its not passed by javascript locals anymore 2017-09-20 08:58:00 +02:00
Zanz2
ea8f3e822d Removed all the html bug workarounds since it is now fixed (strip tags and remove " now gone 2017-09-20 08:38:34 +02:00
Zanz2
7aba782639 optimised code so i dont need javascript locals anymore and working to fix infamous html tags bug where second modal doesnt show 2017-09-19 15:02:16 +02:00
Zanz2
f861b1fc52 Configured the controller,the main task ahead is to figure out how to import all of the data i have available 2017-09-15 15:52:55 +02:00
Zanz2
5d6cc341ed added first half of inputs, working on scroller next, page now refreshes after you cancel out of import window, to update the data, will look for alternate way after im done 2017-09-14 14:42:04 +02:00
Zanz2
29b9d50363 Modals now popup correctly trough ajax, added js file for this functionality, and two partials which are reused from existing importer 2017-09-14 11:30:53 +02:00
Zanz2
9fc91aac32 added protocols io upload preview modal 2017-09-13 16:04:16 +02:00
Zanz2
b7432b336a added file upload popup modal, rails routes and controller functions, deleted old standalone model and controller 2017-09-13 15:15:08 +02:00