/
base.html
347 lines (304 loc) · 10.1 KB
/
base.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
{% load i18n static %}
<!DOCTYPE html>
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl" {% endif %}>
<head>
<title> {% block title %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}">
{% block extrastyle %}{% endblock %}
{% if LANGUAGE_BIDI %}
<link rel="stylesheet" type="text/css"
href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}">{% endif %}
{% block extrahead %}{% endblock %}
{% block responsive %}
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" type="text/css" href="{% static "admin/css/responsive.css" %}">
{% if LANGUAGE_BIDI %}
<link rel="stylesheet" type="text/css" href="{% static "admin/css/responsive_rtl.css" %}">{% endif %}
{% endblock %}
{% block blockbots %}
<meta name="robots" content="NONE,NOARCHIVE">{% endblock %}
</head>
{% load i18n %}
<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}"
data-admin-utc-offset="{% now "Z" %}">
<!-- Container -->
<div id="container">
{% if not is_popup %}
<!-- Header -->
<div id="header">
<div id="branding">
{% block branding %}{% endblock %}
</div>
{% block usertools %}
{% if has_permission %}
<div id="user-tools">
{% block welcome-msg %}
{% trans 'Welcome,' %}
<strong>{% firstof user.get_short_name user.get_username %}</strong>.
{% endblock %}
{% block userlinks %}
{% if site_url %}
<a href="{{ site_url }}">{% trans 'View site' %}</a> /
{% endif %}
{% if user.is_active and user.is_staff %}
{% url 'django-admindocs-docroot' as docsroot %}
{% if docsroot %}
<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
{% endif %}
{% endif %}
{% if user.has_usable_password %}
<a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> /
{% endif %}
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
{% endblock %}
</div>
{% endif %}
{% endblock %}
{% block nav-global %}{% endblock %}
</div>
<!-- END Header -->
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
{% if title %} › {{ title }}{% endif %}
</div>
{% endblock %}
{% endif %}
{% block messages %}
{% if messages %}
<ul class="messagelist">{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message|capfirst }}</li>
{% endfor %}</ul>
{% endif %}
{% endblock messages %}
<!-- Content -->
<div id="content" class="{% block coltype %}colM{% endblock %}">
{% block pretitle %}{% endblock %}
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
{% block content %}
{% block object-tools %}{% endblock %}
{{ content }}
{% endblock %}
{% block sidebar %}{% endblock %}
<br class="clear">
</div>
<!-- END Content -->
<style>
/* #footer {
background: linear-gradient(#447e9b00, #447e9b90);
} */
/* .colMS {
margin-left: auto;
margin-right: auto;
} */
/* .dashboard #content {
width: 100%;
} */
/* td, th {
font-size: 24px;
line-height: 38px;
} */
/* .viewlink, .addlink, .changelink {
padding-left: 0;
padding-right: 40px;
background-position: 100% 1px;
background-size: contain;
}
.dashboard .module table td a {
padding-left: .6em;
padding-right: 40px;
} */
</style>
{% block footer %}<div id="footer">طراحی و ساخت:
مسعود عزیزی </div>{% endblock %}
</div>
<!-- END Container -->
{% comment %}
<script src="{% static "js/jquery2.min.js" %}"></script> {% endcomment %}
<script src="{% static "js/tree.js" %}"></script>
<link rel="stylesheet" href="{% static "css/persian-datepicker.min.css" %}" />
<script src="{% static "js/persian-date.min.js" %}"></script>
<script src="{% static "js/persian-datepicker.min.js" %}"></script>
<script type="text/javascript">
$(document).ready(function () {
var persian_date_picker_conf = {
"inline": false,
"format": "L",
"viewMode": "day",
"initialValue": false,
"maxDate": new persianDate().add('year', 1).valueOf(),
"minDate": new persianDate().subtract('year', 3).valueOf(),
"autoClose": false,
"position": "auto",
"altFormat": "LLLL",
// "altField": ".vDateFieldAlt",
"onlyTimePicker": false,
"onlySelectOnDate": true,
"calendarType": "persian",
"inputDelay": 0,
"observer": true,
"calendar": {
"persian": {
"locale": "en",
"showHint": false,
"leapYearMode": "algorithmic"
},
"gregorian": {
"locale": "en",
"showHint": false
}
},
"navigator": {
"enabled": true,
"scroll": {
"enabled": false
},
"text": {
"btnNextText": "<",
"btnPrevText": ">"
}
},
"toolbox": {
"enabled": true,
"calendarSwitch": {
"enabled": false,
"format": "MMMM"
},
"todayButton": {
"enabled": true,
"text": {
"fa": "امروز",
"en": "امروز"
}
},
"submitButton": {
"enabled": true,
"text": {
"fa": "تایید",
"en": "تایید"
}
},
"text": {
"btnToday": "امروز"
}
},
"timePicker": {
"enabled": false,
"step": 1,
"hour": {
"enabled": false,
"step": null
},
"minute": {
"enabled": false,
"step": null
},
"second": {
"enabled": false,
"step": null
},
"meridian": {
"enabled": false
}
},
"dayPicker": {
"enabled": true,
"titleFormat": "YYYY/MMMM/DD"
},
"monthPicker": {
"enabled": true,
"titleFormat": "YYYY/MMMM"
},
"yearPicker": {
"enabled": true,
"titleFormat": "YYYY"
},
"responsive": false
}
// $('.calendarlink0').hide();
$('.datetimeshortcuts').hide();//.html("<input type=\"text\" class=\"vDateFieldAlt\" class=\"date-icon\" title=\"یک تاریخ انتخاب کنید\"></span>");
$( '.vDateField' ).each(function( index ) {
persian_date_picker_conf.altField = $(this).get(0).id;
$(this).pDatepicker(
persian_date_picker_conf
);
});
});
</script>
<script>
$('body').on('DOMNodeInserted', 'select', function () {
$(this).select2();
});
$('#id_taghaza').on('change', function () {
var activeTaghaza = $('#id_taghaza').select2('data')[0].text;
var NotWanted = $('#id_aghlam').find("option:not(:contains('" + activeTaghaza + "'))");
NotWanted.prop('selected', false);
NotWanted.remove();
});
$('#id_aghlam').on('select2:opening', function () {
var activeTaghaza = $('#id_taghaza').select2('data')[0].text;
var NotWanted = $('#id_aghlam').find("option:not(:contains('" + activeTaghaza + "'))");
NotWanted.prop('selected', false);
NotWanted.remove();
var ao = $('#id_aghlam').find("option");
ao.prop('disabled', false);
var usedBefore = $('#id_aghlam').find("option:contains(' شماره فاکتور: ')");
// usedBefore.prop('disabled', true);
var usedHere = $('#id_aghlam').find("option:contains(' شماره فاکتور: " + $('#id_shomare').val() + "')");
usedHere.prop('disabled', false);
});
$('#id_aghlam').on('select2:select', function (evt) {
targetId = evt.params.data.id;
var targetUrl = "/aghlam/aghlam/" + targetId + "/change/?&_popup=1";
window.open(targetUrl, "popupWindow", "width=800,height=600,");
});
$("#recent-actions-module").hide();
$('#add_id_aghlam').hide();
$('.import_link').hide();
$('.export_link').html("<img title=\"خروجی اکسل\" style=\"display: block;\" width=\"20px\" src=\"{% static "excel.png" %}\"/>");
</script>
</body>
<style>
.select2-container .select2-selection--multiple .select2-selection__rendered {
white-space:normal;
}
input,.vIntegerField {
width: 20em;
}
select{
width:fit-content;
min-width: 20em;
}
input[type="checkbox"] {
width: 0px;
}
#id_tarikh__range__lte, #id_tarikh__range__gte, .controls > input:nth-child(1), .controls > input:nth-child(2) {
width: auto;
}
button {
background-color: Transparent;
background-repeat: no-repeat;
border: none;
cursor: pointer;
overflow: hidden;
outline: none;
background: 00000000;
border: 00000000;
color: #666;
}
#changelist-filter ul {
display: none;
}
div .module {
text-shadow: 0px 0px 1px rgba(0, 0, 120, 0.3);
}
.change-list .filtered .results,
.change-list .filtered .paginator,
.filtered #toolbar,
.filtered div.xfull {
margin-right: 0;
margin-left: 239px;
}
</style>
</html>