Last modified by root_xwiki on 2025/10/09 04:06

From version 1.1
edited by root_xwiki
on 2025/10/08 07:03
Change comment: There is no comment for this version
To version 3.1
edited by root_xwiki
on 2025/10/09 04:05
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,0 +1,124 @@
1 += Служба охраны труда =
2 +
3 +Добро пожаловать в раздел инструкций по охране труда. Ниже представлены все доступные инструкции:
4 +
5 +== Инструкции отдела ==
6 +
7 +{{velocity}}
8 +## Получаем текущее пространство
9 +#set($currentSpace = $doc.space)
10 +
11 +## Запрос для nested spaces
12 +#set($query = "select doc.fullName from XWikiDocument as doc where doc.space like '${currentSpace}.%' and doc.name = 'WebHome' order by doc.title")
13 +#set($childPages = $services.query.hql($query).execute())
14 +
15 +## Проверяем, есть ли инструкции
16 +#if($childPages && $childPages.size() > 0)
17 + {{html clean="false"}}
18 + <div class="row justify-content-start">
19 + #foreach($childPageFullName in $childPages)
20 + #set($childDoc = $xwiki.getDocument($childPageFullName))
21 + #set($childTitle = $childDoc.getPlainTitle())
22 + #set($childURL = $childDoc.getURL())
23 +
24 + <div class="col-md-6 col-lg-4 mb-3">
25 + <div class="instruction-card card shadow-sm border-0 rounded-3">
26 + <div class="card-accent-blue"></div>
27 + <div class="card-body p-3 text-center d-flex flex-column">
28 + <div class="icon-wrapper mb-2 mx-auto rounded-circle bg-primary bg-opacity-10">
29 + <img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBmaWxsPSIjMDA3YmZmIiBkPSJNNDgwIDI4OEMzMjAgMjU2IDE5MiAyNTYgMzIgMjg4Vjk2YzAtMzUuMyAyOC43LTY0IDY0LTY0aDMyMGMzNS4zIDAgNjQgMjguNyA2NCA2NHYxOTJ6TTMyIDMyMFY0MTZjMCAxNy43IDE0LjMgMzIgMzIgMzJoMzg0YzE3LjcgMCAzMi0xNC4zIDMyLTMyVjMyMGMtMTYwLTMyLTI4OC0zMi00NDggMHpNMzIwIDk2VjY0YzAtMzUuMy0yOC43LTY0LTY0LTY0cy02NCAyOC43LTY0IDY0djMyaDEyOHptLTY0IDMyYy0xNy43IDAtMzItMTQuMy0zMi0zMlY2NGMwLTE3LjcgMTQuMy0zMiAzMi0zMnMzMiAxNC4zIDMyIDMydjMyYzAgMTcuNy0xNC4zIDMyLTMyIDMyeiIvPjwvc3ZnPg==" alt="Документ охраны труда" style="width: 32px; height: 32px;">
30 + </div>
31 + <h5 class="card-title mb-2" style="font-size: 1.05rem; font-weight: 600; color: #333; line-height: 1.3;">$childTitle</h5>
32 + <p class="card-text text-muted mb-3 flex-grow-1" style="font-size: 0.85rem; line-height: 1.4;">Инструкция по безопасности труда</p>
33 + <a href="$childURL" class="btn btn-primary btn-sm rounded-pill" style="padding: 0.4rem 1.2rem; font-size: 0.9rem;">
34 + Открыть
35 + </a>
36 + </div>
37 + </div>
38 + </div>
39 + #end
40 + </div>
41 +
42 + <style>
43 + .instruction-card {
44 + transition: transform 0.3s ease, box-shadow 0.3s ease;
45 + background: white;
46 + border: 1px solid #e9ecef;
47 + min-height: 200px;
48 + display: flex;
49 + flex-direction: column;
50 + position: relative;
51 + overflow: hidden;
52 + }
53 + .instruction-card:hover {
54 + transform: translateY(-5px);
55 + box-shadow: 0 8px 20px rgba(0,123,255,0.2) !important;
56 + }
57 + .card-accent-blue {
58 + position: absolute;
59 + top: 0;
60 + left: 0;
61 + width: 100%;
62 + height: 4px;
63 + background: linear-gradient(90deg, #007bff, #0056b3);
64 + }
65 + .icon-wrapper {
66 + width: 50px;
67 + height: 50px;
68 + display: flex;
69 + align-items: center;
70 + justify-content: center;
71 + border: 2px solid rgba(0,123,255,0.15);
72 + }
73 + .bg-primary { background-color: rgba(0,123,255,0.1) !important; }
74 + .card-body {
75 + flex: 1;
76 + display: flex;
77 + flex-direction: column;
78 + justify-content: space-between;
79 + }
80 + .btn-primary {
81 + background-color: #007bff;
82 + border-color: #007bff;
83 + color: white;
84 + transition: all 0.3s;
85 + }
86 + .btn-primary:hover {
87 + background-color: #0056b3;
88 + transform: scale(1.05);
89 + }
90 + .row {
91 + display: flex;
92 + flex-wrap: wrap;
93 + margin: 0 -12px;
94 + }
95 + .col-lg-4 {
96 + flex: 0 0 33.3333%;
97 + max-width: 33.3333%;
98 + padding: 0 12px;
99 + }
100 + .col-md-6 {
101 + flex: 0 0 50%;
102 + max-width: 50%;
103 + padding: 0 12px;
104 + }
105 + .mb-3 {
106 + margin-bottom: 1rem;
107 + }
108 + @media (max-width: 1200px) {
109 + .col-lg-4 { flex: 0 0 50%; max-width: 50%; }
110 + }
111 + @media (max-width: 768px) {
112 + .col-lg-4, .col-md-6 { flex: 0 0 100%; max-width: 100%; }
113 + .instruction-card { min-height: 180px; }
114 + }
115 + </style>
116 + {{/html}}
117 +#else
118 + {{info}}В этом разделе пока нет инструкций. Создайте новую страницу через кнопку **Создать**.{{/info}}
119 +#end
120 +{{/velocity}}
121 +
122 +== Добавить новую инструкцию ==
123 +
124 +Для создания новой инструкции нажмите **Create** в меню выше и выберите родительское пространство **"Служба охраны труда"**.