0.2.3.5
- Fix sidebar category overflow
This commit is contained in:
parent
f2200754e8
commit
00f6427c57
4 changed files with 28 additions and 12 deletions
|
|
@ -40,8 +40,8 @@ class CategoryItem extends React.Component {
|
|||
</div>
|
||||
|
||||
<div className="category__info" onClick={() => this.handleSelect()}>
|
||||
<span>{this.props.category.name}</span>
|
||||
<span className="badge">{this.props.category.unread}</span>
|
||||
<span className="category__name">{this.props.category.name}</span>
|
||||
<span className="badge category__badge">{this.props.category.unread}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,35 @@
|
|||
from django.contrib import admin
|
||||
from django.db import models
|
||||
from django.forms import Textarea, TextInput, URLInput
|
||||
|
||||
from newsreader.news.core.models import Category, Post
|
||||
|
||||
|
||||
class PostAdmin(admin.ModelAdmin):
|
||||
list_display = ("publication_date", "author", "rule", "title")
|
||||
list_display = ("publication_date", "rule", "title")
|
||||
list_display_links = ("title",)
|
||||
list_filter = ("rule",)
|
||||
|
||||
ordering = ("-publication_date", "title")
|
||||
|
||||
fields = ("title", "body", "author", "publication_date", "url")
|
||||
fields = (
|
||||
"remote_identifier",
|
||||
"rule",
|
||||
"url",
|
||||
"title",
|
||||
"body",
|
||||
"publication_date",
|
||||
"author",
|
||||
)
|
||||
|
||||
search_fields = ["title"]
|
||||
readonly_fields = ("remote_identifier", "rule")
|
||||
search_fields = ("title", "author", "rule__name")
|
||||
|
||||
def rule(self, obj):
|
||||
return obj.rule
|
||||
formfield_overrides = {
|
||||
models.CharField: {"widget": TextInput(attrs={"size": "100"})},
|
||||
models.URLField: {"widget": URLInput(attrs={"size": "100"})},
|
||||
models.TextField: {"widget": Textarea(attrs={"rows": 10, "cols": 100})},
|
||||
}
|
||||
|
||||
|
||||
class CategoryAdmin(admin.ModelAdmin):
|
||||
|
|
|
|||
|
|
@ -14,16 +14,18 @@
|
|||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
|
||||
& h4 {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
&__name {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
&__menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue