Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Photo collection #24

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

Photo collection #24

wants to merge 24 commits into from

Conversation

erys
Copy link
Collaborator

@erys erys commented Jun 30, 2018

Adding photo collection, switched mic.png to a bigger version

erys added 24 commits May 19, 2018 23:16
…into idol-collection

adding updates from idol-model following review of idol-model pull request
…into idol-collection

merging in typo fix
… photo-model

merging idol model changes from master
… idol-collection

merging idol model from master
…s without breaking stuff, so taking it back out
@erys erys requested a review from db0company June 30, 2018 03:07

PHOTOS_EXCLUDE = [
'i_skill_type', 'i_leader_skill_stat', 'leader_skill_percentage', 'skill_note_count', 'skill_percentage', 'i_sub_skill_type', 'sub_skill_amount', 'sub_skill_percentage',
] + [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you have it in 2 concatenated lists instead of a single list? 🤔

title = _('Photo')
plural_title = _('Photos')
icon = 'cards'
navbar_title = _('Photos')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you don't need to specify the navbar title if it's the same as the plural title, it will just use it.

def to_fields(self, view, item, *args, **kwargs):
_photo_images = PHOTO_IMAGES.copy()
_photo_images.update({'color': '{static_url}img/color/{value}.png'.format(**{'value':item.color, 'static_url':RAW_CONTEXT['static_url']}),
'rarity': '{static_url}img/rarity/{value}.png'.format(**{'value':item.rarity, 'static_url':RAW_CONTEXT['static_url']})})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use staticImageURL in magi.utils here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants