Make sure you're working on the right branch, and the first time you push you may have to do:
git push -u origin searchpatterns
Code to generate list of pluralizations: inpho/model/entity.py
Populate list of pluralizations on site in templates/entity/entity.html
For now, you can stick this in the printAdminPanel after it does printAttr:
%for pattern in c.entity.pluralize():
## code to render checkbox for each
%endfor
The checkboxes need to submit the patterns to the list of search patterns. The URL to send to is c.entity.url(action='searchpatterns'). The JavaScript for submitting a pattern is in public/js/admin.js and can be found in the inpho.admin.submit_field function. You may want to write your own function though, which takes all the selected checkboxes and fires off the right AJAX request for each. There's quite a bit of code for updating the status icon in the inpho.admin.submit_field function. Code for deleting a pattern can be found in inpho.admin.remove.
Once you get the checkboxes rendering and submitting properly, the next step is wrapping the code in a Bootstrap "modal" and getting the modal to launch with a button.
First, when working on this part, let's create a new branch.
Make sure you're working on the right branch, and the first time you push you may have to do:
Code to generate list of pluralizations:
inpho/model/entity.py
Populate list of pluralizations on site intemplates/entity/entity.html
For now, you can stick this in theprintAdminPanel
after it does printAttr:The checkboxes need to submit the patterns to the list of search patterns. The URL to send to is
c.entity.url(action='searchpatterns')
. The JavaScript for submitting a pattern is inpublic/js/admin.js
and can be found in theinpho.admin.submit_field
function. You may want to write your own function though, which takes all the selected checkboxes and fires off the right AJAX request for each. There's quite a bit of code for updating the status icon in theinpho.admin.submit_field
function. Code for deleting a pattern can be found ininpho.admin.remove
.Once you get the checkboxes rendering and submitting properly, the next step is wrapping the code in a Bootstrap "modal" and getting the modal to launch with a button.