I have searched the issue queue here and not found a similar issue, please trash if already a duplicate or what ever other filter it fails.
Under "Output this field as a link" we now have the option to "Replace spaces with dashes" I did back flips! But I am sorrily missing Transform Case upper / lower.
I don't know if this is small over site or something that was explicitly kicked to the curb.
| Comment | File | Size | Author |
|---|---|---|---|
| #31 | 1180510-6.x-3.x.patch | 4.91 KB | Jorrit |
| #26 | 1180510-Case-option-under-Output-this-field-as-a-link.patch | 5.59 KB | mstrelan |
| #23 | 1180510-views-3.x-transform-case-8.patch | 5.08 KB | roam2345 |
| #21 | 1180510-views-3.x-transform-case-7.patch | 4.49 KB | roam2345 |
| #19 | 1180510-views-3.x-transform-case-6.patch | 4.51 KB | dawehner |
Comments
Comment #1
roam2345 commentedHere is a patch that works.
Followed the logic and pattern thats behind the argument case transformation way of handling this.
Comment #2
roam2345 commentedArrrg here is the correct patch file.
Comment #3
roam2345 commentedclosed duplicate issue http://drupal.org/node/1180820
I need to rerole this patch as I was not getting
to work for me, so I changed that to
In any case we have two candidates.
Comment #4
dawehnerPowered by Dreditor.
Can you fix the code style of else {} and the whitespaces? This would be cool.
Powered by Dreditor.
Comment #5
roam2345 commentedFixed white space and issue with switch and parameter passed along, as well as the else code style.
Here is the adjusted patch of latest dev branch.
Comment #6
roam2345 commentedstatus change
Comment #7
dawehnerCan't we give case_transform $this->options['alter']['case']
This would be much more elegant/reusable/testable/orthogonal
Sorry but this seems to be for much better.
Powered by Dreditor.
Comment #8
roam2345 commentedFollowed really what is happening else where as in views_handler_argument_string.inc we have.
and
It depends where we want "$this->options['alter']['case']" in the switch or on the parameter?
Comment #9
dawehnerFrom my perspective in the parameter.
Comment #10
roam2345 commentedSuper here it is and removed some more white space i missed need "Dreditor" white space highlighter for textedit!
Comment #11
mstrelan commented$this->case_transform()needs to occur beforeif (!empty($alter['replace_spaces']))otherwiseucwords()won't work.Please also review my patch from #1180820: Option to transform link paths to lower case which seems to work for me
http://drupal.org/files/issues/views-rewrite-link-case-transform-path.patch
Comment #12
roam2345 commented@mstrelan nice catch I missed that here is the patch re-rolled.
Comment #13
mstrelan commentedI would also suggest using the key "path_case" instead of "case" for 2 reasons - consistency with the string argument handler and disambiguation since it is only the path that is having its case transformed.
You also don't need the text "Do not use this unless with Postgres as it uses case sensitive comparisons." in the description as there is no database interaction here.
If you make these two changes your patch would be pretty much identical to mine, except for the the code cleanup dereine asked for which you didn't introduce.
Comment #14
roam2345 commentedre-rolled, with mstrelan's suggestion.
Comment #15
roam2345 commentedmissed description srry.
Comment #16
mstrelan commentedPatch in #15 looks good and works well. +1 for commit.
Comment #17
dawehnerHere is a small improvement: Move case_transform to views_handler so other handlers like filters can use it as well.
Comment #18
roam2345 commentedSmall update on the description "ucwords: Make the each word in the string uppercase."
Powered by Dreditor.
Comment #19
dawehnerYou are right, here is a new version.
Comment #20
roam2345 commented@dereine patch 1180510-views-3.x-transform-case-6.patch in #17 or #19 is not working its not transforming any case.
Comment #21
roam2345 commentedHere is a working version with dereine's refactoring in-place.
Comment #22
roam2345 commentedHmm further testing and the refactoring is affecting the arguments now incorrectly. In my case I tested the following.
I have argument in that is coming in from the path.
- Added a lowcase trasformation on the argument "Case Path" [seems to be working]
- Added a Upper Case word trasformation on the argument "Case" [failing]
- Added a lowcase trasformation on the field. [working]
I think its down to this line in views_handler_argument_string.inc thats causing my second step above to fail.
Comment #23
roam2345 commentedSorry for the 'spam' figured it out and have tested this thoroughly.
Please just check my logic is sound on views_handler_argument_string.inc this was causing the issue in #22 'case' is now $this->options['case']
Comment #24
roam2345 commentedbump
Comment #25
roam2345 commentedBeen running the last patch for a while with no issues changing status
Comment #26
mstrelan commentedPatch no longer applies. Here is a reroll against 7.x-3.x-dev for 2011-Jun-18
Comment #27
mstrelan commentedActually, these are pretty much identical. Not sure why it didn't apply for me. Use #23 as mine has an extra whitespace.
Comment #28
roam2345 commentedanyone willing to review this?
Comment #29
merlinofchaos commentedCommitted to 7.x-3.x with hash f86c759 -- perhaps this should be backported to 6.x-3-x? It doesn't cherry-pick cleanly, but I expected that.
Comment #30
roam2345 commentedI'll get to it next gap here.
Comment #31
Jorrit commentedI have ported the patch to 6.x-3.x. Most edits were the same, I only added
'#process' => array('views_process_dependency'),to theoptions_formpart.Comment #32
Letharion commentedComment #33
chadsten commentedI think this is related:
Currently, Contextual Filters support transformation to lowercase, and replacing spaces with dashes. Using something like Title, this is a common filter to apply. It seems that there is no native way to apply the same transformation to Fields.
Is this for a specific reason, or has this been covered in a patch that hasn't been committed to the current repo? I use views_php for this currently, but I figure this would be super helpful to be in Views.
Thanks!
Comment #34
dawehnerPlease open a new issue, this issue is about the backport. Everything else makes the issue hard to get.
Comment #35
mustanggb commented