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

Make admin page smartphone friendly #225

Merged
merged 1 commit into from Dec 23, 2016

Conversation

Projects
None yet
3 participants
@morygonzalez
Copy link
Member

commented Dec 23, 2016

Lokka の管理画面をスマートフォンから見やすくしました。小さいディスプレイからのアクセスのときはサイドメニューを非表示にして Dashboard にサイドメニューの内容を表示するようにしています。大きいディスプレイ(パソコンなど)からアクセスしたときの表示は変えていません。

ダッシュボード:
img_1943
記事一覧:
img_1944
入力画面:
img_1945

%td= link_to t('edit'), url("/admin/users/#{user.id}/edit"), :class => 'button'
%td
- unless user == current_user
= link_to t('delete'), url("/admin/users/#{user.id}"), :class => 'button', :confirm => t('are_you_sure'), :method => :delete

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Line is too long. [136/80]

%td.name= link_to user.name, url("/admin/users/#{user.id}/edit")
%td= user.email
%td= l(user.created_at, :format => :long)
%td= link_to t('edit'), url("/admin/users/#{user.id}/edit"), :class => 'button'

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Line is too long. [87/80]

%th= t('user.created_at')
%th(colspan="2")
- @users.each_with_index do |user, i|
%tr{:class => (i + 1).odd? ? 'odd' : 'even'}

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

%th= t('user.name')
%th= t('user.email')
%th= t('user.created_at')
%th(colspan="2")

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))

%tr{:class => (i + 1).odd? ? 'odd' : 'even'}
%td.title= link_to "#{tag.name}(#{tag.taggings.count})", url(tag.link)
%td= link_to t('edit'), url("/admin/tags/#{tag.id}/edit"), :class => 'button'
%td= link_to t('delete'), url("/admin/tags/#{tag.id}"), :class => 'button', :confirm => t('are_you_sure'), :method => :delete

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Line is too long. [133/80]

- @tags.each_with_index do |tag, i|
%tr{:class => (i + 1).odd? ? 'odd' : 'even'}
%td.title= link_to "#{tag.name}(#{tag.taggings.count})", url(tag.link)
%td= link_to t('edit'), url("/admin/tags/#{tag.id}/edit"), :class => 'button'

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Line is too long. [85/80]

%th= t('tag.name')
%th(colspan="2")
- @tags.each_with_index do |tag, i|
%tr{:class => (i + 1).odd? ? 'odd' : 'even'}

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

%table.tags
%tr
%th= t('tag.name')
%th(colspan="2")

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))

%td= l(snippet.created_at, :format => :long)
%td= l(snippet.updated_at, :format => :long)
%td= link_to t('edit'), snippet.edit_link, :class => 'button'
%td= link_to t('delete'), url("/admin/snippets/#{snippet.id}"), :class => 'button', :confirm => t('are_you_sure'), :method => :delete

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Line is too long. [141/80]

%th= t('snippet.updated_at')
%th(colspan="2")
- @snippets.each_with_index do |snippet, i|
%tr{:class => (i + 1).odd? ? 'odd' : 'even'}

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

%th= t('snippet.body')
%th= t('snippet.created_at')
%th= t('snippet.updated_at')
%th(colspan="2")

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))

@@ -5,6 +5,7 @@
%meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
%meta(http-equiv="Content-Style-Type" content="text/css")
%meta(http-equiv="Content-Script-Type" content="text/javascript")
%meta(name="viewport" content="width=device-width")

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))

@@ -4,6 +4,7 @@
%meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
%meta(http-equiv="Content-Style-Type" content="text/css")
%meta(http-equiv="Content-Script-Type" content="text/javascript")
%meta(name="viewport" content="width=device-width")

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Prefer the hash attributes syntax (%tag{ lang: 'en' }) over HTML attributes syntax (%tag(lang=en))

%ul
%li.list= link_to t('sites'), url('/admin/site/edit')
%li.list= link_to t('permalink.title'), url('/admin/permalink')

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Files should end with a trailing newline

%td= l field_name.created_at.to_time
%td= l field_name.updated_at.to_time
%td
= link_to t('delete'), url("/admin/field_names/#{field_name.id}"), :class => 'button', :confirm => t('are_you_sure'), :method => :delete

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Line is too long. [144/80]

%th= t('field_name.updated_at')
%th
- @field_names.each_with_index do |field_name, i|
%tr{:class => (i + 1).odd? ? 'odd' : 'even'}

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Dec 23, 2016

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

@morygonzalez morygonzalez force-pushed the morygonzalez:smartphone-friendly-admin branch from 78e6d1a to d3ef4e4 Dec 23, 2016

@komagata

This comment has been minimized.

Copy link
Member

commented Dec 23, 2016

@morygonzalez 素晴らしいです!

@komagata komagata merged commit 96aff81 into lokka:master Dec 23, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
hound 23 violations found.

morygonzalez pushed a commit to morygonzalez/lokka that referenced this pull request Jan 5, 2017

morygonzalez pushed a commit to morygonzalez/lokka that referenced this pull request Feb 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.