Exemplo n.º 1
0
def view(request, id):
    contact = get_object_or_404(Contact, id=id)
    comments = comment_block(request, contact)
    return render(request, 'contacts/view.html', {
        'title': _('Contact'),
        'comments': comments,
        'contact': contact
    })
Exemplo n.º 2
0
def view(request, id):
    order = Order.objects.filter_current_company().get(id=id)
    comments = comment_block(request, order)
    who_can_see_this = order.who_has_permission_to('view')

    return render(request, "orders/view.html", {'title': order.title,
                                                'order': order,
                                                'comments': comments,
                                                'who_can_see_this': who_can_see_this})
Exemplo n.º 3
0
def view(request, id):
    project = Project.objects.get(id=id)
    comments = comment_block(request, project)
    who_can_see_this = project.who_has_permission_to('view')
    return render(request, 'projects/view.html', {'title': 'Prosjekt: %s' % project,
                                                  'comments': comments,
                                                  'project': project,
                                                  'who_can_see_this': who_can_see_this,
                                                  })
Exemplo n.º 4
0
def view(request, id):
    customer = Core.current_user().get_permitted_objects("VIEW", Customer).get(id=id)

    comments = comment_block(request, customer)
    form = CustomerForm(instance=customer, initial={'cid': customer.cid})

    return render(request, 'customers/view.html', {'title': _('Customer: ') + customer.name,
                                                   'comments': comments,
                                                   'customer': customer,
                                                   'form': form})
Exemplo n.º 5
0
def view(request, id):
    project = Project.objects.get(id=id)
    comments = comment_block(request, project)
    who_can_see_this = project.who_has_permission_to('view')
    return render(
        request, 'projects/view.html', {
            'title': 'Prosjekt: %s' % project,
            'comments': comments,
            'project': project,
            'who_can_see_this': who_can_see_this,
        })
Exemplo n.º 6
0
def view(request, id):
    order = Order.objects.filter_current_company().get(id=id)
    comments = comment_block(request, order)
    who_can_see_this = order.who_has_permission_to('view')

    return render(
        request, "orders/view.html", {
            'title': order.title,
            'order': order,
            'comments': comments,
            'who_can_see_this': who_can_see_this
        })
Exemplo n.º 7
0
def view(request, id):
    customer = Core.current_user().get_permitted_objects("VIEW",
                                                         Customer).get(id=id)

    comments = comment_block(request, customer)
    form = CustomerForm(instance=customer, initial={'cid': customer.cid})

    return render(
        request, 'customers/view.html', {
            'title': _('Customer: ') + customer.name,
            'comments': comments,
            'customer': customer,
            'form': form
        })
Exemplo n.º 8
0
def view(request, id):
    contact = get_object_or_404(Contact, id=id)
    comments = comment_block(request, contact)
    return render(request, 'contacts/view.html',
            {'title': _('Contact'), 'comments': comments, 'contact': contact})