Skip to content

Commit

Permalink
fix: readonly field truncate (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvinclav committed Jun 13, 2024
1 parent feacc84 commit ba76987
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/unfold/templates/unfold/helpers/boolean.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load i18n %}

<div class="flex items-center ">
<div class="block mr-3 outline rounded-full h-1 w-1 {% if value == '' or value == None %}bg-gray-500 outline-gray-500/20{% elif value %}bg-green-500 outline-green-200 dark:outline-green-500/20{% else %}bg-red-500 outline-red-200 dark:outline-red-500/20{% endif %}"></div>
<div class="block mr-3 outline rounded-full ml-1 h-1 w-1 {% if value == '' or value == None %}bg-gray-500 outline-gray-500/20{% elif value %}bg-green-500 outline-green-200 dark:outline-green-500/20{% else %}bg-red-500 outline-red-200 dark:outline-red-500/20{% endif %}"></div>

<span>
{% if value == '' or value == None %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class="readonly font-medium max-w-2xl py-2 text-gray-500 text-sm dark:text-gray-400 *:rounded-md {% if not adminform.model_admin.compressed_fields or tabular and not field.is_image %}bg-gray-50 border px-3 rounded-md shadow-sm dark:border-gray-700 dark:bg-gray-800{% endif %} {% if field.is_image %}inline-block{% endif %} {% if field.is_json %}truncate whitespace-pre-wrap{% endif %}">{% if value %}{{ value }}{% elif field.contents %}{{ field.contents }}{% else %}-{% endif %}</div>
<div class="readonly font-medium max-w-4xl py-2 text-gray-500 text-sm truncate dark:text-gray-400 *:rounded-md {% if not adminform.model_admin.compressed_fields or tabular and not field.is_image %}bg-gray-50 border px-3 rounded-md shadow-sm dark:border-gray-700 dark:bg-gray-800{% endif %} {% if field.is_image %}inline-block{% endif %}">{% if value %}{{ value }}{% elif field.contents %}{{ field.contents }}{% else %}-{% endif %}</div>

0 comments on commit ba76987

Please sign in to comment.