Closed Bug 836587 Opened 12 years ago Closed 8 years ago

Include a footer link to Github page template from [Bedrock] pages

Categories

(www.mozilla.org :: Pages & Content, enhancement, P4)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cmore, Assigned: hectorz)

References

Details

(Whiteboard: u=contributor c=bedrock p=)

Attachments

(1 file)

The legacy PHP site had a "contribute to this page" link that directly linked to the location in SVN where the file lives. Now that many mozilla.org pages are in Bedrock, it is difficult to know how to find the associated page in Github. Also, since the URL structure doesn't correlate to the Github directory structure, we will need come up with a way to link a generated page with Github. For example, this page: https://www.mozilla.org/en-US/firefox/central/ should link to: https://github.com/mozilla/bedrock/blob/master/apps/firefox/templates/firefox/central.html We could probably use the urls.py file to determine the name and location of the template, the app name, and then have a settings value of the base URL of the Github repo, i.e. https://github.com/mozilla/bedrock/
OS: Mac OS X → All
Hardware: x86 → All
Priority: -- → P3
Priority: P3 → P4
Whiteboard: u=user c=bedrock p=
Whiteboard: u=user c=bedrock p= → u=contributor c=bedrock p=
I experimented with this a little, I can get the correct template path in github & svn repo and show them in page comment for testing purpose[1]. Not sure what performance impact the extra django.template.loader.get_template call may introduce, though. [1]: https://github.com/l-hedgehog/bedrock/commit/36f011c0
Assignee: nobody → bzhao
I don't think there would be much of a performance hit. The rest of the l10n system is much slower than this, but we can monitor it and disable if necessary. We also cache requests very heavily, so the impact should be minimal. I like this approach. These links will be very useful.
Hi, where should I add these github/svn links? Just replacing the current "contribute to this page" link with them doesn't sound like a good idea, quoting :pmac from the irc discussion: yeah... perhaps we need another contribute landing page that will take the github or svn url as a query param and explain things and link to the page code? It could be quite confusing to just get thrown over to the template code on github, and especially SVN.
Possible add a contribute to the project page
Possible design a new page Include a link to the SVN and github and add a image for both and possible a basic code guide on it or using the github and svn
Severity: normal → enhancement
Component: Bedrock → Pages & Content
Would this bug be possible to be added soon to the Mozilla.org sites
I'm reviving this, and going ahead with a similar PR to :hectorz's original code from comment #1. We no longer think that it'd be overly confusing to just land on github from a link in the footer, and this is now much more simple now that we no longer have any code in SVN.
Commits pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/16a25cdd30e87c81cb28dd18acde96ab29dfd074 Fix bug 836587: Add "Source code for this page" link to footer It will be a link to the current template source on github. Original inspiration for this commit from: https://github.com/l-hedgehog/bedrock/commit/36f011c0 https://github.com/mozilla/bedrock/commit/f8c14d582d8079cb5e40ac2c0a7961fab4688b16 Merge pull request #5226 from pmac/add-edit-link-to-footer-836587 Fix bug 836587: Add "Source code for this page" link to footer
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: