aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/mod_sources.js12
-rw-r--r--view/tpl/sources_edit.tpl22
-rw-r--r--view/tpl/sources_list.tpl15
-rw-r--r--view/tpl/sources_new.tpl15
4 files changed, 64 insertions, 0 deletions
diff --git a/view/js/mod_sources.js b/view/js/mod_sources.js
new file mode 100644
index 000000000..140f13843
--- /dev/null
+++ b/view/js/mod_sources.js
@@ -0,0 +1,12 @@
+$(document).ready(function() {
+ var a;
+ a = $("#id_name").autocomplete({
+ serviceUrl: baseurl + '/acl',
+ minChars: 2,
+ width: 350,
+ onSelect: function(value,data) {
+ $("#id_xchan").val(data);
+ }
+ });
+
+});
diff --git a/view/tpl/sources_edit.tpl b/view/tpl/sources_edit.tpl
new file mode 100644
index 000000000..6e9cee32b
--- /dev/null
+++ b/view/tpl/sources_edit.tpl
@@ -0,0 +1,22 @@
+<h1>{{$title}}</h1>
+
+<div class="descriptive-text">{{$desc}}</div>
+
+<form action="sources" method="post">
+<input type="hidden" name="source" value="{{$id}}" />
+<input type="hidden" id="id_xchan" name="xchan" value="{{$xchan}}" />
+{{include file="field_input.tpl" field=$name}}
+{{include file="field_textarea.tpl" field=$words}}
+
+<div class="sources-submit-wrapper" >
+<input type="submit" name="submit" class="sources-submit" value="{{$submit}}" />
+</div>
+</form>
+<br />
+<br />
+<a href="sources/{{$id}}/drop">{{$drop}}</a>
+
+
+
+
+
diff --git a/view/tpl/sources_list.tpl b/view/tpl/sources_list.tpl
new file mode 100644
index 000000000..5fe50ba98
--- /dev/null
+++ b/view/tpl/sources_list.tpl
@@ -0,0 +1,15 @@
+<h1>{{$title}}</h1>
+
+<div class="descriptive-text">{{$desc}}</div>
+
+<div class="sources-links">
+<a href="sources/new">{{$new}}</a>
+</div>
+
+{{if $sources}}
+<ul class="sources-list">
+{{foreach $sources as $source}}
+<li><a href="sources/{{$source.src_id}}">{{$source.xchan_name}}</a></li>
+{{/foreach}}
+</ul>
+{{/if}} \ No newline at end of file
diff --git a/view/tpl/sources_new.tpl b/view/tpl/sources_new.tpl
new file mode 100644
index 000000000..267245ae4
--- /dev/null
+++ b/view/tpl/sources_new.tpl
@@ -0,0 +1,15 @@
+<h1>{{$title}}</h1>
+
+<div class="descriptive-text">{{$desc}}</div>
+
+<form action="sources" method="post">
+<input type="hidden" id="id_xchan" name="xchan" value="{{$xchan}}" />
+{{include file="field_input.tpl" field=$name}}
+{{include file="field_textarea.tpl" field=$words}}
+
+<div class="sources-submit-wrapper" >
+<input type="submit" name="submit" class="sources-submit" value="{{$submit}}" />
+</div>
+</form>
+
+