Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Commit

Permalink
Fixing up the pure open-source codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Hughes committed Dec 7, 2011
1 parent aebbfc7 commit 6397b55
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 30 deletions.
33 changes: 15 additions & 18 deletions scrumdo-web/apps/activities/signal_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
from threadedcomments.models import ThreadedComment
from activities.utils import allinstances, instanceof
from scrumdo_model_utils.models import InheritanceCastModel
try:
from scrum_log.models import ScrumLog
HAS_SCRUMLOG = True
except ImportError:
HAS_SCRUMLOG = False
from scrum_log.models import ScrumLog

from activities.models import *
import projects.signals as signals

Expand Down Expand Up @@ -136,19 +133,19 @@ def onIterationDeleted(sender, **kwargs):
signals.iteration_deleted.connect( onIterationDeleted , dispatch_uid="newsfeed_signal_hookup")


if HAS_SCRUMLOG:
def onScrumLogPosted(sender, instance, signal, *args, **kwargs):
try:
icon = "group"
if instance.flagged:
icon = "flag_red"
item = NewsItem(user=instance.creator, project=instance.project, icon=icon )
item.text = render_to_string("activities/scrumLog.txt", {'item':instance} )
item.save()
except:
logger.error("Could not create news item")
traceback.print_exc(file=sys.stdout)
models.signals.post_save.connect(onScrumLogPosted, sender=ScrumLog)

def onScrumLogPosted(sender, instance, signal, *args, **kwargs):
try:
icon = "group"
if instance.flagged:
icon = "flag_red"
item = NewsItem(user=instance.creator, project=instance.project, icon=icon )
item.text = render_to_string("activities/scrumLog.txt", {'item':instance} )
item.save()
except:
logger.error("Could not create news item")
traceback.print_exc(file=sys.stdout)
models.signals.post_save.connect(onScrumLogPosted, sender=ScrumLog)


def onCommentPosted(sender, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% load i18n %}

{% block body_class %}projects{% endblock %}
{% block body_div_class %}sideBar{% endblock %}
{% block body_div_class %}narrow_body_with_sidebar{% endblock %}

{% block extra_head %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/organization.css" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
{% block body %}



<h1>{{organization.name}}</h1>

<div id="organization-menu">
<a href="{% url organization_dashboard organization.slug %}"><img src="{{STATIC_URL}}images/organization/sel_dashboard_button.png"></a><a href="{% url organization_projects organization.slug %}"><img class="rollover" src="{{STATIC_URL}}images/organization/projects_button.png"></a><a href="{% url team_summary organization.slug %}"><img class="rollover" src="{{STATIC_URL}}images/organization/teams_button.png"></a><a href="{% url export_organization organization.slug %}"><img class="rollover" src="{{STATIC_URL}}images/organization/export_button.png"></a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

{% block body %}


<h1>{{organization.name}}</h1>


<div id="organization-menu">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
<div class="box-title">
Tools
</div><!--box-title-->
<div class="box-content">
<a href="{% url project_create %}?org={{organization.id}}">{% silk "database_table" %} New Project</a>
</div><!--box-content-->
<div class="box-content">
<a href="{% url team_create organization.slug %}">{% silk "group" %} New Team</a>
</div><!--box-content-->
{% endif %}
<div class="box-title">
{% if organization %}Other {% endif %}Organizations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


{% block body %}
<div style="width:950px">

<h1>{{organization.name}}</h1>

<div id="organization-menu">
Expand Down Expand Up @@ -67,7 +67,7 @@ <h2>{{ project.name }}</h2>
{% endcanread %}
{% endfor %}

</div>



<script type="text/javascript" charset="utf-8">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

{% block body %}


<h1>{{organization.name}}</h1>

<div id="organization-menu">
<a href="{% url organization_dashboard organization.slug %}"><img class="rollover" src="{{STATIC_URL}}images/organization/dashboard_button.png"></a><a href="{% url organization_projects organization.slug %}"><img class="rollover" src="{{STATIC_URL}}images/organization/projects_button.png"></a><a href="{% url team_summary organization.slug %}"><img src="{{STATIC_URL}}images/organization/sel_teams_button.png"></a><a href="{% url export_organization organization.slug %}"><img class="rollover" src="{{STATIC_URL}}images/organization/export_button.png"></a>
Expand Down

0 comments on commit 6397b55

Please sign in to comment.