Commit graph

2110 commits

Author SHA1 Message Date
Henne Vogelsang
0646e41a82
Merge pull request #2632 from esparta/delegation_for_conference_venue
Introducing Delegation for Conference-Venue properties
2021-03-06 19:21:36 +01:00
Espartaco Palma
f5986f4160
Using new accessor for city, country_name, venue name & street 2021-03-06 19:06:36 +01:00
Espartaco Palma
fd2635509f
Introducing delegation for city and country name (Conference - Venue
Using ActiveSupport delegate macro.
2021-03-06 19:06:36 +01:00
Espartaco Palma
490ea3c4b4
DRY on controllers/conferences_controller
Conferences.incoming is defined on the model as scope:

  scope :upcoming, (-> { where('end_date >= ?', Date.current) })
Conference.past

  scope :past, (-> { where('end_date < ?', Date.current) })
2021-03-06 19:00:47 +01:00
Stella Rouzi
780d37eb41
Enable datepicker for readonly fields
Remove minDate definition, so that value appears in readonly input
2021-03-06 12:48:50 +01:00
Stella Rouzi
7495ca89ef
Change font for registration item in user menu 2021-03-06 12:48:47 +01:00
Stella Rouzi
cb7519f7a4
Check CfP existence in proposal form 2021-03-06 12:38:02 +01:00
Henne Vogelsang
823f41427f
Merge pull request #2591 from openSUSE/remove-travel-schedule
Remove travel schedule from registration
2021-03-06 05:04:07 +01:00
James Mason
7a04f3582f
Remove travel schedule from registration
(cherry picked from commit d18cc02f0185df39bb4213d8a63a955dfb433dcb)
Re: https://github.com/openSUSE/osem/issues/2333
2021-03-06 04:09:02 +01:00
Espartaco Palma
e7452a9d31
Use New Install within their own template
It used to be a partial inside #index, but having their own page
yields some extra benefits:

- Performance: Move logic from the view to the controller
  - Theres' no need to go extra steps inside the :index view
- UI: Remove the extra 'Upcoming Conferences' when the system needs
  to start the flow of the creation of the first user
2021-03-06 03:58:32 +01:00
Hiroshi SHIBATA
ae98ac1430
Fixed some typos (#2695)
* Fix typos
2020-10-30 11:06:43 +02:00
Thomas Schmidt
588884bace
update jquery-ui-rails 2020-09-29 00:41:18 +02:00
James Mason
754c47e41b
Merge pull request #2656 from AndrewKvalheim/ajax-datatables-rails-293-postgresql
Fix bug in UserDatatable query affecting PostgreSQL
2020-06-19 19:07:18 -07:00
Tymm Schmitke
aa99f909a6 Add uniqueness tests for Event scope on Vote model with User association 2020-05-19 22:24:37 -04:00
Andrew Kvalheim
4182b6fb8f Fix bug in UserDatatable query affecting PostgreSQL
Resolves:

    $ docker-compose run --rm osem bundle exec rspec ./spec/datatables/user_datatable_spec.rb:97
    …
    ActiveRecord::StatementInvalid:
    PG::GroupingError: ERROR:  column "users.id" must appear in the GROUP BY clause or be used in an aggregate function
2020-04-04 10:35:56 -07:00
Andrew Kvalheim
d3e73b103f Document workaround for jbox-web/ajax-datatables-rails#293 2020-04-04 10:35:44 -07:00
Stella Rouzi
e38cfc55c4
Merge pull request #2586 from rahul2240/bug1
add condition for booth rejection mail
2020-01-07 00:34:38 +02:00
Brian
2d31ababaa
Correct variable error
Line 30 was missing the `@` in `@event.speakers.any`, which caused a 500 error when clicking on a session in the program. Corrected the typo.
2019-12-20 10:38:14 -05:00
Brian
b828a9d6c6
fixes redirect loop
Redirecting users to `/account/sign_in` caused a redirect loop which crashed the page, but still adds them to the `users` table correctly.. Forcing users to the `root_path` solves the redirect loop.
2019-12-20 08:26:22 -05:00
Henne Vogelsang
1ce66a55bc
Merge pull request #2596 from snpd25/branch1
Supports talks without speakers
2019-10-31 12:52:20 +01:00
Stella Rouzi
8cf9c15a46 Revert change of active user definition
Closes #2560

Active users are needed for selectize, and the active definition changed to show recent users in #2297

This reverts that change, and provides
* active scope (user not disabled)
* recent scope (for use in #2297 changes, ie user distribution)
2019-10-24 18:34:12 +03:00
snpd
997dc668e0 Supports talks without speakers
Admins may want to have discussions or any other general activity
that does not have any particular speaker. Thus, speaker validation
is removed.

Closes https://github.com/openSUSE/osem/issues/2520
2019-10-23 14:50:28 +05:30
Rahul
c1941ff35e add if condition to send booth rejection mail 2019-08-23 17:47:56 +05:30
Ana María Martínez Gómez
86440cb956
Merge pull request #2578 from rahul2240/master-alias
add booth in alias
2019-08-10 18:41:34 +02:00
Rahul
bf7a7932ba add booth in alias
Booth can be replaced with any alias by replacing it in alias.en.yml.
2019-08-10 21:40:25 +05:30
Stella Rouzi
31ade45529
Merge pull request #2562 from rahul2240/update-button
Add render in update method
2019-07-21 18:29:31 +03:00
Rahul
49c59f1d7a add render in update method
render edit is added so that error and flash message could trigger after the form is submitted.
2019-07-21 20:43:26 +05:30
Rahul
341128c573 update condition to pluck users for booth responsibles
Earlier we used active scope to pluck users for booth responsibles, that allows all users except those whose last seen are 3 months or more and are their is_disabled field is false but now we allow all users except those with is_disabled field false to be booth responsible.
2019-07-21 20:23:04 +05:30
Henne Vogelsang
c5ad9525ed
Merge pull request #2551 from esparta/using_polimorfic_for_not_signed_abilities
Improve overall performance on not_signed abilities
2019-07-17 16:20:02 +02:00
Espartaco Palma
6421916784
Avoid the use of :pluck on not_signed abilities
When using :pluck, ActiveRecord trigger the query immediately.
The above is a behavior we probably want to avoid, because
implies a query to the database regarless of the role or
permission.

** Before

    osem_1      | 07:39:11 web.1    | Started GET "/" for 172.20.0.1 at 2019-07-1207:39:11 +0000
    osem_1      | 07:39:11 web.1    |    (0.3ms)  SELECT
    "conferences"."custom_domain" FROM "conferences" WHERE
     ("conferences"."custom_domain" IS NOT NULL) ORDER BY start_date DESC
    osem_1      | 07:39:11 web.1    | Processing by ConferencesController#index as HTML
    osem_1      | 07:39:11 web.1    |    (1.3ms)  SELECT "events"."id" FROM
    "events" WHERE "events"."state" = $ 1  [["state", "confirmed"]]
    osem_1      | 07:39:11 web.1    |   ↳ app/models/ability.rb:39:in `not_signed_in'
    osem_1      | 07:39:11 web.1    |   Rendering layouts/application.html.haml
    osem_1      | 07:39:11 web.1    |   Rendering conferences/index.html.haml within layouts/application

** After

    osem_1      | 07:43:18 web.1    | Started GET "/" for 172.20.0.1 at 2019-07-1207:43:18 +0000
    osem_1      | 07:43:19 web.1    |    (0.2ms)  SELECT
    "conferences"."custom_domain" FROM "conferences" WHERE
     ("conferences"."custom_domain" IS NOT NULL) ORDER BY start_date DESC
    osem_1      | 07:43:19 web.1    | Processing by ConferencesController#index as HTML
    osem_1      | 07:43:19 web.1    |   Rendering layouts/application.html.haml
    osem_1      | 07:43:19 web.1    |   Rendering conferences/index.html.haml  within layouts/application
2019-07-16 22:24:20 -07:00
Ana María Martínez Gómez
014ff1acc3
Use new changed? Rails method
`attribute_changed?` inside of after callbacks has changed his
behaviour. The new return value will reflect the behavior of calling the
method after `save` returned. To maintain the current behavior, I have
`saved_change_to_attribute?` instead.
2019-07-17 00:13:24 +02:00
Ana María Martínez Gómez
085e33f495
Use url instead object in image_tag
Before Rails 5.2, it was possible to pass an uploader object to
`image_tag` and Rails guessed the url. With Rails 5.2 this is not
possible anymore.
2019-07-17 00:13:24 +02:00
Ana María Martínez Gómez
af1d5e4a3b
Do no use string in if conditional
Passing string to be evaluated in :if and :unless conditional options is
not supported. Pass a symbol for an instance method, or a lambda, proc
or block, instead.
2019-07-17 00:13:24 +02:00
Ana María Martínez Gómez
f7d7bfb2e2
Merge pull request #2476 from differentreality/url_helpers_in_switch_checkbox
Use helpers instead of URLs in switch checkboxes
2019-06-04 17:12:32 +02:00
Ana María Martínez Gómez
47ce659a2f
Merge pull request #2374 from openSUSE/depfu/update/shoulda-matchers-4.0.1
Update shoulda-matchers: 3.1.2 → 4.0.1 (major)
2019-06-03 09:23:52 +02:00
Ana María Martínez Gómez
9303375f7e
Merge pull request #2525 from Ana06/fix_event_registrations
Fix event registatrion for rooms without size
2019-06-01 11:09:42 +02:00
Stella Rouzi
b590bc4145
Use helpers instead of URLs in switch checkboxes
Absolute URLs may be potentially breaking functionality, eg in case of
sub-directory installation.

Fixes https://github.com/openSUSE/osem/issues/2472

Co-authored-by: Ana María Martínez Gómez <anamaria@martinezgomez.name>
2019-05-31 00:24:21 +02:00
Ana María Martínez Gómez
f64cd7323f
Do not use readonly checkboxes to render information
Just render `Yes` or `No` instead of a disabled checkbox with these two
options in the recent users section of conference#index.
2019-05-31 00:24:14 +02:00
Ana María Martínez Gómez
51c8af42ab
Fix event registatrion for rooms without size
If the room size is not set (which is possible as the size is not
mandatory), the events registrations page breaks because of a
comparison of nil with Integer.
2019-05-31 00:12:15 +02:00
Henne Vogelsang
e6049adc52
Fix gigitty link
The modal didn't really work on mobiles. On mobiles you also need the schedule
link because it's hard to point your mobile to a QR code on your mobile...
2019-05-24 15:19:37 +02:00
Henne Vogelsang
7338bc2648
Skip CSRF authenticity
The way we are handling adding commercials (preload with javascript)
leads to an outdated token otherwise.
2019-05-24 14:08:23 +02:00
Henne Vogelsang
84b25e3a54
Remove protect_from_forgery
This is handled in ApplicationController
2019-05-24 14:07:39 +02:00
Henne Vogelsang
4dc618810b
Point to Giggity from the schedule page
Tell users that they can also view schedules in an android app.
2019-05-24 11:37:03 +02:00
Ana María Martínez Gómez
b8013661a2
Use render plain instead text
`render text` is deprecated and it has been remvoed from Rails 5.1.
2019-05-13 17:15:31 +02:00
Ana María Martínez Gómez
7473e889ee
Define ticket_purchases before through association
In the User model, a has_many :through association
'User#physical_tickets' which goes through 'User#ticket_purchases' was
defined before the through association was defined. This doesn't work in
Rails 5.1.
2019-05-05 09:40:50 +02:00
Ana María Martínez Gómez
41d6fad7a5
s/redirect_to :back/redirect_back/
`redirect_to` has been removed in Rails 5.1 in favor of:

```
redirect_back(fallback_location: root_path)
```
2019-05-05 09:40:50 +02:00
Ana María Martínez Gómez
ca32024268
s/skip_before_filter/skip_before_action/
`skip_before_filter` was deprecated in Rails 4.2 and removed in Rails
5.1 in favor of `skip_before_action`.
2019-05-05 09:40:49 +02:00
Ana María Martínez Gómez
a8d2f8caa4
Drop halt_callback_chains_on_return_false
ActiveSupport.halt_callback_chains_on_return_false= is deprecated and
will be removed in Rails 5.2. Stop using it and return `throw(:abort)`
instead in the callbacks which need it.
2019-05-05 09:40:49 +02:00
Ana María Martínez Gómez
b3716985f0
Stop using reload argument in associations
Deprecated force reload argument in association readers is deprecated
and has been removed in Rails 5.1:

09cac8c67a
2019-05-05 09:40:09 +02:00
Ana María Martínez Gómez
0837b34369
Fix incorrect format in xml dates
Dates where using (some years ago) iso8601 without taking the timezone
into account, as reported in:

https://github.com/openSUSE/osem/issues/1188

When trying to fix the issue, the date was converted to an incorrect
format which took timezone into account in:

73a6e06fd3

Come back to use iso8601 but taking the timezone into account.

Really fixes https://github.com/openSUSE/osem/issues/1188
Fixes https://github.com/openSUSE/osem/issues/2510
2019-05-02 16:32:54 +02:00