aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2018-02-01Fix yarn installation with no production for ci and force yarn install ↵Luc Donnet
before jest launch du to webpacker bug
2018-02-01Add env variable to disable ci:jest if needed. Refs #5802Alban Peignier
2018-01-31Fix Reflex importZog
2018-01-25ComplianceControlDecorator: Convert to new action links interfaceTeddy Wing
* Decorate the `ComplianceControl` so we can show the action links from the decorator in the header. * Add a `decorates` to get `object_class` to work inside the decorator. * Define `AF83::Decorator.define_instance_class_method` in order to enable the `@compliance_control.class.METHOD` calls in the view to work. Thanks very much to Johan for figuring out a way to do that. Refs #5586
2018-01-25AF83::Decorator::Link: Add `data-method` to HTML optionsTeddy Wing
Previously, we weren't correctly adding the HTTP method to the links in the header. This is because it's called `link_method` in the class. Put this value in `method`/`data-method` when converting the link to HTML so that the links work properly. Discovered this when deactivating and activating stop areas on http://stif-boiv.dev:3000/stop_area_referentials/1/stop_areas/139429 . Refs #5586
2018-01-25AF83::Decorator::Link: Delete `#default_class`Teddy Wing
This method was overriding classes that were added by `#add_class` in addition to those added by `#class`. Obviously, the argument to `#add_class` should be appended to the default. That seemed like a pain to do, so instead I'm getting rid of the concept of a default class. Instead, we're going to force all links to use the template-defined styles for now. That goes in line with Luc's desire to be more consistent in the links, as he stated yesterday. Refs #5586
2018-01-25PurchaseWindowDecorator: Convert to new action links interfaceTeddy Wing
Also add a new method `AF83::Decorator.define_instance_method`. Thanks to Johan for suggesting that and walking me through writing it. This new method allows us to define methods on the instance decorator. We need this to preserve the `#bounding_dates` method that was defined in `PurchaseWindowDecorator`. Refs #5586
2018-01-25AF83::Decorator::Link: Change #class? to #default_classTeddy Wing
Instead of checking for an existing class and then setting the class, provide a method to set a default class when one hasn't been defined. This does effectively the same thing but moves the condition inside the method. Thanks Johan for the suggestion! Refs #5586
2018-01-25Imports#index: Move 'New import' button to action linksTeddy Wing
Begin the process of converting the `ImportDecorator` to the new action links interface. For now, only the "New import" button on the top right of the index page is converted. The rest of the links are commented out for now and will be treated in a subsequent commit. Add a new `#class?` method to `AF83::Decorator::Link` that tells callers whether a CSS class has been defined on the link. This allows us to determine whether we should force a class or use the one provided in `_page_header.html.slim`. We need a way to specify the class of the link in the header because the "New import" button is supposed to be blue (`.btn-primary`), but the default for primary action links is white. Refs #5586
2018-01-25Refs #5586; CR #2Zog
2018-01-25Refs #5586 @2h; Fix specsZog
2018-01-25Refs 5586; CR #1Zog
2018-01-25Refs #5586; Add more specs on AF83::Decorator::LinkZog
2018-01-25Refs #5586; Add shortcut actions and refactor already migrated decoratorsZog
2018-01-25Refs #5586 @1h; Refactor ReferentialDecoratorZog
Plus: - Fix a bug on `html_options` in AF83::Decorator::Link - Add a `t` helper in AF83::Decorator to handle i18n
2018-01-25Refs #5586; Add a `feature` option on the `action_links`Zog
2018-01-25Refs #5586 @1.5h; Migrate more decoratorsZog
- Remove ApiKeyDecorator (never used) - Migrate CalendarDecorator - Migrate CompanyDecorator - Migrate TimeTableDecorator
2018-01-25Refs #5586 @1h; Migrate TimeTableDecoratorZog
2018-01-25refs #5586; Slight improvementsZog
2018-01-25Refs #5586 @1h; Ensure retrocompatibilityZog
And remove snapshots (we don't need it anymore)
2018-01-25Refs #5586 @2h; Refactor the whole thingZog
We now have a ModelDecorator and an "instance" decorator, all in the same file, with the same API.
2018-01-25Refs #5586 @2h; Better implementation of groupsZog
Used it in Lines#index and Lines#show, probably broke everything else
2018-01-25Refs #5586 @1h; Primary and secondary lonks implementationZog
As well as the `to_html` method
2018-01-25Refs #5586 @4h; First `action_links` refactorZog
- Implement new API - Migrate the LineDecorator - ensure no change on the "lines/index" view
2018-01-19Refs #5593; Fix typo5593-task-to-update-checksumZog
2018-01-17Refs #5593; Add same task for all referentials in given organisationZog
2018-01-17Refs #5593 @1h;Zog
- Register all models that implement checksums - Add a simple rake task that updates all checksums within a given referential
2018-01-07embed packs dir into release packageFlorent Peyraud
2018-01-07disable sqlite and tune install taskFlorent Peyraud
2018-01-07docker first commitFlorent Peyraud
2018-01-05Create LinePeriods to associate line ids with period array. Refs #5299Alban Peignier
2018-01-05Add Range#intersect?. Refs #5299Alban Peignier
2018-01-05Create first merge interface. Refs #5299Alban Peignier
2018-01-05Move (clean) period split logic into Range#remove. Refs #5299Alban Peignier
2017-12-21Refs #5361 @1H; Make company optional in Lines formZog
And handle the case when it is nil in the views
2017-12-21Refs #5430 @2h; Deactivate lines instead of destroying themZog
- Add `activate` and `deactivate` actions in `LinesController`, as well as corresponding routes - Add `activate!` and `deactivate!` methods in `Chouette::Line`, as well as `activated?` - Add `activate?` and `deactivate?` permissions in `LinePolicy` - Add corresponding `action_links`in the Decorator - Create helper for these actions - Add an optional `'extra_class` to the Links - Update styles for ".delete-action" to handle the case where there are several - Add I18n keys accordingly
2017-12-20Merge pull request #151 from ↵Luc Donnet
af83/5281-workbench-import-structural-bug-reading-zip 5281 workbench import structural bug reading zip
2017-12-20Merge pull request #124 from af83/5006-wb_import_filter_refs_with_foreign_linesLuc Donnet
5006 wb import filter refs with foreign lines
2017-12-20Merge branch 'master' into 5333-add-policies-for-referentials-sharing5333-add-policies-for-referentials-sharingAlban Peignier
2017-12-19Refs #5325@0.5h; Use policies for calendar sharingZog
Use policies to determine if a user is allowed to share a calendar, instead of a hardcoded string
2017-12-19Refs #5333@1.5h; Use permissions to sync StopAreas and LinesZog
- add missing policies - update permissions translator - update views to check for the permission - update views helper to check for the permission - uipdate controllers to check for the permission
2017-12-15Refs: #5006@0.7h; CR changes from #5006 & staring error_messages in imports/showRobert
- Renaming as requested STIF::NetexFile::Frame.get_line_object_id -> get_sgort_id - working on error_messages for imports#show
2017-12-14Refs #5006@0.5h; CR pass IVRobert
- simple simplification (as opposed to complicated simplifications ^^)
2017-12-14Refs #5006@0.5h; CR pass III / (ii)Robert
- refact of NetexFile#frames finished, got rid of mystery global $1
2017-12-14Refs #5006@0.5h; CR pass III / (i)Robert
- refact of NetexFile#frames
2017-12-14Refs #5006@0.5h; CR pass IIRobert
2017-12-14Refs #5006; CR pass IRobert
2017-12-14Fixes: #5006@10h;Robert
Implementation of Filtering Out Referentials with foreign lines in `app/workers/workbench_import_worker.rb` - Using ZipService with the set of allowed lines of the organisation - Fixing Integration Specs of the worker - Refactoring, Debugging and Rebasing
2017-12-14Refs: #5006@12h;Robert
Implementing allowed vs foreign line lookup for the zip service - Adapting `lib/stif/netex_file.rb` to expose the already implemented matching - `app/services/zip_service.rb` augmented to check for allowed lines and returning forbidden lines - Specs with fixtures and using the beforementioned new zip support in the specs - Fixture directories for the new specs
2017-12-14Refs: #5006@3h;Robert
Working out how to check for allowed lines vs. foreign lines - Implement allowed_lines as `Organisation#lines_set` - Pushed line_id related stuff into `lib/stif/codif_line_id.rb` - Related Specs