mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
Merge remote-tracking branch 'LaCasemate/master'
This commit is contained in:
commit
22982a2356
@ -1 +1 @@
|
||||
2.5.11
|
||||
2.5.14
|
||||
|
14
CHANGELOG.md
14
CHANGELOG.md
@ -1,5 +1,18 @@
|
||||
# Changelog Fab Manager
|
||||
|
||||
## v2.5.14 2017 September 12
|
||||
|
||||
- Fix a bug: Error message in fix:recursive_events_over_DST failed and does not report events to check
|
||||
|
||||
## v2.5.13 2017 September 11
|
||||
|
||||
- Fix a bug: ActiveRecord::RecordNotFound when running rake task fix:recursive_events_over_DST with recursive events which the initial event was deleted
|
||||
|
||||
## v2.5.12 2017 September 11
|
||||
|
||||
- Fix a bug: Long words overflow from homepage's events blocks
|
||||
- Fix a bug: ActiveRecord::RecordNotFound when running rake task fix:recursive_events_over_DST with non-recursive events
|
||||
|
||||
## v2.5.11 2017 September 7
|
||||
|
||||
- Added tooltip concerning images insertion while configuring the about page
|
||||
@ -16,6 +29,7 @@
|
||||
- Fix a bug: unable to see availabilities in the public calendar when browsing as a visitor (non-connected)
|
||||
- Updated puma for compatibility with openSSL > 1.0
|
||||
- Documented installation on ArchLinux
|
||||
- [TODO DEPLOY] `rake db:migrate`
|
||||
- [TODO DEPLOY] `rake db:seed` then `rake fablab:fix:migrate_admins_group`
|
||||
- [TODO DEPLOY] `rake fablab:fix:recursive_events_over_DST`
|
||||
|
||||
|
@ -619,3 +619,9 @@ body.container{
|
||||
.calendar-filter-aside {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.home-events {
|
||||
.event-description {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
@ -79,7 +79,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<section class="col-lg-12 wrapper">
|
||||
<section class="home-events col-lg-12 wrapper">
|
||||
<h4 class="text-sm m-t-sm">{{ 'fablab_s_next_events' | translate }} <a ui-sref="app.public.events_list" class="pull-right"><i class="fa fa-tags"></i> {{ 'every_events' | translate }}</a></h4>
|
||||
|
||||
<div class="row" ng-repeat="event in (upcomingEvents.length/3 | array)">
|
||||
@ -100,7 +100,7 @@
|
||||
<span class="v-middle badge text-xs" ng-class="'bg-{{event.category.name | lowercase}}'">{{event.category.name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<p ng-bind-html="event.description | simpleText | humanize : 500 | breakFilter"></p>
|
||||
<p class="event-description" ng-bind-html="event.description | simpleText | humanize : 500 | breakFilter"></p>
|
||||
|
||||
<hr/>
|
||||
<div class="row">
|
||||
|
@ -75,7 +75,7 @@ mkdir -p /apps/fabmanager/config
|
||||
```
|
||||
|
||||
Make a copy of the **docker/env.example** file and use it as a starting point.
|
||||
Set all the environment variables needed by your application. Please refer to the [FabManager README](https://github.com/LaCasemate/fab-manager/blob/master/README.md) for explanations about those variables.
|
||||
Set all the environment variables needed by your application. Please refer to the [FabManager README](https://github.com/LaCasemate/fab-manager/blob/master/README.md#environment-configuration) for explanations about those variables.
|
||||
|
||||
|
||||
Then, copy the previously customized `env.example` file as `/apps/fabmanager/config/env`
|
||||
|
@ -60,18 +60,30 @@ namespace :fablab do
|
||||
|
||||
task recursive_events_over_DST: :environment do
|
||||
include ApplicationHelper
|
||||
failed_ids = []
|
||||
groups = Event.group(:recurrence_id).count
|
||||
groups.keys.each do |recurrent_event_id|
|
||||
initial_event = Event.find(recurrent_event_id)
|
||||
Event.where(recurrence_id: recurrent_event_id).where.not(id: recurrent_event_id).each do |event|
|
||||
availability = event.availability
|
||||
if initial_event.availability.start_at.hour != availability.start_at.hour
|
||||
availability.start_at = dst_correction(initial_event.availability.start_at, availability.start_at)
|
||||
availability.end_at = dst_correction(initial_event.availability.end_at, availability.end_at)
|
||||
availability.save!
|
||||
if recurrent_event_id
|
||||
begin
|
||||
initial_event = Event.find(recurrent_event_id)
|
||||
Event.where(recurrence_id: recurrent_event_id).where.not(id: recurrent_event_id).each do |event|
|
||||
availability = event.availability
|
||||
if initial_event.availability.start_at.hour != availability.start_at.hour
|
||||
availability.start_at = dst_correction(initial_event.availability.start_at, availability.start_at)
|
||||
availability.end_at = dst_correction(initial_event.availability.end_at, availability.end_at)
|
||||
availability.save!
|
||||
end
|
||||
end
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
failed_ids.push recurrent_event_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if failed_ids.size > 0
|
||||
puts "WARNING: The events with IDs #{failed_ids} were not found.\n These were initial events of a recurrence.\n\n You may have to correct the following events manually (IDs): "
|
||||
puts "#{Event.where(recurrence_id: failed_ids).map(&:id)}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user