summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Staff.pm
AgeCommit message (Collapse)AuthorFilesLines
2018-01-06Add bb2text() and use it for release notes & open graph tagsYorhel1-1/+1
2017-01-19Add Open Graph tags for the main page and vrspcflan1-1/+6
2016-07-03Generalize substring search relevance + apply to most dropdown searchesYorhel1-15/+1
This is a generalization of the search improvements made in 7da2edeaa0f6cf7794f4f8f68960497dc1be893c and 92235222dba4e5d0c7713d53ef12e0f10e371b83 And has been applied to the dropdown searches for producers, staff, tags and traits. For all those searches, exact matches are listed first, followed by prefix matches, and then substring matches. Relevance is currently only based on the primary name/title and ignores aliases (except for staff). This is fixable, but not trivial, and I'm not sure it's all that useful.
2016-07-03Various staff search improvementsYorhel1-15/+20
- Exact match is now case-insensitive - Main staff search supports exact match with =-prefix - On VN edit dropdown: exact matches are sorted before other matches - VN edit dropdown now also displays original name
2016-07-02JS: Use alias ID in dropdown search to fix selectionYorhel1-1/+1
2016-01-23L10N: Intern all VNDB::Handler::* stuffYorhel1-41/+41
Most of these replacements were automated. This ended up being less work than I had anticipated. I also fixed a few minor bugs along the way, but probably introduced more than I fixed.
2016-01-20L10N: Intern all VNDB::Util::* stuffYorhel1-11/+12
With some related edits in other parts of the code, mostly due to interface changes to htmlRevision() and htmlFormError(). Trivial replacements were automated by a super awesome script.
2016-01-19Move some VNDB::L10N stuff to VNDB::Func + intern VNDB::FuncYorhel1-2/+2
2016-01-17L10N: Intern blood_types/genders/(char|staff)_roles/discussion_boardsYorhel1-4/+4
I definitely needed the Tie::IxHash thing for these.
2016-01-17Use Tie::IxHash for some global.pl listsYorhel1-1/+1
This removes the reliance on sort() to provide meaningful ordering (the keys aren't always good for ordering) and removes the 'order' hack used for (vn|prod)_relations.
2016-01-16L10N: Intern languages/platforms/resolutions/media/ptype/rtype/vnlengthYorhel1-5/+5
2015-12-30Add release filters to VN browserYorhel1-2/+4
2015-11-01Remove deprecated 'staffedit' permission flagYorhel1-1/+1
2015-10-25Staff: Add error msg when removing used alias + fix bug in alias editingYorhel1-1/+7
The new database schema doesn't allow an alias to be removed when it is still linked to a VN.
2015-10-21SQL: Fix editing + func.sql + triggers.sql + autocreate editing funcsYorhel1-4/+4
This changes quite a bit to the way the editing functions work. Because these functions are very repetitive and it's easy to keep things out of sync, I created a script to generate them automatically. I had to rename a few function and table names for consistency to make this work. Since database entries don't have a 'latest' column anymore, and since the order in which tables are updated doesn't have to be fixed, I dropped many of the SQL triggers and replaced them with a edit_committed() function which is called from edit_*_commit() and checks for stuff to be done. Don't forget to run 'make' before importing the update script.
2015-10-17SQL: Fix all browsing queries to use the new schemaYorhel1-6/+6
This basically makes VNDB browsable again, but editing entries is still broken. I split off the get-old-revision functionality from the db*Get() methods into db*GetRev(). This split makes sense even with the old SQL schema: db*Get() had to special-case some joins/filters when fetching an older revision, and none of the other filters would work in that case. This split does cause some code duplication in that all db*GetRev() methods look very much alike, and that the columns they fetch is almost identical to the db*Get() methods. Not sure yet how to avoid the duplication elegantly. I didn't do a whole lot of query optimization yet (most issues require extra indices, I'll investigate later which indices will make a big difference), but I did fix some low hanging fruit whenever I encountered something. I don't think I've worsened anything, performance-wise.
2015-10-03formValidate: Add json_(maxitems|unique|sort) options to json templateYorhel1-5/+3
Adds slightly more strict validation and simplifies further processing.
2015-10-03Handle JSON data natively when processing form dataYorhel1-9/+5
No more need for extra json_encode/json_decode calls, and the form_compare() function is more lenient w.r.t. integer/string comparison. This is the improvement I described in commit ed86cfd12b0bed7352e2be525b8e63cb4d6d5448
2015-09-20formValidate(): Let's just allow a '0' id - fix more errorsYorhel1-2/+2
Looks like 0 is actually used often to indicate some special value. Affects basically all 'check all' boxes (had to modify some of those boxes because some used -1, but that wasn't a problem).
2015-09-20Handler::Staff: Fix validation error on primary alias IDYorhel1-1/+1
It can be 0 when creating a new alias as primary name.
2015-09-20formValidate: Add json template and remove json_validate() functionYorhel1-8/+7
This is less convenient than I had expected, because all the form handling code is designed to work with plain strings rather than any scalar. This means the json data has to be encoded again to get into $frm (not doing this means that, if the form didn't validate, the field won't be filled out correctly). And then decoded for validation, and then encoded again for comparison. I suspect the better solution is to fix the form handling code to handle arbitrary data structures: comparison can be done by deep comparison rather than a simple string compare, and the form generator can auto-encode-to-json if it sees a complex object. Another advantage of this solution is that the comparison function can be less strict with respect to number formatting. In the current scheme you have to be very careful that numbers are not automatically coerced into string format, otherwise the comparison will fail. Either way, that's an idea for the future...
2015-09-20formValidate: Created templates for gtin and editsum fieldsYorhel1-2/+1
2015-09-20Update usage kv_validate() to upcoming TUWF 1.0Yorhel1-9/+8
And added new 'page' and 'id' templates for more strict validation.
2015-09-17Rename jsonEncode/Decode to C-style namingYorhel1-2/+2
CamelCase is used for methods, C-style names for functions. I'm just nitpicking now.
2015-09-17Created json_validate() for JSON form data, used for Staff alias editorYorhel1-17/+11
The intention is to move more JS editing forms to use JSON, but manually verifying JSON objects is both painful and likely to introduce errors or vulnerabilities. json_validate() is a bit of a hack, but has the advantage that its validation syntax is the same as for normal forms, and it automatically strips whitespace. I intent to give kv_validate() an upgrade to be more flexible/modular so it can do more custom normalization. But that's for later. I've been meaning to rewrite the JS forms anyway together with the large JS rewrite, but I'm rather lazy. This is one small step in the right direction anyway. Note that json_validate() assumes that the JS code will provide user-friendly messages on bad input, but the staff alias editor doesn't quite do this yet.
2015-05-13Changed layour of staff pagesYorhel1-127/+105
Not entirely sure if this is an improvement, but it's slightly more consistent with other layouts (combination of user page, release page and character page), and leaves more room for the credit/cast listings.
2015-02-27staff: Manually stripe credit list on staff pagesmorkt1-3/+4
2015-02-16Various staff improvementsmorkt1-1/+4
(Quoting mail:) - character list is sorted by name in cast edit form (managing of the huge lists like v6458 becomes slightly easier); - display number of characters voiced on seiyuu page; - display a notice in staff edit form when primary name could be changed.
2015-02-14Revamp staff alias editing interface + fix reverting removed aliassesmorkt1-29/+23
The new alias editing interface makes it a lot easier to change the primary name.
2015-02-04Handler::Staff: Remove spaces around aliassesmorkt1-0/+1
2015-02-03Conditionally append char IDs in seiyuu editor + minor fixesmorkt1-1/+2
2015-02-02Add filters to staff browsers + minor layout fix on staff pagesmorkt1-13/+22
2015-01-28Apply bbSubstLinks to database description fieldsYorhel1-0/+1
2015-01-25staff: Add staff edit permission + alias layoutingmorkt1-8/+11
2015-01-12staff: Remove some remnants of the staff imagesYorhel1-1/+0
2015-01-12staff: Stronger verification of form datamorkt1-13/+15
2015-01-04staff: Add some link fields and guidelinesmorkt1-11/+26
2015-01-03staff: Various JS fixesmorkt1-1/+1
2015-01-02staff: Don't allow empty staff revisionsYorhel1-0/+1
2015-01-02staff: Fix warning of comparison against undefYorhel1-1/+1
2015-01-02staff: Fix deleting of staff + use JSON to pass data + minor fixesmorkt1-14/+21
2014-12-29staff: Some bug fixes and styling improvementsmorkt1-27/+53
2014-12-28staff: Import cast from other VN + some styling + more improvementsmorkt1-54/+55
2014-12-28More progress on the staff + cast DBmorkt1-34/+47
2014-12-24Further progress on the staff databasemorkt1-66/+1
- Moves staff<->vn linking form to the main VN edit form - Fixes a bug with linking staff aliases to VNs - Adds staff changes to the VN revisions - And some misc. improvements
2014-12-22Initial implementation of a staff/seiyuu databasemorkt1-0/+412