Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
V
VietTH-VenShop
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 4
    • Merge Requests 4
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Tran Hoang Viet
  • VietTH-VenShop
  • Merge Requests
  • !1

Merged
Opened Jul 02, 2015 by Tran Hoang Viet@vietth 
  • Report abuse
Report abuse

VietTH: Feature display items

  • Discussion 10
  • Commits 3
  • Changes
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Tran Hoang Viet @vietth

    Reassigned to @lannn

    Jul 02, 2015

    Reassigned to @lannn

    Reassigned to @lannn
    Toggle commit list
  • Tran Hoang Viet @vietth

    Reassigned to @giangttd

    Jul 02, 2015

    Reassigned to @giangttd

    Reassigned to @giangttd
    Toggle commit list
  • Tran Hoang Viet @vietth

    Reassigned to @lannn

    Jul 02, 2015

    Reassigned to @lannn

    Reassigned to @lannn
    Toggle commit list
  • Tran Hoang Viet @vietth

    Added 1 commit:

    • a29c7bbd - VietTH: Update convention
    Jul 03, 2015

    Added 1 commit:

    • a29c7bbd - VietTH: Update convention
    Added 1 commit: * a29c7bbd - VietTH: Update convention
    Toggle commit list
  • Nguyen Ngoc Lan
    @lannn started a discussion on an old version of the diff Jul 03, 2015
    app/views/categories/_recommended.html.haml 0 → 100644
    1 - items.each do |product|
    • Nguyen Ngoc Lan @lannn commented Jul 03, 2015
      Developer

      @vietth in this case, product is an item, right? So, it is not consistent. If "items" change to "products" or all is "item" it will be better meaning

      Edited Jul 03, 2015
      @vietth in this case, product is an item, right? So, it is not consistent. If "items" change to "products" or all is "item" it will be better meaning
    Please register or sign in to reply
  • Nguyen Ngoc Lan
    @lannn started a discussion on an old version of the diff Jul 03, 2015
    app/views/categories/_recommended.html.haml 0 → 100644
    1 - items.each do |product|
    2 .product-item.col-md-4.text-center
    3 .product-title
    4 = link_to product.title, product_path(product)
    5 .product-image.img-thumbnail
    6 %img{src: product.image_md_url}
    • Nguyen Ngoc Lan @lannn commented Jul 03, 2015
      Developer

      @vietth The code look better if you use "image_tag"

      @vietth The code look better if you use "image_tag"
    Please register or sign in to reply
  • Nguyen Ngoc Lan
    @lannn started a discussion on an old version of the diff Jul 03, 2015
    app/views/categories/_recommended.html.haml 0 → 100644
    1 - items.each do |product|
    2 .product-item.col-md-4.text-center
    3 .product-title
    4 = link_to product.title, product_path(product)
    • Nguyen Ngoc Lan @lannn commented Jul 03, 2015
      Developer

      @vietth You can use short way: product equal product_path(product)

      @vietth You can use short way: product equal product_path(product)
    Please register or sign in to reply
  • Nguyen Ngoc Lan
    @lannn started a discussion on an old version of the diff Jul 03, 2015
    app/views/categories/_category.html.haml 0 → 100644
    1 %li
    2 = link_to category.decorate.title, category_path(category)
    • Nguyen Ngoc Lan @lannn commented Jul 03, 2015
      Developer

      @vietth you can use: category equal to category_path(category)

      @vietth you can use: category equal to category_path(category)
    Please register or sign in to reply
  • Nguyen Ngoc Lan
    @lannn started a discussion on an old version of the diff Jul 03, 2015
    app/views/home/index.html.haml 0 → 100644
    1 .module
    2 %h3.title Recommended Items
    3 .module
    4 #recommend-items
    5 = render '/categories/recommended', items: @recommended_items
    • Nguyen Ngoc Lan @lannn commented Jul 03, 2015
      Developer

      @vietth you can remove "/categories/" because this view is in context of "categories" directory

      @vietth you can remove "/categories/" because this view is in context of "categories" directory
    Please register or sign in to reply
  • Nguyen Ngoc Lan
    @lannn started a discussion on an old version of the diff Jul 03, 2015
    app/views/layouts/application.html.haml 0 → 100644
    4 = stylesheet_link_tag 'application', media: 'all'
    5 = javascript_include_tag 'application'
    6 = csrf_meta_tags
    7
    8 %body
    9 %nav.navbar.navbar-inverse.navbar-fixed-top
    10 .container-fluid
    11 = render '/layouts/header'
    12
    13 #wrapper.container-fluid
    14 .row
    15 .col-md-6.search-wrapper
    16 = render '/layouts/search'
    17 .row
    18 .col-md-12
    19 = render 'layouts/breadscrum'
    • Nguyen Ngoc Lan @lannn commented Jul 03, 2015
      Developer

      @vietth typo error: "breadcrumb"

      @vietth typo error: "breadcrumb"
    Please register or sign in to reply
  • Nguyen Ngoc Lan
    @lannn started a discussion on an old version of the diff Jul 03, 2015
    config/initializers/constant.rb 0 → 100644
    1 LIMIT_CATEGORY = 5
    • Nguyen Ngoc Lan @lannn commented Jul 03, 2015
      Developer

      @vietth Is it hard to find these constants? It is better if you have a config file to put these constants. You can use figaro or settinglogic (https://github.com/binarylogic/settingslogic)

      @vietth Is it hard to find these constants? It is better if you have a config file to put these constants. You can use figaro or settinglogic (https://github.com/binarylogic/settingslogic)
    Please register or sign in to reply
  • Nguyen Ngoc Lan
    @lannn started a discussion on the diff Jul 03, 2015
    db/migrate/20150702054917_create_categories.rb 0 → 100644
    1 class CreateCategories < ActiveRecord::Migration
    2 def change
    3 create_table :categories do |t|
    4 t.timestamps null: false
    5 t.string :node_id
    6 t.string :title
    • Nguyen Ngoc Lan @lannn commented Jul 03, 2015
      Developer

      @vietth For database integrity. It is good for constraining fields like: t.string :title, null: false

      @vietth For database integrity. It is good for constraining fields like: t.string :title, null: false
    Please register or sign in to reply
  • Nguyen Ngoc Lan
    @lannn started a discussion on the diff Jul 03, 2015
    app/models/category.rb 0 → 100644
    1 class Category < ActiveRecord::Base
    2 default_scope ->{ order(:title) }
    • Nguyen Ngoc Lan @lannn commented Jul 03, 2015
      Developer

      @vietth lack of validations

      @vietth lack of validations
    Please register or sign in to reply
  • Nguyen Ngoc Lan
    @lannn started a discussion on an old version of the diff Jul 03, 2015
    app/models/product.rb 0 → 100644
    1 class Product < ActiveRecord::Base
    2 scope :recommended, ->{ self.offset(rand(self.count)).limit(LIMIT_PRODUCT_RECOMMENDED) }
    • Nguyen Ngoc Lan @lannn commented Jul 03, 2015
      Developer

      @vietth lack of validations

      @vietth lack of validations
    Please register or sign in to reply
  • Tran Hoang Viet @vietth

    Added 1 commit:

    • bb3a4f79 - VietTH: Fix review and feedback code
    Jul 03, 2015

    Added 1 commit:

    • bb3a4f79 - VietTH: Fix review and feedback code
    Added 1 commit: * bb3a4f79 - VietTH: Fix review and feedback code
    Toggle commit list
  • Tran Hoang Viet @vietth

    Added 1 commit:

    • da86792c - VietTH: Fix review and feedback code
    Jul 03, 2015

    Added 1 commit:

    • da86792c - VietTH: Fix review and feedback code
    Added 1 commit: * da86792c - VietTH: Fix review and feedback code
    Toggle commit list
  • Tran Hoang Viet @vietth

    Status changed to merged

    Jul 06, 2015

    Status changed to merged

    Status changed to merged
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Nguyen Ngoc Lan
Assignee
Nguyen Ngoc Lan @lannn
Assign to
None
Milestone
None
Assign milestone
Time tracking
3
3 participants
Reference: vietth/VietTH-VenShop!1