Merge lp:~dholbach/harvest/581719 into lp:harvest

Proposed by Daniel Holbach
Status: Merged
Merged at revision: 262
Proposed branch: lp:~dholbach/harvest/581719
Merge into: lp:harvest
Diff against target: 116 lines (+45/-4)
5 files modified
harvest/locale/harvest.pot (+18/-2)
harvest/media/css/style.css (+3/-0)
harvest/opportunities/urls.py (+7/-0)
harvest/opportunities/views.py (+15/-0)
harvest/templates/opportunities/include/opportunity.html (+2/-2)
To merge this branch: bzr merge lp:~dholbach/harvest/581719
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+37597@code.launchpad.net
To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

Hi,

Does

   <a href="{% url opportunity_edit opportunity.id %}?next={{request.get_full_path}}" target="_blank" class="opportunity-edit-button">{% trans 'edit' %}</a>

have @login_required too?

If so then I'm fine with this change.

Thanks,

James

review: Approve
Revision history for this message
Daniel Holbach (dholbach) wrote :

> Does
>
> <a href="{% url opportunity_edit opportunity.id
> %}?next={{request.get_full_path}}" target="_blank" class="opportunity-edit-
> button">{% trans 'edit' %}</a>
>
> have @login_required too?

Yes and the redirect-after-openid works nicely too.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'harvest/locale/harvest.pot'
--- harvest/locale/harvest.pot 2010-09-03 13:23:33 +0000
+++ harvest/locale/harvest.pot 2010-10-05 13:33:45 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2010-09-03 07:35-0500\n"11"POT-Creation-Date: 2010-10-05 08:30-0500\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -355,10 +355,26 @@
355"\t"355"\t"
356msgstr ""356msgstr ""
357357
358#: templates/opportunities/include/opportunity.html:7358#: templates/opportunities/include/opportunity.html:6
359msgid "edit"359msgid "edit"
360msgstr ""360msgstr ""
361361
362#: templates/opportunities/include/opportunity.html:7
363msgid "mark opportunity as applied"
364msgstr ""
365
366#: templates/opportunities/include/opportunity.html:7
367msgid "applied"
368msgstr ""
369
370#: templates/opportunities/include/opportunity.html:8
371msgid "mark opportunity as irrelevant"
372msgstr ""
373
374#: templates/opportunities/include/opportunity.html:8
375msgid "irrelevant"
376msgstr ""
377
362#: templates/opportunities/include/opportunity_details_edit.html:45378#: templates/opportunities/include/opportunity_details_edit.html:45
363msgid "Apply changes"379msgid "Apply changes"
364msgstr ""380msgstr ""
365381
=== modified file 'harvest/media/css/style.css'
--- harvest/media/css/style.css 2010-08-31 06:29:10 +0000
+++ harvest/media/css/style.css 2010-10-05 13:33:45 +0000
@@ -498,6 +498,9 @@
498li.opportunity:hover > .opportunity-header > .actions {498li.opportunity:hover > .opportunity-header > .actions {
499 opacity:1;499 opacity:1;
500}500}
501.opportunity-goaway-button {
502 font-size:10px;
503}
501.opportunity-header > .opportunity-summary {504.opportunity-header > .opportunity-summary {
502 margin-left:10px;505 margin-left:10px;
503 color:rgb(180,180,180);506 color:rgb(180,180,180);
504507
=== modified file 'harvest/opportunities/urls.py'
--- harvest/opportunities/urls.py 2010-08-06 20:27:49 +0000
+++ harvest/opportunities/urls.py 2010-10-05 13:33:45 +0000
@@ -13,6 +13,13 @@
13 'opportunities.views.opportunity_edit',13 'opportunities.views.opportunity_edit',
14 name='opportunity_edit'),14 name='opportunity_edit'),
15 15
16 url(r'^opportunity/(?P<opportunity_id>[\d]+)/applied/$',
17 'opportunities.views.opportunity_applied',
18 name='opportunity_applied'),
19
20 url(r'^opportunity/(?P<opportunity_id>[\d]+)/irrelevant/$',
21 'opportunities.views.opportunity_irrelevant',
22 name='opportunity_irrelevant'),
16 23
17 url(r'^xhr/results/$',24 url(r'^xhr/results/$',
18 'opportunities.views.xhr_filter_results'),25 'opportunities.views.xhr_filter_results'),
1926
=== modified file 'harvest/opportunities/views.py'
--- harvest/opportunities/views.py 2010-08-31 08:21:04 +0000
+++ harvest/opportunities/views.py 2010-10-05 13:33:45 +0000
@@ -120,6 +120,21 @@
120 }, RequestContext(request))120 }, RequestContext(request))
121121
122122
123@login_required
124def opportunity_irrelevant(request, opportunity_id):
125 opportunity = get_object_or_404(models.Opportunity, id=opportunity_id)
126 opportunity.reviewed = (not opportunity.reviewed)
127 opportunity.save()
128 models.log_action(request.user, action="marked as irrelevant", opportunity=opportunity)
129 return filter(request)
130
131@login_required
132def opportunity_applied(request, opportunity_id):
133 opportunity = get_object_or_404(models.Opportunity, id=opportunity_id)
134 opportunity.applied = (not opportunity.applied)
135 opportunity.save()
136 models.log_action(request.user, action="marked as applied", opportunity=opportunity)
137 return filter(request)
123138
124def xhr_filter_results(request):139def xhr_filter_results(request):
125 filters = HarvestFilters()140 filters = HarvestFilters()
126141
=== modified file 'harvest/templates/opportunities/include/opportunity.html'
--- harvest/templates/opportunities/include/opportunity.html 2010-09-03 09:42:21 +0000
+++ harvest/templates/opportunities/include/opportunity.html 2010-10-05 13:33:45 +0000
@@ -2,11 +2,11 @@
22
3<div class="opportunity-header">3<div class="opportunity-header">
4 <a href="{{opportunity.url}}" class="opportunity-description" target="_blank">{{ opportunity.description }}</a>4 <a href="{{opportunity.url}}" class="opportunity-description" target="_blank">{{ opportunity.description }}</a>
5 {% if user.is_authenticated %}
6 <span class="actions">5 <span class="actions">
7 <a href="{% url opportunity_edit opportunity.id %}?next={{request.get_full_path}}" target="_blank" class="opportunity-edit-button">{% trans 'edit' %}</a>6 <a href="{% url opportunity_edit opportunity.id %}?next={{request.get_full_path}}" target="_blank" class="opportunity-edit-button">{% trans 'edit' %}</a>
7 (<a href="{% url opportunity_applied opportunity.id %}?next={{request.get_full_path}}" class="opportunity-goaway-button" title="{% trans 'mark opportunity as applied' %}">{% trans 'applied' %}</a>
8 <a href="{% url opportunity_irrelevant opportunity.id %}?next={{request.get_full_path}}" class="opportunity-goaway-button" title="{% trans 'mark opportunity as irrelevant' %}">{% trans 'irrelevant' %}</a>)
8 </span>9 </span>
9 {% endif %}
10 <span class="opportunity-summary">10 <span class="opportunity-summary">
11 {{ opportunity.summary|join:', ' }}11 {{ opportunity.summary|join:', ' }}
12 </span>12 </span>

Subscribers

People subscribed via source and target branches

to all changes: