use CGI qw/:standard start_*/;
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+our %config;
+do '../setup.pl';
+
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
my $cgi = new CGI;
</style>
<body style='padding: 25px;'>
+<a href="$config{index}">Home</a>
+
<h1>Configure Circulation Rules</h1>
<hr/>
use OpenILS::Application::Storage::Driver::Pg;
use CGI qw/:standard start_*/;
+our %config;
+do '../setup.pl';
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
my $cgi = new CGI;
</style>
<body style='padding: 25px;'>
+<a href="$config{index}">Home</a>
+
<h1>Copy Status Setup</h1>
<hr/>
use OpenILS::Application::Storage::Driver::Pg;
use CGI qw/:standard start_*/;
+our %config;
+do '../setup.pl';
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
my $cgi = new CGI;
for my $id ( ($cgi->param('id')) ) {
my $u = actor::org_unit->retrieve($id);
for my $col ( keys %org_cols ) {
+ next if ($cgi->param($col."_$id") =~ /Select One/o);
$u->$col( $cgi->param($col."_$id") );
}
$u->update;
<body style='padding: 25px;'>
+<a href="$config{index}">Home</a>
+
<h1>Library Hierarchy Setup</h1>
<hr/>
HEADER
use CGI qw/:standard start_*/;
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+our %config;
+do '../setup.pl';
+
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
my $cgi = new CGI;
</style>
<body style='padding: 25px;'>
+<a href="$config{index}">Home</a>
+
<h1>Organizational Unit Type Setup</h1>
<hr/>
# setup part
#-------------------------------------------------------------------------------
-my %ou_cols = ( qw/id SysID name Name depth Depth parent ParentType can_have_vols CanHaveVolumes can_have_users CanHaveUsers/ );
+my %ou_cols = ( qw/id SysID name Name opac_label OpacLabel depth Depth parent ParentType can_have_vols CanHaveVolumes can_have_users CanHaveUsers/ );
-my @col_display_order = ( qw/id name depth parent can_have_vols can_have_users/ );
+my @col_display_order = ( qw/id name opac_label depth parent can_have_vols can_have_users/ );
#-------------------------------------------------------------------------------
# Logic part
for my $id ( ($cgi->param('id')) ) {
my $u = actor::org_unit_type->retrieve($id);
for my $col (@col_display_order) {
+ next if ($cgi->param($col."_$id") =~ /Select One/o);
$u->$col( $cgi->param($col."_$id") );
}
$u->update;
print Tr(
td( $row->id() ),
td("<input type='text' name='name_$row' value='". $row->name() ."'>"),
+ td("<input type='text' name='opac_label_$row' value='". $row->opac_label() ."'>"),
td("<input type='text' size=3 name='depth_$row' value='". $row->depth() ."'>"),
td("<select name='parent_$row'><option>-- Select One --</option>".do{
my $out = '';
print "<tr class='new_row_class'>",
td(),
td("<input type='text' name='name'>"),
+ td("<input type='text' name='opac_label'>"),
td("<input type='text' size=3 name='depth'>"),
td("<select name='parent'><option>-- Select One --</option>".do{
my $out = '';
use CGI qw/:standard start_*/;
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+our %config;
+do '../setup.pl';
+
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
my $cgi = new CGI;
</style>
<body style='padding: 25px;'>
+<a href="$config{index}">Home</a>
+
<h1>Permission List Setup</h1>
<hr/>
use CGI qw/:standard start_*/;
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+our %config;
+do '../setup.pl';
+
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
my $cgi = new CGI;
</style>
<body style='padding: 25px;'>
+<a href="$config{index}">Home</a>
+
<h1>Superuser Setup</h1>
<hr/>
use CGI qw/:standard start_*/;
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+our %config;
+do '../setup.pl';
+
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
my $cgi = new CGI;
</style>
<body style='padding: 25px;'>
+<a href="$config{index}">Home</a>
+
<h1>User Profile Setup</h1>
<hr/>
use CGI qw/:standard start_*/;
-OpenILS::Application::Storage::CDBI->connection('dbi:Pg:host=10.0.0.2;dbname=demo-dev', 'postgres');
+our %config;
+do '../setup.pl';
+
+OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr});
OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1;
my $cgi = new CGI;
for my $id ( ($cgi->param('id')) ) {
my $u = permission::grp_tree->retrieve($id);
for my $col ( keys %org_cols ) {
+ next if ($cgi->param($col."_$id") =~ /Select One/o);
$u->$col( $cgi->param($col."_$id") );
}
$u->update;
<body style='padding: 25px;'>
+<a href="$config{index}">Home</a>
+
<h1>User Group Hierarchy Setup</h1>
<hr/>
HEADER