annotate develop/views/Extractapp/configtagsintopic.php @ 20:04db1dd9d10d

update topic_regex_relation table when saving (new) regex file
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 23 Feb 2015 14:34:43 +0100
parents f60969462226
children c805470cefee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
1 <?php
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
2 // --- initialize ---
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
3 $taglistArray = $viewmodel['taglistArray'];
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
4 $topic = $viewmodel['topic'];
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
5 $topic_name = $viewmodel['topic_name'];
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
6
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
7 ?>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
8
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
9 <html>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
10 <head>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
11 <title></title>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
12 </head>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
13
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
14 <body>
18
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
15 <script type="text/javascript">
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
16 function SelectMoveRows(s1, s2)
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
17 {
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
18 var selId = '';
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
19 var selText = '';
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
20 // Move rows from s1 to s2 from bottom to top
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
21 for (i = s1.options.length - 1; i >= 0; i--)
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
22 {
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
23 if (s1.options[i].selected == true)
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
24 {
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
25 selId = s1.options[i].value;
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
26 selText = s1.options[i].text;
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
27 var newRow = new Option(selText,selId);
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
28 s2.options[s2.length] = newRow;
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
29 s1.options[i] = null;
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
30 }
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
31 }
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
32 SelectSort(s2);
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
33 }
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
34 function SelectSort(selList)
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
35 {
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
36 var id = '';
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
37 var t = '';
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
38 for (x = 0; x < selList.length - 1; x++)
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
39 {
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
40 for (y = x+1; y < selList.length; y++)
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
41 {
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
42 if (selList[x].text > selList[y].text)
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
43 {
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
44 // Swap rows
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
45 id = selList[x].value;
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
46 t = selList[x].text;
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
47 selList[x].value = selList[y].value;
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
48 selList[x].text = selList[y].text;
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
49 selList[y].value = id;
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
50 selList[y].text = t;
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
51 }
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
52 }
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
53 }
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
54 }
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
55
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
56 function checkTopic(t) {
19
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
57 var ids = [];
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
58
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
59 for (var i = 0; i < t.options.length; i++) {
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
60 ids.push(t.options[i].value);
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
61 console.log(t.options[i].text);
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
62 }
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
63
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
64 console.log(ids);
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
65 var ids_json = JSON.stringify(ids);
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
66 var topic_id = JSON.parse('<?php echo json_encode($topic) ?>');
18
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
67
19
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
68 $.ajax({
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
69 url : './ConfigTagsInTopic',
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
70 async : false,
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
71 type : 'POST',
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
72 data : 'func=Update'+'&ids='+ids_json+'&topic_id='+topic_id,
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
73 error: function (e) {
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
74 console.log("error when update tags in topic"+ e );
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
75 },
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
76 success: function (e) {
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
77 alert("Updated!");
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
78 }
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
79 }).done(function(result) {
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
80 });
18
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
81
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
82 }
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
83
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
84 </script>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
85
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
86 <div class="container-fluid">
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
87 <div class="row">
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
88 <div class="col-xs-12 col-sm-12 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
89
19
f60969462226 save tag modification of topic configration into topic_tag_relation table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 18
diff changeset
90 <form name="config" autocomplete='off' action="Javascript:checkTopic(document.config.InTopic)">
18
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
91 <h3>Topic: <?php echo $topic_name;?> </h3>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
92
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
93 <table class="table">
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
94 <thead>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
95 <tr>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
96 <td class="text-warning"> Selected tags </td>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
97 <td></td>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
98 <td class="text-warning"> Other tags </td>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
99 </tr>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
100 </thead>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
101 <tbody>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
102 <tr>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
103 <td>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
104 <select name="InTopic" size="<?php echo count($taglistArray)*0.8; ?>" class="form-control" multiple>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
105 <?php
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
106 foreach ($taglistArray as $taglistValue) {
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
107 if ($taglistValue['topic_id'] == $topic) {
20
04db1dd9d10d update topic_regex_relation table when saving (new) regex file
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 19
diff changeset
108 echo "<option value='".$taglistValue['id']."'>".$taglistValue['name']." (".$taglistValue['tag'].") "."</option>";
18
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
109 }
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
110 }
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
111 ?>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
112 </select>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
113 </td>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
114 <td align="center" valign="middle">
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
115 <input type="button" value="<< Add" class="btn btn-primary" onClick="SelectMoveRows(document.config.Others, document.config.InTopic)"><br>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
116 <br>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
117 <input type="button" value="Remove >>" class="btn btn-warning" onClick="SelectMoveRows(document.config.InTopic, document.config.Others)"><br>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
118 </td>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
119 <td >
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
120 <select name="Others" size="<?php echo count($taglistArray)*0.8; ?>" class="form-control" multiple>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
121 <?php
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
122 foreach ($taglistArray as $taglistValue) {
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
123 if ($taglistValue['topic_id'] != $topic) {
20
04db1dd9d10d update topic_regex_relation table when saving (new) regex file
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 19
diff changeset
124 echo "<option value='".$taglistValue['id']."'>".$taglistValue['name']." (".$taglistValue['tag'].") "."</option>";
18
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
125 }
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
126 }
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
127 ?>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
128 </select>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
129 </td>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
130 </tr>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
131 <tr>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
132 <td></td>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
133 <td><input type="submit" value="Submit" class="btn btn-lg btn-success"></td>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
134 <td></td>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
135 </tr>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
136 </tbody>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
137 </table>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
138
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
139
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
140 </form>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
141 </div>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
142 </div>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
143 </div>
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
144
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
145 <!--
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
146 <form name="config" autocomplete='off' action="Javascript:checkTopic(this)">
12
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
147 <h3>Topic: <?php echo $topic_name;?> </h3>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
148 <div> Select/Unselect the following tags for the topic. </div>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
149 <input type="submit" value="Submit">
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
150
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
151 <table style="" border="1">
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
152 <thead>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
153 <tr>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
154 <td>Name</td>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
155 <td>Tag</td>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
156 <td>Select/Unselect</td>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
157 </tr>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
158 </thead>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
159 <tbody>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
160 <?php
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
161 // list the tags with topic
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
162 foreach ($taglistArray as $taglistValue) {
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
163 echo "<tr>";
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
164 echo "<td>".$taglistValue['name']."</td>";
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
165 echo "<td>".$taglistValue['tag']."</td>";
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
166 // checkbox for topic
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
167 if ($taglistValue['topic_id'] == $topic) {
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
168 echo "<td> <input type='checkbox' name='".$taglistValue['id']."' checked='true'/> </td>";
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
169 } else {
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
170 echo "<td> <input type='checkbox' name='".$taglistValue['id']."'/> </td>";
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
171 }
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
172 echo "</tr>";
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
173 }
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
174 ?>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
175 </tbody>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
176 </table>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
177
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
178 </form>
18
115dda3d1728 configTagsInTopic with select-list-move UI
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents: 12
diff changeset
179 -->
12
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
180
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
181
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
182 </body>
e82ca7375e93 Integration with LocalGazetteerService (LGService), getting text from LGService and saving text to LGService. Adjust the control flow (controller).
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff changeset
183 </html>