diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_artist_box.inc.php | 1 | ||||
-rw-r--r-- | templates/show_rename_artist.inc.php | 2 | ||||
-rw-r--r-- | templates/show_similar_artists.inc | 159 |
3 files changed, 161 insertions, 1 deletions
diff --git a/templates/show_artist_box.inc.php b/templates/show_artist_box.inc.php index 75026d7e..8c9779f4 100644 --- a/templates/show_artist_box.inc.php +++ b/templates/show_artist_box.inc.php @@ -33,6 +33,7 @@ $web_path = conf('web_path'); <?php if ($user->has_access('100')) { ?> <li><a href="<?php echo $web_path; ?>/artists.php?action=update_from_tags&artist=<?php echo $artist_id; ?>"><?php echo _("Update from tags"); ?></a></li> <li><a href="<?php echo $web_path; ?>/artists.php?action=show_rename&artist=<?php echo $artist_id; ?>"><?php echo _("Rename Artist"); ?></a></li> + <li><a href="<?php echo $web_path; ?>/artists.php?action=show_similar&artist=<?php echo $artist_id; ?>"><?php echo _("Find duplicate artists"); ?></a></li> <?php } ?> </ul> </td> diff --git a/templates/show_rename_artist.inc.php b/templates/show_rename_artist.inc.php index 929c54c2..72f707ff 100644 --- a/templates/show_rename_artist.inc.php +++ b/templates/show_rename_artist.inc.php @@ -45,7 +45,7 @@ function insert() </td> </tr> <tr> - <td><input type="checkbox" name="update_id3" value="1" /> <?php echo _("Update id3 tags"); ?></td> + <td><input type="checkbox" name="update_id3" value="yes" /> <?php echo _("Update id3 tags"); ?></td> </tr> <tr> <td> diff --git a/templates/show_similar_artists.inc b/templates/show_similar_artists.inc new file mode 100644 index 00000000..25a9f6d2 --- /dev/null +++ b/templates/show_similar_artists.inc @@ -0,0 +1,159 @@ +<?php +/* + + Copyright (c) 2001 - 2006 Ampache.org + All rights reserved. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ +$web_path = conf('web_path'); +?> +<form name="artists" method="post" enctype="multipart/form-data" action="<?php echo $web_path; ?>/artists.php?action=rename_similar&artist=<?php echo $artist_id;?>" style="Display:inline;"> + <h1>Similar Artists</h1> + <h3>Please check the artists you want to merge with the current one (<span style='text-decoration: underline;'><?php echo $artist_name;?></span>)</h3> + <table class="border" cellspacing="0" cellpadding="0" border="0"> + <tr class="table-header"> + <th> Select</th> + <th><?php echo _("Artist"); ?></th> + </tr> +<?php +if (count($similar_artists) > 0) { + $show = true; + foreach ($similar_artists as $artist_array) { +?> + <tr class="<?php echo flip_class(); ?>"> + <td align="center"> + <input type="checkbox" name="artists[]" value="<?php echo $artist_array[0]; ?>" /> + </td> + <td> + <a href="<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo $artist_array[0]; ?>" title="<?php echo htmlspecialchars($artist_array[1]); ?>" <?php echo $text_class; ?>><?php echo htmlspecialchars($artist_array[1]); ?></a> + </td> + </tr> +<?php + }// foreach loop +} else { // no similar artists + $show = false; +?> + <tr class="<?php echo flip_class(); ?>"> + <td align="center"> + + </td> + <td> + No Similar Artists found + </td> + </tr> + <tr class="<?php echo flip_class(); ?>"> + <td align="center"> + + </td> + <td> + <input class="button" type="button" name="action" value="<?php echo _("Back"); ?>" onclick="window.location.href = '<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo $artist_id;?>';" /> + </td> + </tr> +<?php +} +?> +<?php +if ($show) { +?> +<tr align="left" class="<?php echo flip_class(); ?>"> + <td colspan='2'> + <input class="button" type="button" name="action" value="<?php echo _("Rename selected"); ?>" onclick="document.artists.submit();" /> + <input class="button" type="button" name="action" value="<?php echo _("Cancel"); ?>" onclick="window.location.href = '<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo $artist_id;?>';" /> + </td> +</tr> +<?php +} +?> +</table> +</form> +<form name='advanced' action='<?php echo $web_path; ?>/artists.php?action=show_similar&artist=<?php echo $artist_id; ?>' method='POST'> +<table class="border" cellspacing="0" cellpadding="0" border="0" style='margin-left: 10px; margin-top: 20px;'> +<!--Advanced--> + <tr class="table-header"> + <th colspan='2'>Advanced options</th> + </tr> + <tr class="<?php echo flip_class(); ?>"> + <th colspan='2' style='text-align: left;'>Normalize options</th> + </tr> + <tr class="<?php echo flip_class(); ?>"> + <td colspan='2'> + <label for='n_rep_uml' style='display: inline;'>Replace ümlauts and áccents with normal letters</label> + <input type='checkbox' name='n_rep_uml' id='n_rep_uml' value='yes' style='display: inline;' <?php echo (is_null($_POST['n_rep_uml']) || make_bool($_POST['n_rep_uml']) ? "checked='checked'" : ''); ?>/> + <br/> + <label for='n_filter' style='display: inline;'>filter out (regexp)</label> + <input type='text' name='n_filter' id='n_filter' value='<?php echo (is_null($_POST['n_filter']) ? "/[^a-z ]/" : $_POST['n_filter']); ?>' style='display: inline;'/> + <a href='javascript:default_filter();'>default</a> + <br/> + <label for='n_ignore' style='display: inline;'>ignore (regexp)</label> + <input type='text' name='n_ignore' id='n_ignore' value='<?php echo (is_null($_POST['n_ignore']) ? "/\s(the|an?)\s/" : $_POST['n_ignore']); ?>' style='display: inline;'/> + <a href='javascript:default_ignore();'>default</a> + <br/> + </td> + </tr> + <tr class="<?php echo flip_class(); ?>"> + <th colspan='2' style='text-align: left;'>Compare options</th> + </tr> + <tr class="<?php echo flip_class(); ?>"> + <td> + <label for='c_mode' style='display: inline;'>Line mode</label> + <input type='radio' name='c_mode' id='c_mode' value='line' style='display: inline;' <?php echo (is_null($_POST['c_mode']) || $_POST['c_mode'] == "line" ? "checked='checked'" : ''); ?> /> + </td> + <td> + <No Options> + </td> + </tr> + + <tr class="<?php echo flip_class(); ?>"> + <td> + <label for='c_mode' style='display: inline;'>Word mode</label> + <input type='radio' name='c_mode' id='c_mode' value='word' style='display: inline;' <?php echo (is_null($_POST['c_mode']) || $_POST['c_mode'] == "word" ? "checked='checked'" : ''); ?> /> + </td> + <td> + <label for='c_count_w' style='display: inline;'># words to match (0=disable)</label> + <input type='text' name='c_count_w' id='c_count_w' value='<?php echo (is_null($_POST['c_count_w']) ? "0" : $_POST['c_count_w']); ?>' style='display: inline;' size='2'/> + <br/>OR<br/> + <label for='c_percent_w' style='display: inline;'>% words to match (0=disable)</label> + <input type='text' name='c_percent_w' id='c_percent_w' value='<?php echo (is_null($_POST['c_percent_w']) ? "50" : $_POST['c_percent_w']); ?>' style='display: inline;' size='4'/>% + <br/> + </td> + </tr> + <tr class="<?php echo flip_class(); ?>"> + <td> + <label for='c_mode' style='display: inline;'>Letter mode</label> + <input type='radio' name='c_mode' id='c_mode' value='letter' style='display: inline;' <?php echo ($_POST['c_mode'] == "letter" ? "checked='checked'" : ''); ?> /> + </td> + <td> + <label for='c_distance_l' style='display: inline;'>Max (levenshtein) difference, the larger the looser</label> + <input type='text' name='c_distance_l' id='c_distance_l' value='<?php echo (is_null($_POST['c_distance_l']) ? "2" : $_POST['c_distance_l']); ?>' style='display: inline;' size='2'/> + </td> + </tr> + <tr class="<?php echo flip_class(); ?>"> + <td colspan='2'> + <input class="button" type="button" name="action" value="<?php echo _("Search Again"); ?>" onclick="document.advanced.submit();" /> + </td> + </tr> + +</table> +</form> +<script language='javascript'> + function default_filter() { + document.getElementById('n_filter').value = "/[^a-z ]/"; + } + function default_ignore() { + document.getElementById('n_ignore').value = "/\s(the|an?)\s/"; + } +</script>
\ No newline at end of file |