From 05198dd767c7a6a0271130f31590dd2c336c3c9a Mon Sep 17 00:00:00 2001 From: Patrick Lockley Date: Mon, 23 Jul 2012 21:20:53 +0000 Subject: [PATCH] neatened display of the workspace properties tab git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@404 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641 --- .../peer_templates_template.php | 2 +- .../public_templates_template.php | 2 +- .../rss_templates_template.php | 6 +++--- .../shared_templates_template.php | 10 +++++----- .../syndication_templates_template.php | 6 +++--- .../usage_templates_template.php | 18 ++++++++++++++---- .../workspaceproperties/workspace_library.php | 4 ++-- .../workspace_templates_template.php | 2 +- .../xml_templates_template.php | 2 +- 9 files changed, 31 insertions(+), 21 deletions(-) diff --git a/website_code/php/workspaceproperties/peer_templates_template.php b/website_code/php/workspaceproperties/peer_templates_template.php index 7f477fc5cd..5c811818fa 100644 --- a/website_code/php/workspaceproperties/peer_templates_template.php +++ b/website_code/php/workspaceproperties/peer_templates_template.php @@ -30,7 +30,7 @@ $query_peer_response = mysql_query($query_for_peer_templates); -workspace_menu_create(); +workspace_menu_create(60); echo "
" . PEER_REVIEW_NAME . "
"; diff --git a/website_code/php/workspaceproperties/public_templates_template.php b/website_code/php/workspaceproperties/public_templates_template.php index 679468f5a0..70b5d01154 100644 --- a/website_code/php/workspaceproperties/public_templates_template.php +++ b/website_code/php/workspaceproperties/public_templates_template.php @@ -33,7 +33,7 @@ while($row_template_name = mysql_fetch_array($query_public_response)){ - echo "
" . str_replace("_","",$row['template_name']) . "
"; + echo "
" . str_replace("_","",$row_template_name['template_name']) . "
"; } diff --git a/website_code/php/workspaceproperties/rss_templates_template.php b/website_code/php/workspaceproperties/rss_templates_template.php index d9a0757f43..ac905e7359 100644 --- a/website_code/php/workspaceproperties/rss_templates_template.php +++ b/website_code/php/workspaceproperties/rss_templates_template.php @@ -27,17 +27,17 @@ $database_connect_id = database_connect("Folder_content_template.php connect success","Folder_content_template.php connect failed"); -$query_for_rss_templates = "select * from " . $xerte_toolkits_site->database_table_prefix . "templatedetails, " . $xerte_toolkits_site->database_table_prefix . "templaterights, " . $xerte_toolkits_site->database_table_prefix . "templatesyndication where creator_id=\"" . $_SESSION['toolkits_logon_id'] . "\" and " . $xerte_toolkits_site->database_table_prefix . "templatedetails.template_id = " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id and " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id = " . $xerte_toolkits_site->database_table_prefix . "templatesyndication.template_id and (rss=\"true\" or export=\"true\")"; +$query_for_rss_templates = "select * from " . $xerte_toolkits_site->database_table_prefix . "templatedetails, " . $xerte_toolkits_site->database_table_prefix . "templaterights, " . $xerte_toolkits_site->database_table_prefix . "templatesyndication where creator_id=\"" . $_SESSION['toolkits_logon_id'] . "\" and " . $xerte_toolkits_site->database_table_prefix . "templatedetails.template_id = " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id and " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id = " . $xerte_toolkits_site->database_table_prefix . "templatesyndication.template_id and role=\"creator\" and (rss=\"true\" or export=\"true\")"; $query_rss_response = mysql_query($query_for_rss_templates); -workspace_menu_create(); +workspace_menu_create(50); echo "
" . RSS_WORKSPACE_RSS . "
" . RSS_WORKSPACE_EXPORT . "
"; while($row_template_name = mysql_fetch_array($query_rss_response)){ - echo "
" . str_replace("_","",$row['template_name']) . "
"; + echo "
" . str_replace("_","",$row_template_name['template_name']) . "
"; if($row_template_name['rss']){ diff --git a/website_code/php/workspaceproperties/shared_templates_template.php b/website_code/php/workspaceproperties/shared_templates_template.php index f2acf9e4ba..35a3316773 100644 --- a/website_code/php/workspaceproperties/shared_templates_template.php +++ b/website_code/php/workspaceproperties/shared_templates_template.php @@ -26,18 +26,18 @@ $database_connect_id = database_connect("Folder_content_template.php connect success","Folder_content_template.php connect failed"); -$query_for_shared_templates = "select * from " . $xerte_toolkits_site->database_table_prefix . "logindetails, " . $xerte_toolkits_site->database_table_prefix . "templatedetails, " . $xerte_toolkits_site->database_table_prefix . "templaterights where user_id=\"" . $_SESSION['toolkits_logon_id'] . "\" and role!=\"creator\" and " . $xerte_toolkits_site->database_table_prefix . "templatedetails.template_id = " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id and creator_id = login_id"; +$query_for_shared_templates = "select * from " . $xerte_toolkits_site->database_table_prefix . "logindetails, " . $xerte_toolkits_site->database_table_prefix . "templatedetails, " . $xerte_toolkits_site->database_table_prefix . "templaterights where user_id=\"" . $_SESSION['toolkits_logon_id'] . "\" and " . $xerte_toolkits_site->database_table_prefix . "templatedetails.template_id = " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id and creator_id = login_id"; $query_shared_response = mysql_query($query_for_shared_templates); -workspace_menu_create(); +workspace_menu_create(60); -echo "
" . SHARED_TEMPLATE_CREATOR . "
"; +echo "
" . SHARED_TEMPLATE_CREATOR . "
"; while($row_template_name = mysql_fetch_array($query_shared_response)){ - echo "
" . str_replace("_","",$row['template_name']) . "
"; - echo "
" . $row_template_name['firstname'] . " " . $row_template_name['surname'] . "
"; + echo "
" . str_replace("_","",$row_template_name['template_name']) . "
"; + echo "
" . $row_template_name['firstname'] . " " . $row_template_name['surname'] . "
"; } diff --git a/website_code/php/workspaceproperties/syndication_templates_template.php b/website_code/php/workspaceproperties/syndication_templates_template.php index ac9951d24b..d3be004e8d 100644 --- a/website_code/php/workspaceproperties/syndication_templates_template.php +++ b/website_code/php/workspaceproperties/syndication_templates_template.php @@ -25,17 +25,17 @@ $database_connect_id = database_connect("Folder_content_template.php connect success","Folder_content_template.php connect failed"); -$query_for_rss_templates = "select * from " . $xerte_toolkits_site->database_table_prefix . "templatedetails, " . $xerte_toolkits_site->database_table_prefix . "templaterights, " . $xerte_toolkits_site->database_table_prefix . "templatesyndication where creator_id=\"" . $_SESSION['toolkits_logon_id'] . "\" and " . $xerte_toolkits_site->database_table_prefix . "templatedetails.template_id = " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id and " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id = " . $xerte_toolkits_site->database_table_prefix . "templatesyndication.template_id and (rss=\"true\" or export=\"true\")"; +$query_for_rss_templates = "select * from " . $xerte_toolkits_site->database_table_prefix . "templatedetails, " . $xerte_toolkits_site->database_table_prefix . "templaterights, " . $xerte_toolkits_site->database_table_prefix . "templatesyndication where creator_id=\"" . $_SESSION['toolkits_logon_id'] . "\" and " . $xerte_toolkits_site->database_table_prefix . "templatedetails.template_id = " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id and " . $xerte_toolkits_site->database_table_prefix . "templaterights.template_id = " . $xerte_toolkits_site->database_table_prefix . "templatesyndication.template_id and role=\"creator\" and (rss=\"true\" or export=\"true\")"; $query_rss_response = mysql_query($query_for_rss_templates); -workspace_menu_create(); +workspace_menu_create(50); echo "
" . SYNDICATION_TEMPLATE_TERM . "
"; while($row_template_name = mysql_fetch_array($query_rss_response)){ - echo "
" . str_replace("_","",$row['template_name']) . "
"; + echo "
" . str_replace("_","",$row_template_name['template_name']) . "
"; if($row_template_name['syndication']){ diff --git a/website_code/php/workspaceproperties/usage_templates_template.php b/website_code/php/workspaceproperties/usage_templates_template.php index 07c2a597f7..903d2a080f 100644 --- a/website_code/php/workspaceproperties/usage_templates_template.php +++ b/website_code/php/workspaceproperties/usage_templates_template.php @@ -30,14 +30,24 @@ $query_shared_response = mysql_query($query_for_shared_templates); -workspace_menu_create(); +workspace_menu_create(60); -echo "
" . USAGE_TEMPLATE_STATS . "
"; +echo "
" . USAGE_TEMPLATE_STATS . "
"; while($row_template_name = mysql_fetch_array($query_shared_response)){ - echo "
" . str_replace("_","",$row['template_name']). "
"; - echo "
" . $row_template_name['number_of_uses'] . "
"; + if(trim($row_template_name['number_of_uses'])!=""){ + + $plays = $row_template_name['number_of_uses']; + + }else{ + + $plays = 0; + + } + + echo "
" . str_replace("_","",$row_template_name['template_name']). "
"; + echo "
" . $plays . "
"; } diff --git a/website_code/php/workspaceproperties/workspace_library.php b/website_code/php/workspaceproperties/workspace_library.php index 511581d4a5..c24261e919 100644 --- a/website_code/php/workspaceproperties/workspace_library.php +++ b/website_code/php/workspaceproperties/workspace_library.php @@ -17,11 +17,11 @@ function workspace_templates_menu(){ } - function workspace_menu_create(){ + function workspace_menu_create($size){ echo "
"; - echo "
" . WORKSPACE_LIBRARY_TEMPLATE_NAME . "
"; + echo "
" . WORKSPACE_LIBRARY_TEMPLATE_NAME . "
"; } diff --git a/website_code/php/workspaceproperties/workspace_templates_template.php b/website_code/php/workspaceproperties/workspace_templates_template.php index 78a9f3a072..89838a01e6 100644 --- a/website_code/php/workspaceproperties/workspace_templates_template.php +++ b/website_code/php/workspaceproperties/workspace_templates_template.php @@ -32,7 +32,7 @@ while($row_template_name = mysql_fetch_array($query_created_response)){ - echo "
" . str_replace("_","",$row['template_name']) . "
"; + echo "
" . str_replace("_","",$row_template_name['template_name']) . "
"; } diff --git a/website_code/php/workspaceproperties/xml_templates_template.php b/website_code/php/workspaceproperties/xml_templates_template.php index 24bd1a51e4..0e698d3b1e 100644 --- a/website_code/php/workspaceproperties/xml_templates_template.php +++ b/website_code/php/workspaceproperties/xml_templates_template.php @@ -30,7 +30,7 @@ $query_peer_response = mysql_query($query_for_peer_templates); -workspace_menu_create(); +workspace_menu_create(60); echo "
" . XML_TEMPLATE_NAME . "
";