summaryrefslogtreecommitdiff
path: root/gstudio/templates
diff options
context:
space:
mode:
authorArun yadav <arunkumar5587@gmail.com>2012-05-18 16:47:19 +0530
committerArun yadav <arunkumar5587@gmail.com>2012-05-18 16:47:19 +0530
commitf43e836715ca5ed0a2a01efd5e4ade3d9dea9df7 (patch)
tree98e5a54c96c3852e6da2ce65dcbd468a440cc219 /gstudio/templates
parent431f589903ea3f03678a3c20acfd478ae4c15805 (diff)
parent37bb0b04aea7d45168df809dc4367c6b74e039a5 (diff)
downloadgnowsys-f43e836715ca5ed0a2a01efd5e4ade3d9dea9df7.tar.gz
merge with gn's code
Diffstat (limited to 'gstudio/templates')
-rw-r--r--gstudio/templates/gstudio/_header.html2
-rw-r--r--gstudio/templates/gstudio/nodetype_detail.html26
-rw-r--r--gstudio/templates/gstudio/skeleton.html38
3 files changed, 38 insertions, 28 deletions
diff --git a/gstudio/templates/gstudio/_header.html b/gstudio/templates/gstudio/_header.html
index 23d4d43..2e05c8c 100644
--- a/gstudio/templates/gstudio/_header.html
+++ b/gstudio/templates/gstudio/_header.html
@@ -12,7 +12,7 @@
| <a href="{{ get_absolute_url }}/objects">objects</a>
{% if user.is_authenticated %}
- | <a href="{{ get_absolute_url }}/nodetypes/userdashboard">My Dashboard</a>
+
{% if user.is_staff %}
| <a href="{{ get_absolute_url }}/admin">Admin Dashboard</a>
diff --git a/gstudio/templates/gstudio/nodetype_detail.html b/gstudio/templates/gstudio/nodetype_detail.html
index 404adb9..7947e58 100644
--- a/gstudio/templates/gstudio/nodetype_detail.html
+++ b/gstudio/templates/gstudio/nodetype_detail.html
@@ -243,18 +243,30 @@
s = parseInt(s)
//alert(s)
}
- </script>
-
+ </script>
{% endwith %}
{% endblock %}
-{% if object.reftype == 'Objecttype'%}
-<a href="{{ get_absolute_url }}/objects/dynamicAttribute/save/{{ object.title }}">Add Attribute</a>
-<br/>
-<a href="{{ get_absolute_url }}/objects/dynamicRelation/displayRT/{{ object.title }}">Add Relation</a>
-{% endif %}
+<!-- Dynamic form begins -->
+<p>
+{% if object.reftype == 'Objecttype' %}
+<b>Add Attributes:</b>
+{% for i in object.getat %}
+<a href="{{ get_absolute_url }}/objects/dynamicAttribute/save/{{ i }}/{{ object.title }}">{{ i }}</a><nbsp>;
+{% endfor %}
+</p>
+
+<p>
+<b>Add Relations: </b>
+{% for i in object.getrt %}
+<a href="{{ get_absolute_url }}/objects/dynamicRelation/displaymem/{{ i }}/{{ object.title }}">{{ i }}</a><nbsp>;
+{% endfor %}
+{% endif %}
+
+</p>
+<!-- Dyanic form ends -->
<div class="nodetype-content">
</div>
diff --git a/gstudio/templates/gstudio/skeleton.html b/gstudio/templates/gstudio/skeleton.html
index d179220..3b945f4 100644
--- a/gstudio/templates/gstudio/skeleton.html
+++ b/gstudio/templates/gstudio/skeleton.html
@@ -46,8 +46,8 @@
display: block;
}
svg {
- margin-left: 50%;
- margin-right: 50%;
+ margin-left: 0%;
+ margin-right: 10%;
display: block;
position: absolute;
}
@@ -215,26 +215,25 @@ $.getJSON('/nodetypes/graphs/graph_json/' + {{object.id}}, function (json1) {
function load(key)
{
-
-var a = 25 * s;
-
- if ( a > 700 )
- {
- var w = 700;
- }
- else
- {
- var w = a;
- }
-
- var h = 24 * s,
+ if (s > 0 ){
+ var a = 50 * s;
+ var w = 700;
+ var p = 100 + "%";
+ var h = 600;
+ var q = 3 * s + 35 + "%";
+ }else{
+ var w = 700;
+ var p = 100 + "%";
+ var h = 600;
+ var q = 110 + "%";
+ }
fill = d3.scale.category20();
var vis = d3.select("#chart")
.append("svg:svg")
.attr("id", "amazingViz")
- .attr("width", w)
- .attr("height", h);
+ .attr("width", p)
+ .attr("height", q);
vis.append("svg:g").attr("class", "edges");
vis.append("svg:g").attr("class", "nodes");
@@ -469,7 +468,6 @@ $(window).bind('keydown',function(event){
</script>
-
</div>
<div id="sidebar">
{% block sidebar %}
@@ -477,7 +475,7 @@ $(window).bind('keydown',function(event){
</div>
- <div id="footer" class="span-24 last">
+ <div id="footer">
<p>
<a rel="license"
@@ -490,6 +488,6 @@ $(window).bind('keydown',function(event){
</p>
</div>
-
+ </div>
</body>
</html>