Commits

Guido Draheim committed 16db6b0

fix channels view

Comments (0)

Files changed (3)

src/dvbcronrecording/channels.py

         if not message: message = translate("please do not use umlauts")
         message += translate("?problem")
         newchannel_list = self._newchannel_list(req)
-        channel_list = self._channel_list(req.args)
+        channel_list = self._channel_list(args)
 
         # passing variables to template
         data = {}
         item =  session.query(RecordingChannels).get(req.args.get("id"))
         if not item:
             return "ERROR: channel item not found for id=%s" % req.args.get("id")
+        old = "%s:%s:%s" % (item.channelname, item.adapter, item.title)
         item.channelname = req.args.get("channelname")
         item.adapter = req.args.get("adapter")
         item.title = req.args.get("title")
+        new = "%s:%s:%s" % (item.channelname, item.adapter, item.title)
         session.flush()
-        return "OK"
+        return "OK(%s -> %s)" % (old, new)
 
     """
       Deletes entry from recordings

src/dvbcronrecording/dvbcronrecording.de.po

 msgstr "channel.conf Text"
 
 msgid "action buttons"
-msgstr "Betriebsschalter"
+msgstr "Arbeitsgang"
 
 msgid "status"
 msgstr "Status"

src/dvbcronrecording/templates/channels_list.html

 								name="channelname" value="${item.channelname}"></input>
 							</td>
 							<td class="adapter"><select name="adapter">
-									<option py:for="adapter in sorted(adapterlist)"
-										value="${adapter}">${adapter}</option>
+									<option py:for="item_adapter in sorted(adapterlist)"
+										value="${item_adapter}"
+										selected="${item_adapter == item.adapter or None}"
+										>${item_adapter}</option>
 							</select></td>
 							<td class="title"><input type="text" name="title"
 								value="${item.title}"></input>
 							value="${item.channelname}" style="width: 6em" />
 						</td>
 						<td class="adapter"><select name="adapter">
-								<option py:for="adapter in sorted(adapterlist)"
-									value="${adapter}">${adapter}</option>
+								<option py:for="item_adapter in sorted(adapterlist)"
+									value="${item_adapter}"
+                                                                        selected="${item_adapter == item.adapter or None}"
+									>${item_adapter}</option>
 						</select></td>
 						<td class="title"><input type="text" name="title"
 							value="${item.title}"></input>