diff --git a/application/controllers/UserController.php b/application/controllers/UserController.php
index 72b6a20ef..081c32b70 100644
--- a/application/controllers/UserController.php
+++ b/application/controllers/UserController.php
@@ -23,6 +23,8 @@ class UserController extends Zend_Controller_Action
$this->view->headScript()->appendFile('/js/airtime/user/user.js','text/javascript');
$request = $this->getRequest();
$form = new Application_Form_AddUser();
+
+ $this->view->successMessage = "";
if ($request->isPost()) {
if ($form->isValid($request->getPost())) {
@@ -42,6 +44,12 @@ class UserController extends Zend_Controller_Action
$user->save();
$form->reset();
+
+ if (strlen($formdata['user_id']) == 0){
+ $this->view->successMessage = "
User added successfully!
";
+ } else {
+ $this->view->successMessage = "User updated successfully!
";
+ }
}
}
}
diff --git a/application/forms/AddUser.php b/application/forms/AddUser.php
index d1eca586b..58bc91543 100644
--- a/application/forms/AddUser.php
+++ b/application/forms/AddUser.php
@@ -72,9 +72,9 @@ class Application_Form_AddUser extends Zend_Form
$select->setAttrib('class', 'input_select');
$select->setAttrib('style', 'width: 40%');
$select->setMultiOptions(array(
- "G" => "guest",
- "H" => "host",
- "A" => "admin"
+ "G" => "Guest",
+ "H" => "Host",
+ "A" => "Admin"
));
$select->setRequired(true);
$this->addElement($select);
diff --git a/application/views/scripts/partialviews/header.phtml b/application/views/scripts/partialviews/header.phtml
index a817fc1fd..f1de80cc9 100644
--- a/application/views/scripts/partialviews/header.phtml
+++ b/application/views/scripts/partialviews/header.phtml
@@ -14,7 +14,7 @@
diff --git a/application/views/scripts/user/add-user.phtml b/application/views/scripts/user/add-user.phtml
index b37c032bc..db1e76138 100644
--- a/application/views/scripts/user/add-user.phtml
+++ b/application/views/scripts/user/add-user.phtml
@@ -26,6 +26,7 @@
+ successMessage ?>
diff --git a/public/css/images/icon_rebroadcast.png b/public/css/images/icon_rebroadcast.png
index 5282d87b2..3a6c19571 100644
Binary files a/public/css/images/icon_rebroadcast.png and b/public/css/images/icon_rebroadcast.png differ
diff --git a/public/css/images/icon_rebroadcast_m.png b/public/css/images/icon_rebroadcast_m.png
new file mode 100644
index 000000000..585a7d31f
Binary files /dev/null and b/public/css/images/icon_rebroadcast_m.png differ
diff --git a/public/css/images/icon_record.png b/public/css/images/icon_record.png
index ffedeb5c1..020ebe283 100644
Binary files a/public/css/images/icon_record.png and b/public/css/images/icon_record.png differ
diff --git a/public/css/images/icon_record_m.png b/public/css/images/icon_record_m.png
new file mode 100644
index 000000000..50b3ebe15
Binary files /dev/null and b/public/css/images/icon_record_m.png differ
diff --git a/public/css/styles.css b/public/css/styles.css
index 0ad93ca57..7d0dc8690 100644
--- a/public/css/styles.css
+++ b/public/css/styles.css
@@ -184,7 +184,7 @@ select {
.progressbar .progress-show-error {
background:#d40000 url(images/progressbar_show_error.png) repeat-x 0 0;
}
-.now-playing-info .lenght {
+.now-playing-info .show-length {
color:#c4c4c4;
padding-left:6px;
}
@@ -196,6 +196,7 @@ select {
.time-info-block {
padding:0 14px 0 2px;
background:url(images/masterpanel_spacer.png) no-repeat right 0;
+ min-width:105px;
}
.time-info-block ul {
margin:0;
@@ -1218,6 +1219,16 @@ ul.errors li {
margin-bottom:2px;
border:1px solid #c83f3f;
}
+
+div.success{
+ color:#3B5323;
+ font-size:11px;
+ padding:2px 4px;
+ background:#93DB70;
+ margin-bottom:2px;
+ border:1px solid #488214;
+}
+
.collapsible-header {
border: 1px solid #8f8f8f;
background-color: #cccccc;
@@ -1479,7 +1490,7 @@ ul.errors li {
}
.small-icon {
display:block;
- width:21px;
+ width:20px;
height:10px;
float:right;
margin-left:3px;
@@ -1490,4 +1501,18 @@ ul.errors li {
.small-icon.rebroadcast {
background:url(images/icon_rebroadcast.png) no-repeat 0 0;
}
-
\ No newline at end of file
+
+.medium-icon {
+ display:block;
+ width:25px;
+ height:12px;
+ float:right;
+ margin-left:4px;
+}
+.medium-icon.recording {
+ background:url(images/icon_record_m.png) no-repeat 0 0;
+}
+.medium-icon.rebroadcast {
+ background:url(images/icon_rebroadcast_m.png) no-repeat 0 0;
+}
+
diff --git a/public/js/airtime/user/user.js b/public/js/airtime/user/user.js
index 4add2d4b1..6a518fdc1 100644
--- a/public/js/airtime/user/user.js
+++ b/public/js/airtime/user/user.js
@@ -2,6 +2,7 @@ function populateForm(entries){
//$('#user_details').show();
$('.errors').remove();
+ $('.success').remove();
$('#user_id').val(entries.id);
$('#login').val(entries.login);
diff --git a/public/js/playlist/playlist.js b/public/js/playlist/playlist.js
index 98b227381..a72e94dc2 100644
--- a/public/js/playlist/playlist.js
+++ b/public/js/playlist/playlist.js
@@ -165,11 +165,12 @@ function updatePlaybar(){
/* Column 1 update */
$('#playlist').text("Current Show:");
+ var recElem = $('.recording-show');
if (currentShow.length > 0){
$('#playlist').text(currentShow[0].name);
-
- var recElem = $('.recording-show');
(currentShow[0].record == "1") ? recElem.show(): recElem.hide();
+ } else {
+ recElem.hide();
}
$('#show-length').empty();
diff --git a/python_apps/show-recorder/install/recorder-daemontools.sh b/python_apps/show-recorder/install/recorder-daemontools.sh
index 2e8157098..36510dfde 100644
--- a/python_apps/show-recorder/install/recorder-daemontools.sh
+++ b/python_apps/show-recorder/install/recorder-daemontools.sh
@@ -1,6 +1,7 @@
#!/bin/sh
recorder_user="pypo"
export HOME="/home/pypo/"
+export TERM=xterm
# Location of pypo_cli.py Python script
recorder_path="/opt/recorder/bin/"
recorder_script="testrecordscript.py"
@@ -8,8 +9,8 @@ recorder_script="testrecordscript.py"
api_client_path="/opt/pypo/"
echo "*** Daemontools: starting daemon"
-cd ${recorder_path}
exec 2>&1
# Note the -u when calling python! we need it to get unbuffered binary stdout and stderr
+
sudo PYTHONPATH=${api_client_path} -u ${recorder_user} python -u ${recorder_path}${recorder_script} -f
# EOF
diff --git a/python_apps/show-recorder/testrecordscript.py b/python_apps/show-recorder/testrecordscript.py
index 2209c9184..3b005835b 100644
--- a/python_apps/show-recorder/testrecordscript.py
+++ b/python_apps/show-recorder/testrecordscript.py
@@ -13,7 +13,8 @@ from poster.encode import multipart_encode
from poster.streaminghttp import register_openers
import urllib2
-from subprocess import call
+#from subprocess import call
+from subprocess import Popen, PIPE
from threading import Thread
# For RabbitMQ
@@ -56,8 +57,10 @@ class ShowRecorder(Thread):
filename = self.filename.replace(" ", "-")
filepath = "%s%s.%s" % (config["base_recorded_files"], filename, self.filetype)
- command = "ecasound -i alsa -o %s -t:%s" % (filepath, length)
- call(command, shell=True)
+ command = ("ecasound -i alsa -o %s -t:%s" % (filepath, length)).split(' ')
+ print(command)
+ Popen(command, stdout=PIPE)
+ #call(command, shell=False)
return filepath