Bug 53697
Configurable position of "fat footer" - top or bottom Bookmarks in saved searches git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@485 6955db30-a419-402b-8a0d-67ecbb4d7f56master
parent
5925f91a29
commit
430409f7ba
|
@ -69,6 +69,8 @@ sub SETTINGS {
|
|||
remind_me_about_worktime => { options => ['on', 'off'], default => 'on' },
|
||||
remind_me_about_flags => { options => ['on', 'off'], default => 'on' },
|
||||
remind_me_about_worktime_newbug => { options => ['on', 'off'], default => 'off' },
|
||||
# 2009-10-21 vfilippov@custis.ru -- Custis Bug 53697
|
||||
saved_searches_position => { options => ['footer', 'header'], default => 'footer' },
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ $filename =~ s/\\/\\\\/g; # escape backslashes
|
|||
$filename =~ s/"/\\"/g; # escape quotes
|
||||
|
||||
# Take appropriate action based on user's request.
|
||||
if ($cmdtype eq "dorem") {
|
||||
if ($cmdtype eq "dorem") {
|
||||
if ($remaction eq "run") {
|
||||
my $query_id;
|
||||
($buffer, $query_id) = Bugzilla::Search::LookupNamedQuery(
|
||||
|
@ -395,6 +395,12 @@ if ($cmdtype eq "dorem") {
|
|||
$vars->{'searchtype'} = "saved";
|
||||
$vars->{'search_id'} = $query_id;
|
||||
}
|
||||
if ($buffer =~ m!^[a-z][a-z0-9]*://!so)
|
||||
{
|
||||
# CustIS Bug 53697: Custom links in saved searches and footer/header
|
||||
print $cgi->redirect(-location => $buffer);
|
||||
exit;
|
||||
}
|
||||
$params = new Bugzilla::CGI($buffer);
|
||||
$order = $params->param('order') || $order;
|
||||
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
SET NAMES utf8;
|
||||
INSERT INTO setting (name, default_value, is_enabled, subclass) VALUES
|
||||
('remind_me_about_worktime', 'on', 1, NULL)
|
||||
,('remind_me_about_flags', 'on', 1, NULL)
|
||||
,('redirect_me_to_my_bugzilla', 'off', 1, NULL)
|
||||
;
|
||||
INSERT INTO setting_value (name, value, sortindex) VALUES
|
||||
('remind_me_about_worktime', 'on', 5)
|
||||
,('remind_me_about_worktime', 'off', 10)
|
||||
,('remind_me_about_flags', 'on', 5)
|
||||
,('remind_me_about_flags', 'off', 10)
|
||||
,('redirect_me_to_my_bugzilla', 'off', 5)
|
||||
,('redirect_me_to_my_bugzilla', 'on', 10)
|
||||
;
|
||||
CREATE TABLE `bugzilla`.`emailin_fields` (
|
||||
`address` VARCHAR( 255 ) NOT NULL ,
|
||||
`field` VARCHAR( 255 ) NOT NULL ,
|
||||
`value` VARCHAR( 255 ) NOT NULL ,
|
||||
PRIMARY KEY ( `address` , `field` )
|
||||
) ENGINE = InnoDB COMMENT = 'Заданные поля для email_in.pl';
|
|
@ -34,7 +34,7 @@ body {
|
|||
-moz-border-radius-topright: 5px;
|
||||
}
|
||||
|
||||
#header .links, #footer {
|
||||
#header, #footer {
|
||||
background-color: #929bb1;
|
||||
color: #ddd;
|
||||
}
|
||||
|
@ -178,24 +178,24 @@ hr {
|
|||
|
||||
/* footer */
|
||||
|
||||
#footer {
|
||||
#header, #footer {
|
||||
border: 1px solid #747e93;
|
||||
width: 100%;
|
||||
-moz-border-radius: 5px;
|
||||
}
|
||||
|
||||
#footer a {
|
||||
#header a, #footer a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
#footer #links-actions,
|
||||
#footer #links-edit,
|
||||
#footer #links-saved,
|
||||
#footer #links-special {
|
||||
#links-actions,
|
||||
#links-edit,
|
||||
#links-saved,
|
||||
#links-special {
|
||||
margin-top: 2ex;
|
||||
}
|
||||
|
||||
#footer .links {
|
||||
.links {
|
||||
border-spacing: 30px;
|
||||
margin-bottom: 2ex;
|
||||
}
|
||||
|
@ -385,3 +385,11 @@ form#Create th:first-child {
|
|||
.flag_table td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#header ul.links.testopia_links, #footer ul.links.testopia_links {
|
||||
margin-top: 2ex;
|
||||
}
|
||||
|
||||
.links.standalone {
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
|
|
@ -113,3 +113,7 @@ th.title {
|
|||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
blockquote table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
|
|
@ -52,15 +52,6 @@
|
|||
display: inline;
|
||||
}
|
||||
|
||||
#header .links {
|
||||
border-left: 1px solid silver;
|
||||
border-right: 1px solid silver;
|
||||
border-bottom: 1px solid silver;
|
||||
-moz-border-radius-bottomleft: 5px;
|
||||
-moz-border-radius-bottomright: 5px;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
#message {
|
||||
border: 1px solid red;
|
||||
margin: 0.3em 0em;
|
||||
|
@ -68,6 +59,24 @@
|
|||
color: green;
|
||||
}
|
||||
|
||||
#header #useful-links {
|
||||
padding-left: 1ex;
|
||||
padding-right: 1ex;
|
||||
}
|
||||
|
||||
#header ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#header .label {
|
||||
white-space: nowrap;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#header .links {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
form.mini_login input.bz_login {
|
||||
width: 10em;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
|
||||
#header .label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#header li.tr_find {
|
||||
}
|
||||
#header li.tr_saved_search {
|
||||
#header .links.testopia_links .label, #footer .links.testopia_links .label {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#header .testopia_btn {
|
||||
|
@ -16,11 +10,6 @@
|
|||
border:none;
|
||||
}
|
||||
|
||||
#footer li.tr_find {
|
||||
}
|
||||
|
||||
#footer li.tr_saved_search {
|
||||
}
|
||||
#footer .tr_btn {
|
||||
background-color: #808285;
|
||||
font-size: 80%;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<p>Your saved searches are as follows:</p>
|
||||
|
||||
<blockquote>
|
||||
<table border="1" cellpadding="3">
|
||||
<table border="1" cellpadding="3">
|
||||
<tr>
|
||||
<th>
|
||||
Search
|
||||
|
@ -155,6 +155,13 @@
|
|||
[% END %]
|
||||
</blockquote>
|
||||
|
||||
<h3>Add Bookmark</h3>
|
||||
<p>You may remember an arbitrary URL as a saved search:</p>
|
||||
<blockquote>
|
||||
<p>Name: <input type="text" name="addbookmarkname" value="" size="20" /> URL: <input type="text" name="addbookmarkurl" value="" size="40" /> </p>
|
||||
</blockquote>
|
||||
|
||||
<h3>Shared Searches</h3>
|
||||
<p>You may use these searches saved and shared by others:</p>
|
||||
|
||||
<blockquote>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
[% DEFAULT qs_suffix = "" %]
|
||||
[% USE Bugzilla %]
|
||||
|
||||
<ul class="links">
|
||||
<ul class="links[% IF standalone %] standalone[% END %]">
|
||||
<li><a href="./">Home</a></li>
|
||||
<li><span class="separator">| </span><a href="enter_bug.cgi">New</a></li>
|
||||
<li><span class="separator">| </span><a href="query.cgi">Search</a></li>
|
||||
|
|
|
@ -39,7 +39,11 @@
|
|||
|
||||
[%# Migration note: useful-links.html.tmpl corresponds to %commandmenu% %]
|
||||
|
||||
[% PROCESS "global/useful-links.html.tmpl" %]
|
||||
[% IF user.id AND user.settings.saved_searches_position.value == "header" %]
|
||||
[% PROCESS "global/common-links.html.tmpl" qs_suffix = "top" standalone = 1 %]
|
||||
[% ELSE %]
|
||||
[% PROCESS "global/useful-links.html.tmpl" %]
|
||||
[% END %]
|
||||
|
||||
<div class="outro"></div>
|
||||
</tr>
|
||||
|
|
|
@ -274,7 +274,11 @@
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
[% PROCESS "global/common-links.html.tmpl" qs_suffix = "_top" in_ul = 0 %]
|
||||
[% IF user.id AND user.settings.saved_searches_position.value == "header" %]
|
||||
[% PROCESS "global/useful-links.html.tmpl" %]
|
||||
[% ELSE %]
|
||||
[% PROCESS "global/common-links.html.tmpl" qs_suffix = "top" standalone = 1 %]
|
||||
[% END %]
|
||||
|
||||
</td></tr>
|
||||
|
||||
|
|
|
@ -50,6 +50,9 @@
|
|||
"remind_me_about_worktime_newbug" => "Remind me to track worktime for new bugs",
|
||||
"remind_me_about_flags" => "Remind me about flag requests",
|
||||
"redirect_me_to_my_bugzilla" => "Redirect me to my bugzilla",
|
||||
"saved_searches_position" => "Position of Saved Searches bar",
|
||||
"footer" => "Page footer",
|
||||
"header" => "Page header",
|
||||
}
|
||||
%]
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
<ul id="useful-links">
|
||||
<li id="links-actions">
|
||||
[% PROCESS "global/common-links.html.tmpl" qs_suffix = "_bottom" in_ul = 1 %]
|
||||
[% PROCESS "global/common-links.html.tmpl" qs_suffix = "_bottom" standalone = 0 %]
|
||||
</li>
|
||||
|
||||
[%# Saved searches %]
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
[%# 1.0@bugzilla.org %]
|
||||
[%# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Bugzilla Testopia System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Greg Hendricks.
|
||||
# Portions created by Greg Hendricks are Copyright (C) 2006
|
||||
# Novell. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): Greg Hendricks <ghendricks@novell.com>
|
||||
#%]
|
||||
|
||||
[% IF user.login AND user.settings.view_testopia.value == 'on' AND user.in_group('Testers') %]
|
||||
[% IF in_ul %]
|
||||
<li id="links-testopia">
|
||||
[% END %]
|
||||
<ul class="links testopia_links">
|
||||
<li class="label" style="margin-top: 5px; width: auto">Testopia:</li>
|
||||
<li><a href="tr_show_product.cgi">Product Dashboard</a></li>
|
||||
[% IF user.in_group('Testers') %]
|
||||
<li><span class="separator">| </span><a href="tr_new_plan.cgi">New Plan</a></li>
|
||||
[% END %]
|
||||
<li><span class="separator">| </span><a href="tr_new_case.cgi?plan_id=[% plan_id FILTER none %]">New Case</a></li>
|
||||
<li><span class="separator">| </span><a href="tr_new_run.cgi?plan_id=[% plan_id FILTER none %]&case_status_id=2">New Run</a></li>
|
||||
<li><span class="separator">| </span><a href="tr_query.cgi">Search</a></li>
|
||||
|
||||
[% IF user.in_group('admin') %]
|
||||
<li><span class="separator">| </span><a href="tr_admin.cgi">Admin</a></li>
|
||||
[% END %]
|
||||
<li><span class="separator">| </span><a href="testopia/doc/Manual.pdf" target="_blank">Help</a></li>
|
||||
|
||||
<li class="tr_saved_search">
|
||||
<select class="dropdown" onchange="if (this.selectedIndex != 0) {document.location=this.value}">
|
||||
<option>--Testopia--</option>
|
||||
<option value="tr_list_runs.cgi?current_tab=run&run_status=0&distinct=1">Current Runs</a></option>
|
||||
<option value="tr_list_plans.cgi?current_tab=plan&report_type=myplans">My Plans</a></option>
|
||||
<option value="tr_list_cases.cgi?current_tab=case&summary_type=allwordssubstr&summary=&tcaction_type=allwordssubstr&tcaction=&tceffect_type=allwordssubstr&tceffect=&script_type=allwordssubstr&script=&requirement_type=allwordssubstr&requirement=&tag_type=allwords&tags=&author_type=exact&author=&default_tester_type=substring&default_tester=[% user.login FILTER url_quote %]&case_id=&plan_id=&distinct=1">My Cases</a></option>
|
||||
<option value="tr_list_runs.cgi?current_tab=run&summary_type=allwordssubstr&summary=¬es_type=allwordssubstr¬es=&environment_type=allwordssubstr&environment=&tag_type=allwords&tag=&manager_type=substring&manager=[% user.login FILTER url_quote %]&run_id=&plan_id=&assignee_type=substr&assignee=[% user.login FILTER url_quote %]&distinct=1&order=run_id&dir=DESC">My Runs</a></option>
|
||||
[% FOREACH q = user.testopia_queries %]
|
||||
<option value="[% q.query %]">[% q.name FILTER html %]</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</li>
|
||||
<li class="form tr_find">
|
||||
<form action="tr_quicksearch.cgi">
|
||||
<input class="txt" type="text" name="searchstr" id="tr_quicksearch" />
|
||||
<input class='btn testopia_btn' type='submit' value='Find'>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
[% IF in_ul %]</li>[% END %]
|
||||
[% END %]
|
||||
<script type="text/javascript">
|
||||
DEFAULT_CASE_STATUS = '[% Param('default-test-case-status') %]';
|
||||
</script>
|
|
@ -19,6 +19,45 @@
|
|||
#%]
|
||||
[% IF user.login AND user.settings.view_testopia.value == 'on' AND user.in_group('Testers') %]
|
||||
|
||||
<ul class="links testopia_links">
|
||||
<li class="label" style="width: auto">Testopia:</li>
|
||||
<li><a href="tr_show_product.cgi">Product Dashboard</a></li>
|
||||
[% IF user.in_group('Testers') %]
|
||||
<li><span class="separator">| </span><a href="tr_new_plan.cgi">New Plan</a></li>
|
||||
[% END %]
|
||||
<li><span class="separator">| </span><a href="tr_new_case.cgi?plan_id=[% plan_id FILTER none %]">New Case</a></li>
|
||||
<li><span class="separator">| </span><a href="tr_new_run.cgi?plan_id=[% plan_id FILTER none %]&case_status_id=2">New Run</a></li>
|
||||
<li><span class="separator">| </span><a href="tr_query.cgi">Search</a></li>
|
||||
|
||||
[% IF user.in_group('admin') %]
|
||||
<li><span class="separator">| </span><a href="tr_admin.cgi">Admin</a></li>
|
||||
[% END %]
|
||||
<li><span class="separator">| </span><a href="testopia/doc/Manual.pdf" target="_blank">Help</a></li>
|
||||
|
||||
<li class="tr_saved_search">
|
||||
<select class="dropdown" onchange="if (this.selectedIndex != 0) {document.location=this.value}">
|
||||
<option>--Testopia--</option>
|
||||
<option value="tr_list_runs.cgi?current_tab=run&run_status=0&distinct=1">Current Runs</a></option>
|
||||
<option value="tr_list_plans.cgi?current_tab=plan&report_type=myplans">My Plans</a></option>
|
||||
<option value="tr_list_cases.cgi?current_tab=case&summary_type=allwordssubstr&summary=&tcaction_type=allwordssubstr&tcaction=&tceffect_type=allwordssubstr&tceffect=&script_type=allwordssubstr&script=&requirement_type=allwordssubstr&requirement=&tag_type=allwords&tags=&author_type=exact&author=&default_tester_type=substring&default_tester=[% user.login FILTER url_quote %]&case_id=&plan_id=&distinct=1">My Cases</a></option>
|
||||
<option value="tr_list_runs.cgi?current_tab=run&summary_type=allwordssubstr&summary=¬es_type=allwordssubstr¬es=&environment_type=allwordssubstr&environment=&tag_type=allwords&tag=&manager_type=substring&manager=[% user.login FILTER url_quote %]&run_id=&plan_id=&assignee_type=substr&assignee=[% user.login FILTER url_quote %]&distinct=1&order=run_id&dir=DESC">My Runs</a></option>
|
||||
[% FOREACH q = user.testopia_queries %]
|
||||
<option value="[% q.query %]">[% q.name FILTER html %]</option>
|
||||
[% END %]
|
||||
</select>
|
||||
</li>
|
||||
<li class="form tr_find">
|
||||
<form action="tr_quicksearch.cgi">
|
||||
<input class="txt" type="text" name="searchstr" id="tr_quicksearch" />
|
||||
<input class='btn testopia_btn' type='submit' value='Find'>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<script type="text/javascript">
|
||||
DEFAULT_CASE_STATUS = '[% Param('default-test-case-status') %]';
|
||||
</script>
|
||||
|
||||
<div id="links-saved">
|
||||
<ul class="links">
|
||||
<li class="label">Testopia Saved Searches:</li>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
use strict;
|
||||
|
||||
use lib qw(. lib);
|
||||
use URI;
|
||||
|
||||
use Bugzilla;
|
||||
use Bugzilla::Constants;
|
||||
|
@ -405,9 +406,23 @@ sub DoPermissions {
|
|||
|
||||
|
||||
sub DoSavedSearches {
|
||||
my $cgi = Bugzilla->cgi;
|
||||
my $dbh = Bugzilla->dbh;
|
||||
my $user = Bugzilla->user;
|
||||
|
||||
# CustIS Bug 53697 - Bookmarks
|
||||
if ((my $name = trim($cgi->param('addbookmarkname'))) &&
|
||||
(my $url = $cgi->param('addbookmarkurl')))
|
||||
{
|
||||
trick_taint($name);
|
||||
trick_taint($url);
|
||||
eval { $url = URI->new($url)->canonical->as_string; };
|
||||
ThrowCodeError("invalid_url", { url => $url }) if $@;
|
||||
$dbh->do('INSERT INTO namedqueries (userid, name, query) VALUES (?, ?, ?)', undef,
|
||||
$user->id, $name, $url);
|
||||
$dbh->commit;
|
||||
}
|
||||
|
||||
if ($user->queryshare_groups_as_string) {
|
||||
$vars->{'queryshare_groups'} =
|
||||
Bugzilla::Group->new_from_list($user->queryshare_groups);
|
||||
|
|
Loading…
Reference in New Issue