Ticket #8163: admin_interface.diff
File admin_interface.diff, 8.3 KB (added by , 16 years ago) |
---|
-
admin/media/css/global.css
97 97 .module blockquote { margin-left:12px; } 98 98 .module ul, .module ol { margin-left:1.5em; } 99 99 .module h3 { margin-top:.6em; } 100 .module h2, .module caption { margin:0; padding:2px 5px 3px 5px; font-size:11px; text-align:left; font-weight:bold; background:#7CA0C7 url(../img/admin/default-bg.gif) top left repeat-x; color:white; }100 .module h2, .module caption, .inline-group h2 { margin:0; padding:2px 5px 3px 5px; font-size:11px; text-align:left; font-weight:bold; background:#7CA0C7 url(../img/admin/default-bg.gif) top left repeat-x; color:white; } 101 101 .module table { border-collapse: collapse; } 102 102 103 103 /* MESSAGES & ERRORS */ -
admin/media/css/forms.css
58 58 .vLargeTextField, .vXMLLargeTextField { width:48em; } 59 59 .flatpages-flatpage #id_content { height:40.2em; } 60 60 .module table .vPositiveSmallIntegerField { width:2.2em; } 61 .vTextField { width:20em; } 62 .vIntegerField { width:5em; } 61 63 62 64 /* x unsorted */ 63 .inline-group {padding:10px; padding-bottom:5px; background:#eee; margin:10px 0;} 64 .inline-group h3.header {margin:-5px -10px 5px -10px; background:#bbb; color:#fff; padding:2px 5px 3px 5px; font-size:11px} 65 .inline-related {margin-bottom:15px; position:relative;} 66 .last-related {margin-bottom:0px;} 67 .inline-related h2 { margin:0; padding:2px 5px 3px 5px; font-size:11px; text-align:left; font-weight:bold; color:#888; } 68 .inline-related h2 b {font-weight:normal; color:#aaa;} 69 .inline-related h2 span.delete {padding-left:20px; position:absolute; top:0px; right:5px;} 70 .inline-related h2 span.delete label {margin-left:2px; padding-top:1px;} 71 .inline-related fieldset {background:#fbfbfb;} 72 .inline-related fieldset.module h2 { margin:0; padding:2px 5px 3px 5px; font-size:11px; text-align:left; font-weight:bold; background:#bcd; color:#fff; } 65 .inline-group {padding:0; border:1px solid #ccc; margin:10px 0;} 66 .inline-group .aligned label { width: 7em; } 67 68 .inline-related {position:relative;} 69 .inline-related h3 {margin: 0; color:#666; padding:3px 5px; font-size:11px; background:#e1e1e1 url(../img/admin/nav-bg.gif) top left repeat-x; border-bottom:1px solid #ddd;} 70 .inline-related h3 span.delete {padding-left:20px; position:absolute; top:2px; right:10px;} 71 .inline-related h3 span.delete label {margin-left:2px; font-size: 11px;} 72 .inline-related fieldset {margin: 0; background:#fff; border: none; } 73 .inline-related fieldset.module h3 { margin:0; padding:2px 5px 3px 5px; font-size:11px; text-align:left; font-weight:bold; background:#bcd; color:#fff; } 73 74 .inline-related.tabular fieldset.module table {width:100%;} 75 .last-related fieldset {border: none;} 74 76 75 77 .inline-group .tabular tr.has_original td {padding-top:2em;} 76 78 .inline-group .tabular tr td.original { padding:2px 0 0 0; width:0; _position:relative; } -
admin/options.py
164 164 if isinstance(db_field, models.TimeField): 165 165 kwargs['widget'] = widgets.AdminTimeWidget 166 166 return db_field.formfield(**kwargs) 167 168 # For TextFields, add a custom CSS class. 169 if isinstance(db_field, models.TextField): 170 kwargs['widget'] = widgets.AdminTextareaWidget 171 return db_field.formfield(**kwargs) 172 173 # For URLFIelds, add a custom CSS class. 174 if isinstance(db_field, models.URLField): 175 kwargs['widget'] = widgets.AdminURLFieldWidget 176 return db_field.formfield(**kwargs) 177 178 # For IntegerFields, add a custom CSS class. 179 if isinstance(db_field, models.IntegerField): 180 kwargs['widget'] = widgets.AdminIntegerFieldWidget 181 return db_field.formfield(**kwargs) 167 182 183 # For TextInputs, add a custom CSS class. 184 if isinstance(db_field, models.CharField): 185 kwargs['widget'] = widgets.AdminTextInputWidget 186 return db_field.formfield(**kwargs) 187 168 188 # For FileFields and ImageFields add a link to the current file. 169 189 if isinstance(db_field, models.ImageField) or isinstance(db_field, models.FileField): 170 190 kwargs['widget'] = widgets.AdminFileWidget -
admin/widgets.py
208 208 209 209 def id_for_label(self, id_): 210 210 return self.widget.id_for_label(id_) 211 212 class AdminTextareaWidget(forms.Textarea): 213 def __init__(self, attrs={}): 214 super(AdminTextareaWidget, self).__init__(attrs={'class': 'vLargeTextField'}) 215 216 class AdminTextInputWidget(forms.TextInput): 217 def __init__(self, attrs={}): 218 super(AdminTextInputWidget, self).__init__(attrs={'class': 'vTextField'}) 219 220 class AdminURLFieldWidget(forms.TextInput): 221 def __init__(self, attrs={}): 222 super(AdminURLFieldWidget, self).__init__(attrs={'class': 'vURLField'}) 223 224 class AdminIntegerFieldWidget(forms.TextInput): 225 def __init__(self, attrs={}): 226 super(AdminIntegerFieldWidget, self).__init__(attrs={'class': 'vIntegerField'}) 227 No newline at end of file -
admin/templates/admin/edit_inline/stacked.html
1 1 {% load i18n %} 2 2 <div class="inline-group"> 3 <h2>{{ inline_admin_formset.opts.verbose_name_plural|title }}</h2> 3 4 {{ inline_admin_formset.formset.management_form }} 4 {# <h3 class="header">{{ inline_admin_formset.opts.verbose_name_plural|title }}</h3> #}5 5 {{ inline_admin_formset.formset.non_form_errors }} 6 6 7 7 {% for inline_admin_form in inline_admin_formset %} 8 8 <div class="inline-related {% if forloop.last %}last-related{% endif %}"> 9 <h 2><b>{{ inline_admin_formset.opts.verbose_name|title }}:</b> {% if inline_admin_form.original %}{{ inline_admin_form.original }}{% else %} #{{ forloop.counter }}{% endif %}9 <h3><b>{{ inline_admin_formset.opts.verbose_name|title }}:</b> {% if inline_admin_form.original %}{{ inline_admin_form.original }}{% else %} #{{ forloop.counter }}{% endif %} 10 10 {% if inline_admin_formset.formset.can_delete and inline_admin_form.original %}<span class="delete">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>{% endif %} 11 </h2>11 </h3> 12 12 {% if inline_admin_form.show_url %} 13 13 <p><a href="/r/{{ inline_admin_form.original.content_type_id }}/{{ inline_admin_form.original.id }}/">View on site</a></p> 14 14 {% endif %} -
admin/templates/admin/edit_inline/tabular.html
19 19 20 20 <tr class="{% cycle row1,row2 %} {% if inline_admin_form.original or inline_admin_form.show_url %}has_original{% endif %}"> 21 21 22 <td class="original">{% if inline_admin_form.original or inline_admin_form.show_url %}<p> 22 <td class="original"> 23 {% if inline_admin_form.original or inline_admin_form.show_url %}<p> 23 24 {% if inline_admin_form.original %} {{ inline_admin_form.original }}{% endif %} 24 25 {% if inline_admin_form.show_url %}<a href="/r/{{ inline_admin_form.original.content_type_id }}/{{ inline_admin_form.original.id }}/">View on site</a>{% endif %} 25 26 </p>{% endif %} … … 46 47 {% endfor %} 47 48 {% endfor %} 48 49 49 {% if inline_admin_formset.formset.can_delete %}<td class="delete">{% if inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }}{% endif %}</td>{% endif %} 50 {% if inline_admin_formset.formset.can_delete %} 51 <td class="delete">{% if inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }}{% endif %}</td> 52 {% endif %} 50 53 51 54 </tr> 52 55