def organisation_conditions(id=None):
    if id is not None:
        pc = dqpublishercondition.get_publisher_condition(id)
        return render_template("organisation_condition.html", pc=pc,
             admin=usermanagement.check_perms('admin'),
             loggedinuser=current_user)
    else:
        pcs = dqpublishercondition.get_publisher_conditions()
        feedbackconditions = dqpublishercondition.get_publisher_feedback()
        text = ""
        for i, condition in enumerate(feedbackconditions):
            if i>0: text += "\n"
            text += condition.Organisation.organisation_code + " does not use "
            text += condition.OrganisationConditionFeedback.element + " at "
            text += condition.OrganisationConditionFeedback.where
        return render_template("organisation_conditions.html", pcs=pcs,
             admin=usermanagement.check_perms('admin'),
             loggedinuser=current_user,
             feedbackconditions=text)
def organisationfeedback_clear():
    feedback = dqpublishercondition.get_publisher_feedback()
    dqpublishercondition.delete_publisher_feedback(feedback)
    flash("All remaining publisher feedback was successfully cleared", "warning")
    return redirect(url_for("organisation_conditions"))