location.tpl.php currently places the map link after the closing div. This results in it being detached from the rest of the location. It should instead go between the last two closing div tags. The attached patch fixes this. It also might be a good idea to go one step further and wrap the map link itself in divs so it can be styled directly as well, but I leave that to you.

CommentFileSizeAuthor
#8 rerolleddiv.patch208 byteseporama
#2 location.tpl_.php_.patch463 bytesseanr

Comments

seanr’s picture

Title: location.tpl.php putls map link outside divs » location.tpl.php puts map link outside divs
seanr’s picture

Status: Active » Needs review
StatusFileSize
new463 bytes
yesct’s picture

yesct’s picture

could this be related to #769094: locations.tpl.php bug
?

this patch might be a candidate for a quick review... good for someone who has never tested a patch before... *grin* come on, you know you want to! I'll help you, just reply or contact me.

hutch’s picture

No, not the same template file.

As you suggest, let someone else review this, nice and simple, gotta start somewhere ;-)

yesct’s picture

:)

yesct’s picture

Issue tags: +location novice review

tagging

eporama’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new208 bytes

I tested the patch in #2, it applied fine (but the line numbers were off). Works as advertised and location-cck and node locations both worked fine. The map link is now within the div.

I rerolled the patch against current dev to get line numbers right, but other than that, no change.

eporama’s picture

YesCT also thought I should mention that we had some back and forth re: the "No newline at end of file" which I couldn't figure out why my ".new" file was without a newline. I noticed that the original patch in #2 also had the "No newline at end of file", which I take to mean that it actually removed the newline when I applied the patch. Just thought it should be mentioned since it was another "difference" in the two patches.

hutch’s picture

#8 rerolleddiv.patch works fine, RTBC as far as I'm concerned.

In #9, "No newline at end of file" means that the 'changed' file that the patch was built from did not have a newline (eg did not have an empty line at the end of the file), so the patch reflected that but provides a warning in case that was not the intention. Just goes to show that all files should have a newline on the end, at least when working with scripts in drupal.

yesct’s picture

eporama, what was that trick you said in IRC you used to see the characters in a file? something -c?

eporama’s picture

od -c

octal (or hex, decimal, ASCII) dump but with "Output C-style escaped characters". This shows \n and/or \r for linefeeds, carriage returns, etc. Also handy for telling if \t or " " is used... Not a pretty output, but at least it's relatively plain.

yesct’s picture

Issue tags: -location novice review +location bdragon consider commit

updating tags.

rooby’s picture

Status: Reviewed & tested by the community » Fixed

Committed to D5, D6 and HEAD. Thanks.

hutch’s picture

And with the map link in its own div, excellent! That makes theming much easier.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rooby’s picture

Just realised I committed to the DRUPAL-5 branch instead of the DRUPAL-5--3 branch :(

Committed to DRUPAL-5--3 - http://drupal.org/cvs?commit=372110