summaryrefslogtreecommitdiffstats
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix typo in concert class, eventling -> eventlinkHarald Eilertsen2022-03-091-1/+1
|
* Merge remote-tracking branch 'andrea/andreaschanges' into devHarald Eilertsen2022-03-095-27/+163
|\ | | | | | | And fixup most whitespace issues while at it.
| * import giglog checks for empty values and ivnalid dateAndreaChirulescu2022-03-011-32/+53
| |
| * iCal file download fixes to generate one file per concertAndreaChirulescu2022-02-276-476/+263
| | | | | | | | giglog import fixes to catch errors and ignore old concerts
| * Merge branch 'ical' of ↵AndreaChirulescu2022-02-211-0/+176
| |\ | | | | | | | | | | | | | | | | | | | | | | | | https://code.volse.net/wordpress/plugins/gigologadmin.git into andreaschanges # Conflicts: # composer.json # composer.lock # giglogadmin.php
| | * Add sample ical export module.Harald Eilertsen2022-02-211-0/+176
| | | | | | | | | | | | | | | Currently just uses sample from iCalcreator docs, but shows how it can be done, and how to hook it into WordPress.
| * | beginning of ical setup with kigkonsults calendarAndreaChirulescu2022-02-211-0/+162
| | |
| * | Pagination fix to resest page if out of rangeAndreaChirulescu2022-02-131-1/+6
| |/
* | Fix various psalm errors.Harald Eilertsen2022-03-095-5/+7
| |
* | Some cleanup in render_concerts_tableHarald Eilertsen2022-02-221-33/+23
|/
* Fix so pagination remembers filters in shortcode too.Harald Eilertsen2022-02-131-4/+4
|
* Remember filter settings when paginating.Harald Eilertsen2022-02-131-33/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does changes quite a bit of how things work under the hood. It changes the filter settings from using POST to using query args in a GET request instead. This has some challenges: 1. The query args from the form will overwrite any query args in the original URL, so we have to keep the query args that was passed in as hidden fields in the form. 2. Since we try to keep the passed in query args, we need to filter out the query args that we expect to set in the form, otherwise query args that are dropped by the form will still be present as hidden args. Not too happy about how this works tbh, but at least it seems to work reasonably well for now. I've also renamed the args set by the form to make the URL a bit nicer, i.e "city" instead of "selectcity" etc for the query arg keys. I've also refactored quite a bit to make the code more manageable. Like using the view helper to create the month selector, so it's consistent with the others, and remembers it's selection. (I also simplified it to simply list the months from jan to dec, instead of starting at the current month. If it's important to keep the old behaviour I'll change it back.) There's a few problems still with this implementation. 1. It only works in the admin-section for now. Not sure why. Probably because shortcodes... 2. In the admin section it gains the `cid` and `pid` query args that should not be there. Not sure why. 3. If we change the filters while being on a page larger than the total number of pages after the filter change, we stay on the page even if it's not a valid page after the filter change. This should be trivial to fix.
* Refactor rendering of the concerts table.Harald Eilertsen2022-02-121-58/+79
| | | | | | | | The main render function was getting too large and difficult to work with. Splitting it up a little to make it more manageable. Also fix styling to make the pagination links fall on one line a bit nicer.
* Make a count method for concerts.Harald Eilertsen2022-02-121-27/+54
| | | | | | This allows querying the database for the count of concerts that will match a given filter. Useful to find the total number of pages in a pagination setting, for instance.
* Fix pagination of concert table.Harald Eilertsen2022-02-121-6/+7
| | | | | | | There's potential vulnerabilities here still, and I'm unsure if get_permalink() is entirely safe to use in this context. Seems to do the right thing, but the docs for the function indicates it has some edge cases.
* More indentation and format if statements.Harald Eilertsen2022-02-121-124/+134
|
* Fix indentation and add license info.Harald Eilertsen2022-02-121-0/+5
|
* more pagination details fixesAndreaChirulescu2022-02-112-26/+61
|
* css small fixed for table displayAndreaChirulescu2022-02-094-86/+133
| | | | added pagination to concert list
* Added a div to make table scrollable on mobilesAndreaChirulescu2021-09-241-2/+2
|
* Changed order of date column in concerts tableAndreaChirulescu2021-09-191-4/+3
|
* Padding in table so text doesn't connect between cellsAndreaChirulescu2021-09-192-2/+7
| | | | Added a paragraph to have a bit of space under filters
* Add CSRF checks to new venue formHarald Eilertsen2021-09-172-0/+8
|
* Move New Venue form to a separate partial.Harald Eilertsen2021-09-173-9/+45
|
* Return better error for failed CSRF check on import.Harald Eilertsen2021-09-171-2/+2
|
* Add CSRF checks for edit concert form.Harald Eilertsen2021-09-172-1/+9
|
* Clean up, fix and rename db tables.Harald Eilertsen2021-09-163-91/+68
| | | | | | | | | | | | | | | | | This patch got a bit more involved than what was originally planned, but since we're messing with the tables I decided to do it all right away. - Moves the constraint definition to the CREATE TABLE statement for the concerts table. This replaces the existing KEY definition that it had. - Make sure the venues table is created before the concerts table so that the above mentioned constraint definition works. - Rename the tables. Use the wpdb-prefix and make the name a bit prettier. This caused some changes in the Concert and Venue classes, and for slightly silly reasons some test classes. The code actually turned out better (for the most part), but some refactoring can still be done. The column names remains unchanged for now.
* Reinsert created and updated columns for venues.Harald Eilertsen2021-09-161-0/+2
| | | | Was accidentally dropped during rewrite of base schema.
* Facelift of database table creation to use create tables instead of ↵AndreaChirulescu2021-09-131-323/+17
| | | | versioning. First attempt
* Change how we load the plugin.Harald Eilertsen2021-09-111-8/+3
| | | | | | | | | | | | | | Since we now have code that should be available, both on the public blog and in the admin section, we need to be more graular when loading the various parts of the plugin. We still try to avoid loading admin-only parts for the public blog, but allways load the parts that we need in either case. Also avoid running the db migrations when running unit tests, as the schema is copied over from the dev environment it just caues problems. Finally, don't hardcode unit tests to always be in_admin, but rather determine that for each test.
* tests: Make an actual test for ConcertsTableHarald Eilertsen2021-09-111-3/+3
| | | | | | | | | | | There's a bit of setup to make this work as it should, we need to ensure that the current user and current screen is set to proper values so that the WordPress api's `is_admin()` and `current_user_can()` work as they should. This first test just tests that all the expected forms are being rendered for the admin user accessing the table through the site admin interface.
* Fix indentation again.Harald Eilertsen2021-09-091-8/+10
|
* changes reagding mail sending on concert status changesAndreaChirulescu2021-09-071-14/+13
|
* Fixed wording in mails sent when concerts are assigned/unassingedAndreaChirulescu2021-09-061-4/+29
| | | | Added mailing for when concert status changes. Not sure how to get line break in text mails AND concert status as text
* Fix show only own concerts again.Harald Eilertsen2021-09-061-1/+1
| | | | Missed quitation marks around search term.
* Merge remote-tracking branch 'andrea/andreaschanges' into devHarald Eilertsen2021-09-061-2/+2
|\
| * fixed proper class naming for Apply buttonAndreaChirulescu2021-09-061-1/+1
| |
| * removed some extra characters that got lost in table HTMLAndreaChirulescu2021-09-061-1/+1
| |
* | Refactor Concert::find_concerts.Harald Eilertsen2021-09-061-23/+28
|/ | | | | Make it a bit more compact and fix use of $wpdb->prepare for `currentuser` filter.
* Remove logging from Venue class.Harald Eilertsen2021-09-061-8/+0
| | | | Move logging to presentation/logic layer if necessary.
* Throw instead of log error from Concert class.Harald Eilertsen2021-09-061-14/+9
| | | | | Should get rid of most of the annoying output during testing, and allow moving error handling and logging to the presentation layer.
* Use find_concerts to check for duplicates on create.Harald Eilertsen2021-09-061-5/+24
| | | | This also adds a number of new filters to find_concerts.
* Remove obsolete function Concert::findHarald Eilertsen2021-09-061-13/+0
|
* Use wpdb::get_row in Concert::get()Harald Eilertsen2021-09-061-4/+4
| | | | | Makes it clearer that we're just fetching _one_ row from the database. Also updated doc comment to hopefully be a bit clearer.
* Remove unneccesary code to sort single concert by date.Harald Eilertsen2021-09-061-1/+0
|
* Fix indentation and whitespace, add braces where missing.Harald Eilertsen2021-09-061-41/+46
|
* Merge remote-tracking branch 'andrea/andreaschanges' into devHarald Eilertsen2021-09-051-4/+5
|\
| * added images for checkbox and rediconAndreaChirulescu2021-09-051-4/+5
| | | | | | | | added class for City dropdown form
* | security: Add proper CSRF checking for the import_gigs form.Harald Eilertsen2021-09-051-3/+7
|/
* used auto ident this timeAndreaChirulescu2021-09-051-165/+165
|