View | Details | Raw Unified | Return to bug 31028
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_31028.pl (+33 lines)
Lines 52-56 return { Link Here
52
	        }
52
	        }
53
        );
53
        );
54
        say $out "`OpacCatalogConcerns` preference added";
54
        say $out "`OpacCatalogConcerns` preference added";
55
56
        if ( ( $dbh->selectrow_array('SELECT COUNT(*) FROM additional_contents WHERE location=?', undef, 'CatalogConcernHelp') )[0] == 0 ) { # Check to make idempotent
57
            $dbh->do(
58
                q{
59
                    INSERT INTO additional_contents ( category, code, location, title, content, lang, published_on ) VALUES ('html_customizations', 'CatalogConcernHelp_1', 'CatalogConcernHelp', 'Catalog concern help text', 'Please describe your concern clearly and the library will try to deal with it as quickly as possible', 'default', CAST(NOW() AS date) )
60
                }
61
            );
62
            say $out "`CatalogConcernHelp` block added to html_customization";
63
        }
64
65
        if ( ( $dbh->selectrow_array('SELECT COUNT(*) FROM additional_contents WHERE location=?', undef, 'CatalogConcernTemplate') )[0] == 0 ) { # Check to make idempotent
66
            my $cc_template = <<~ 'END_TEMPLATE';
67
            **Describe the concern**
68
            A clear and concise description of what the concern is.
69
70
            **To Reproduce**
71
            Steps to reproduce the behavior:
72
            1. Go to '...'
73
            2. Click on '....'
74
            3. Scroll down to '....'
75
            4. See error
76
77
            **Expected behavior**
78
            A clear and concise description of what you expected to happen.
79
            END_TEMPLATE
80
81
            $dbh->do(
82
                qq{
83
                    INSERT INTO additional_contents ( category, code, location, title, content, lang, published_on ) VALUES ('html_customizations', 'CatalogConcernTemplate_1', 'CatalogConcernTemplate', 'Catalog concern template text', "$cc_template", 'default', CAST(NOW() AS date) )
84
                }
85
            );
86
            say $out "`CatalogConcernTemplate` block added to html_customization";
87
        }
55
    }
88
    }
56
}
89
}
(-)a/installer/data/mysql/en/optional/sample_news.yml (+11 lines)
Lines 55-57 tables: Link Here
55
          published_on: "2007-10-29 05:34:45"
55
          published_on: "2007-10-29 05:34:45"
56
          expirationdate: "2099-01-10"
56
          expirationdate: "2099-01-10"
57
          number: 2
57
          number: 2
58
59
        - title: ""
60
          category: "html_customizations"
61
          location: "CatalogConcernHelp"
62
          code: "CatalogConcernHelp_1"
63
          content:
64
              - "Please describe your concern clearly and the library will try to deal with it as quickly as possible"
65
          lang: "default"
66
          published_on: "2007-10-29 05:25:58"
67
          expirationdate: "2099-01-10"
68
          number: 1
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-1 / +1 lines)
Lines 487-493 Link Here
487
            [% END %]
487
            [% END %]
488
        [% END %]
488
        [% END %]
489
    [% ELSE %]
489
    [% ELSE %]
490
        [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo' ] %]
490
        [% SET available_options = [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches', 'OpacMySummaryNote', 'OpacLibraryInfo', 'CatalogConcernHelp', 'CatalogConcernTemplate' ] %]
491
        [% FOREACH l IN available_options.sort %]
491
        [% FOREACH l IN available_options.sort %]
492
            [% IF l == location %]
492
            [% IF l == location %]
493
                <option value="[% l | html %]" selected="selected">[% l | html %]</option>
493
                <option value="[% l | html %]" selected="selected">[% l | html %]</option>
(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (+7 lines)
Lines 147-152 textarea { Link Here
147
    width: 50%;
147
    width: 50%;
148
}
148
}
149
149
150
.help-block {
151
    display: block;
152
    margin-top: 5px;
153
    margin-bottom: 10px;
154
    color: #737373;
155
}
156
150
legend {
157
legend {
151
    color: #727272;
158
    color: #727272;
152
    font-size: 110%;
159
    font-size: 110%;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/modals/catalog_concern.inc (-2 / +15 lines)
Lines 1-3 Link Here
1
[% USE AdditionalContents %]
2
[% SET CatalogConcernHelp = AdditionalContents.get( location => "CatalogConcernHelp", lang => lang, library => logged_in_user.branchcode || default_branch ) %]
3
[% SET CatalogConcernTemplate = AdditionalContents.get( location => "CatalogConcernTemplate", lang => lang, library => logged_in_user.branchcode || default_branch ) %]
1
<!-- Add concern modal -->
4
<!-- Add concern modal -->
2
<div class="modal" id="addConcernModal" tabindex="-1" role="dialog" aria-labelledby="addConcernModalLabel" aria-hidden="true">
5
<div class="modal" id="addConcernModal" tabindex="-1" role="dialog" aria-labelledby="addConcernModalLabel" aria-hidden="true">
3
    <div class="modal-dialog modal-lg">
6
    <div class="modal-dialog modal-lg">
Lines 16-22 Link Here
16
                    </div>
19
                    </div>
17
                    <div class="form-group">
20
                    <div class="form-group">
18
                        <label for="concern_body">Please decribe your concerns: </label>
21
                        <label for="concern_body">Please decribe your concerns: </label>
19
                        <textarea class="form-control" name="concern_body" id="concern_body" required="required" rows="15"></textarea>
22
                        <textarea class="form-control" name="concern_body" id="concern_body" aria-describedby="helpBlock" required="required" rows="15">
23
                        [%- IF CatalogConcernTemplate && CatalogConcernTemplate.content && CatalogConcernTemplate.content.count > 0 -%]
24
                        [%- FOREACH template IN CatalogConcernTemplate.content -%]
25
                        [%- template.content | $raw -%]
26
                        [%- END -%]
27
                        [%- END -%]
28
                        </textarea>
29
                        [%- IF CatalogConcernHelp && CatalogConcernHelp.content && CatalogConcernHelp.content.count > 0 -%]
30
                        [%- FOREACH help IN CatalogConcernHelp.content -%]
31
                        <p id="helpBlock" class="help-block">[%- help.content | $raw -%]</p>
32
                        [%- END -%]
33
                        [%- END -%]
20
                    </div>
34
                    </div>
21
                </fieldset>
35
                </fieldset>
22
            </div>
36
            </div>
23
- 

Return to bug 31028