From a9da6a6fa22325ba0dfecd4d46ae23305473796f Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Sat, 2 Apr 2011 00:22:55 -0400 Subject: Reworked search Still has tentacles and should have been integrated into the existing API/Browse implementation better, but it's functional. --- templates/show_edit_smartplaylist_row.inc.php | 45 ++++++++ templates/show_edit_smartplaylist_title.inc.php | 43 +++++++ templates/show_random.inc.php | 118 +++++++++---------- templates/show_random_rules.inc.php | 59 ---------- templates/show_rules.inc.php | 67 +++++++++++ templates/show_search.inc.php | 145 +++++------------------- templates/show_search_bar.inc.php | 17 ++- templates/show_search_options.inc.php | 2 +- templates/show_smartplaylist.inc.php | 67 +++++++++++ templates/show_smartplaylist_row.inc.php | 39 +++++++ templates/show_smartplaylist_title.inc.php | 24 ++++ templates/show_smartplaylists.inc.php | 63 ++++++++++ templates/sidebar_home.inc.php | 3 +- 13 files changed, 444 insertions(+), 248 deletions(-) create mode 100644 templates/show_edit_smartplaylist_row.inc.php create mode 100644 templates/show_edit_smartplaylist_title.inc.php delete mode 100644 templates/show_random_rules.inc.php create mode 100644 templates/show_rules.inc.php create mode 100644 templates/show_smartplaylist.inc.php create mode 100644 templates/show_smartplaylist_row.inc.php create mode 100644 templates/show_smartplaylist_title.inc.php create mode 100644 templates/show_smartplaylists.inc.php (limited to 'templates') diff --git a/templates/show_edit_smartplaylist_row.inc.php b/templates/show_edit_smartplaylist_row.inc.php new file mode 100644 index 00000000..fadd1bc7 --- /dev/null +++ b/templates/show_edit_smartplaylist_row.inc.php @@ -0,0 +1,45 @@ + + +
+ + + + + +
+ + + type; ${$name} = ' selected="selected"'; ?> + + + + + id . '&type=smartplaylist_row','download',_('Save Changes'),'save_playlist_' . $playlist->id,'edit_playlist_' . $playlist->id); ?> +
+
+ + diff --git a/templates/show_edit_smartplaylist_title.inc.php b/templates/show_edit_smartplaylist_title.inc.php new file mode 100644 index 00000000..e6451e66 --- /dev/null +++ b/templates/show_edit_smartplaylist_title.inc.php @@ -0,0 +1,43 @@ + +
+ + + + + +
+ + + type; ${$name} = ' selected="selected"'; ?> + + + + + id . '&type=smartplaylist_title','download',_('Save Changes'),'save_playlist_' . $playlist->id,'edit_playlist_' . $playlist->id); ?> +
+
+ diff --git a/templates/show_random.inc.php b/templates/show_random.inc.php index 65815e5e..b1287ee8 100644 --- a/templates/show_random.inc.php +++ b/templates/show_random.inc.php @@ -33,80 +33,70 @@ ?> -
- + +
- - - - - - + + + + +
- - -
- - -
 
+ - - + + - - + + - - + +
- - - + + +
- - + + +
- - - + + +
+ + +
- +
diff --git a/templates/show_random_rules.inc.php b/templates/show_random_rules.inc.php deleted file mode 100644 index 45be357e..00000000 --- a/templates/show_random_rules.inc.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @copyright 2001 - 2011 Ampache.org - * @license http://opensource.org/licenses/gpl-2.0 GPLv2 - * @version PHP 5.2 - * @link http://www.ampache.org/ - * @since File available since Release 1.0 - */ - -?> - - -- - - - - - - - - - - - - - - - - - - - -
- diff --git a/templates/show_rules.inc.php b/templates/show_rules.inc.php new file mode 100644 index 00000000..1f98e0ae --- /dev/null +++ b/templates/show_rules.inc.php @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + +
+ +
+ + + + + +
+ + +to_js(); +} +else { + $mysearch = new Search($_REQUEST['type']); + $mysearch->parse_rules(Search::clean_request($_REQUEST)); + $out = $mysearch->to_js(); +} +if ($out) { + echo $out; +} +else { + echo ''; +} +?> diff --git a/templates/show_search.inc.php b/templates/show_search.inc.php index 47c3085f..18992b16 100644 --- a/templates/show_search.inc.php +++ b/templates/show_search.inc.php @@ -37,130 +37,39 @@ */ ?> -
+ - - + + + + + + + +
 
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
- + - -
- - - -
- - - -
- - - - - - -
- - - - - - - -
- - - -
- - - - -
- - - -
+ + +
   - + +    + +
diff --git a/templates/show_search_bar.inc.php b/templates/show_search_bar.inc.php index 486ad9fe..b5bb4f4f 100644 --- a/templates/show_search_bar.inc.php +++ b/templates/show_search_bar.inc.php @@ -33,13 +33,20 @@ ?>
-
- - - + + + + + - +
diff --git a/templates/show_search_options.inc.php b/templates/show_search_options.inc.php index dad9d733..1d890767 100644 --- a/templates/show_search_options.inc.php +++ b/templates/show_search_options.inc.php @@ -40,7 +40,7 @@
  • - +
  • diff --git a/templates/show_smartplaylist.inc.php b/templates/show_smartplaylist.inc.php new file mode 100644 index 00000000..4c276ffd --- /dev/null +++ b/templates/show_smartplaylist.inc.php @@ -0,0 +1,67 @@ + +id . '">' . $title . + ''); +?> +
    + +
    + +
    + + + +
    + +
    + +
    + + diff --git a/templates/show_smartplaylist_row.inc.php b/templates/show_smartplaylist_row.inc.php new file mode 100644 index 00000000..bf1f43f0 --- /dev/null +++ b/templates/show_smartplaylist_row.inc.php @@ -0,0 +1,39 @@ + + + id,'add',_('Add'),'add_playlist_' . $playlist->id); ?> + +f_link; ?> +f_type; ?> +f_user); ?> + + + + + + + has_access()) { ?> + id,'edit',_('Edit'),'edit_playlist_' . $playlist->id); ?> + id,'delete',_('Delete'),'delete_playlist_' . $playlist->id); ?> + + diff --git a/templates/show_smartplaylist_title.inc.php b/templates/show_smartplaylist_title.inc.php new file mode 100644 index 00000000..8691ac98 --- /dev/null +++ b/templates/show_smartplaylist_title.inc.php @@ -0,0 +1,24 @@ + + +f_type, $playlist->name); ?> diff --git a/templates/show_smartplaylists.inc.php b/templates/show_smartplaylists.inc.php new file mode 100644 index 00000000..2c891884 --- /dev/null +++ b/templates/show_smartplaylists.inc.php @@ -0,0 +1,63 @@ + + + ++ + + + + + + + + + + + + + +format(); +?> + + + + + + + + + + + + + + + + +
     
     
    + diff --git a/templates/sidebar_home.inc.php b/templates/sidebar_home.inc.php index b0fb642a..4b97abd5 100644 --- a/templates/sidebar_home.inc.php +++ b/templates/sidebar_home.inc.php @@ -48,6 +48,7 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path');
  • +
  • @@ -77,7 +78,7 @@ $ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path');
  • -
  • +
  • -- cgit