mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-06 14:04:12 +00:00
nem sei pq tantos arquivos
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
{% block digraph %}digraph model_graph {
|
||||
// Dotfile by Django-Extensions graph_models
|
||||
// Created: {{ created_at }}
|
||||
{% if cli_options %}// Cli Options: {{ cli_options }}{% endif %}
|
||||
|
||||
{% block digraph_options %}fontname = "Roboto"
|
||||
fontsize = 8
|
||||
splines = true
|
||||
rankdir = "{{ rankdir }}"{% endblock %}
|
||||
|
||||
node [{% block node_options %}
|
||||
fontname = "Roboto"
|
||||
fontsize = 8
|
||||
shape = "plaintext"
|
||||
{% endblock %}]
|
||||
|
||||
edge [{% block edge_options %}
|
||||
fontname = "Roboto"
|
||||
fontsize = 8
|
||||
{% endblock %}]
|
||||
|
||||
// Labels
|
||||
{% block labels %}{% for graph in graphs %}{% include "django_extensions/graph_models/django2018/label.dot" %}{% endfor %}{% endblock %}
|
||||
|
||||
// Relations
|
||||
{% block relations %}{% for graph in graphs %}{% include "django_extensions/graph_models/django2018/relation.dot" %}{% endfor %}{% endblock %}
|
||||
}{% endblock %}
|
||||
@@ -0,0 +1,33 @@
|
||||
{% load indent_text %}{% if use_subgraph %} subgraph {{ graph.cluster_app_name }} {
|
||||
label=<
|
||||
<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
|
||||
<TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER">
|
||||
<FONT FACE="Roboto" COLOR="Black" POINT-SIZE="10">
|
||||
<B>{{ graph.app_name }}</B>
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
>
|
||||
color=olivedrab4
|
||||
style="rounded"{% endif %}
|
||||
{% indentby 2 if use_subgraph %}{% for model in graph.models %}
|
||||
{{ model.app_name }}_{{ model.name }} [label=<
|
||||
<TABLE BGCOLOR="white" BORDER="1" CELLBORDER="0" CELLSPACING="0">
|
||||
<TR><TD COLSPAN="2" CELLPADDING="5" ALIGN="CENTER" BGCOLOR="#1b563f">
|
||||
<FONT FACE="Roboto" COLOR="white" POINT-SIZE="10"><B>
|
||||
{{ model.label }}{% if model.abstracts %}<BR/><<FONT FACE="Roboto"><I>{{ model.abstracts|join:"," }}</I></FONT>>{% endif %}
|
||||
</B></FONT></TD></TR>
|
||||
{% if not disable_fields %}{% for field in model.fields %}
|
||||
{% if disable_abstract_fields and field.abstract %}
|
||||
{% else %}
|
||||
<TR><TD ALIGN="LEFT" BORDER="0">
|
||||
<FONT {% if not field.primary_key and field.blank %}COLOR="#7B7B7B" {% endif %}FACE="Roboto">{% if field.abstract %}<I>{% endif %}{% if field.relation or field.primary_key %}<B>{% endif %}{{ field.label }}{% if field.relation or field.primary_key %}</B>{% endif %}{% if field.abstract %}</I>{% endif %}</FONT>
|
||||
</TD><TD ALIGN="LEFT">
|
||||
<FONT {% if not field.primary_key and field.blank %}COLOR="#7B7B7B" {% endif %}FACE="Roboto">{% if field.abstract %}<I>{% endif %}{% if field.relation or field.primary_key %}<B>{% endif %}{{ field.type }}{% if field.relation or field.primary_key %}</B>{% endif %}{% if field.abstract %}</I>{% endif %}</FONT>
|
||||
</TD></TR>
|
||||
{% endif %}
|
||||
{% endfor %}{% endif %}
|
||||
</TABLE>
|
||||
>]
|
||||
{% endfor %}{% endindentby %}
|
||||
{% if use_subgraph %} }{% endif %}
|
||||
@@ -0,0 +1,10 @@
|
||||
{% for model in graph.models %}{% for relation in model.relations %}{% if relation.needs_node %} {{ relation.target_app }}_{{ relation.target }} [label=<
|
||||
<TABLE BGCOLOR="white" BORDER="0" CELLBORDER="0" CELLSPACING="0">
|
||||
<TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="#1b563f">
|
||||
<FONT FACE="Roboto" POINT-SIZE="12" COLOR="white">{{ relation.target }}</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
>]{% endif %}
|
||||
{{ model.app_name }}_{{ model.name }} -> {{ relation.target_app }}_{{ relation.target }}
|
||||
[label=" {{ relation.label }}"] {{ relation.arrows }};
|
||||
{% endfor %}{% endfor %}
|
||||
@@ -0,0 +1,27 @@
|
||||
{% block digraph %}digraph model_graph {
|
||||
// Dotfile by Django-Extensions graph_models
|
||||
// Created: {{ created_at }}
|
||||
{% if cli_options %}// Cli Options: {{ cli_options }}{% endif %}
|
||||
|
||||
{% block digraph_options %}fontname = "Helvetica"
|
||||
fontsize = 8
|
||||
splines = true
|
||||
rankdir = "{{ rankdir }}"{% endblock %}
|
||||
|
||||
node [{% block node_options %}
|
||||
fontname = "Helvetica"
|
||||
fontsize = 8
|
||||
shape = "plaintext"
|
||||
{% endblock %}]
|
||||
|
||||
edge [{% block edge_options %}
|
||||
fontname = "Helvetica"
|
||||
fontsize = 8
|
||||
{% endblock %}]
|
||||
|
||||
// Labels
|
||||
{% block labels %}{% for graph in graphs %}{% include "django_extensions/graph_models/original/label.dot" %}{% endfor %}{% endblock %}
|
||||
|
||||
// Relations
|
||||
{% block relations %}{% for graph in graphs %}{% include "django_extensions/graph_models/original/relation.dot" %}{% endfor %}{% endblock %}
|
||||
}{% endblock %}
|
||||
@@ -0,0 +1,33 @@
|
||||
{% load indent_text %}{% if use_subgraph %} subgraph {{ graph.cluster_app_name }} {
|
||||
label=<
|
||||
<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0">
|
||||
<TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER">
|
||||
<FONT FACE="Helvetica Bold" COLOR="Black" POINT-SIZE="12">
|
||||
{{ graph.app_name }}
|
||||
</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
>
|
||||
color=olivedrab4
|
||||
style="rounded"{% endif %}
|
||||
{% indentby 2 if use_subgraph %}{% for model in graph.models %}
|
||||
{{ model.app_name }}_{{ model.name }} [label=<
|
||||
<TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
|
||||
<TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4">
|
||||
<FONT FACE="Helvetica Bold" COLOR="white">
|
||||
{{ model.label }}{% if model.abstracts %}<BR/><<FONT FACE="Helvetica Italic">{{ model.abstracts|join:"," }}</FONT>>{% endif %}
|
||||
</FONT></TD></TR>
|
||||
{% if not disable_fields %}{% for field in model.fields %}
|
||||
{% if disable_abstract_fields and field.abstract %}
|
||||
{% else %}
|
||||
<TR><TD ALIGN="LEFT" BORDER="0">
|
||||
<FONT {% if not field.primary_key and field.blank %}COLOR="#7B7B7B" {% endif %}FACE="Helvetica {% if field.abstract %}Italic{% endif %}{% if field.relation or field.primary_key %}Bold{% endif %}">{{ field.label }}</FONT>
|
||||
</TD><TD ALIGN="LEFT">
|
||||
<FONT {% if not field.primary_key and field.blank %}COLOR="#7B7B7B" {% endif %}FACE="Helvetica {% if field.abstract %}Italic{% endif %}{% if field.relation or field.primary_key %}Bold{% endif %}">{{ field.type }}</FONT>
|
||||
</TD></TR>
|
||||
{% endif %}
|
||||
{% endfor %}{% endif %}
|
||||
</TABLE>
|
||||
>]
|
||||
{% endfor %}{% endindentby %}
|
||||
{% if use_subgraph %} }{% endif %}
|
||||
@@ -0,0 +1,10 @@
|
||||
{% for model in graph.models %}{% for relation in model.relations %}{% if relation.needs_node %} {{ relation.target_app }}_{{ relation.target }} [label=<
|
||||
<TABLE BGCOLOR="palegoldenrod" BORDER="0" CELLBORDER="0" CELLSPACING="0">
|
||||
<TR><TD COLSPAN="2" CELLPADDING="4" ALIGN="CENTER" BGCOLOR="olivedrab4">
|
||||
<FONT FACE="Helvetica Bold" COLOR="white">{{ relation.target }}</FONT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
>]{% endif %}
|
||||
{{ model.app_name }}_{{ model.name }} -> {{ relation.target_app }}_{{ relation.target }}
|
||||
[label="{{ relation.label }}"] {{ relation.arrows }};
|
||||
{% endfor %}{% endfor %}
|
||||
@@ -0,0 +1,61 @@
|
||||
{% load i18n %}
|
||||
<input type="text" id="lookup_{{ name }}" value="{{ label }}" style="display:none;" />
|
||||
<a href="{{ related_url }}{{ url }}" class="related-lookup" id="lookup_id_{{ name }}" onclick="return showRelatedObjectLookupPopup(this);"></a>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var current_value = $('#id_{{ name }}').val();
|
||||
var new_value = null;
|
||||
|
||||
// Show lookup input
|
||||
$('#lookup_{{ name }}').show();
|
||||
function reset() {
|
||||
$('#id_{{ name }}, #lookup_{{ name }}').val('');
|
||||
};
|
||||
function lookup(query) {
|
||||
$.get('{{ search_path }}', {
|
||||
'search_fields': '{{ search_fields }}',
|
||||
'app_label': '{{ app_label }}',
|
||||
'model_name': '{{ model_name }}',
|
||||
'object_pk': query
|
||||
}, function(data) {
|
||||
$('#lookup_{{ name }}').val(data);
|
||||
current_value = query;
|
||||
});
|
||||
};
|
||||
$('#id_{{ name }}').bind('keyup', function(event) {
|
||||
if ($(this).val()) {
|
||||
if (event.keyCode == 27) {
|
||||
reset();
|
||||
} else {
|
||||
lookup($(this).val());
|
||||
};
|
||||
};
|
||||
});
|
||||
$('#lookup_{{ name }}').bind('keyup', function(event) {
|
||||
if ($(this).val()) {
|
||||
if (event.keyCode == 27) {
|
||||
reset();
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#lookup_{{ name }}').autocomplete('{{ search_path }}', {
|
||||
extraParams: {
|
||||
'search_fields': '{{ search_fields }}',
|
||||
'app_label': '{{ app_label }}',
|
||||
'model_name': '{{ model_name }}'
|
||||
},
|
||||
onItemSelect: function(item) {
|
||||
$('#id_{{ name }}').val(item.data[0]);
|
||||
}
|
||||
});
|
||||
function check() {
|
||||
new_value = $('#id_{{ name }}').val();
|
||||
if (new_value) {
|
||||
if (new_value != current_value) {
|
||||
lookup(new_value);
|
||||
}
|
||||
}
|
||||
};
|
||||
timeout = window.setInterval(check, 300);
|
||||
})((typeof window.jQuery == 'undefined' && typeof window.django != 'undefined')? django.jQuery : jQuery);
|
||||
</script>
|
||||
Reference in New Issue
Block a user