renderWeight = () => {
   if (this.props.weighted) {
     return (
       <div className="GradingPeriodList__period__attribute col-xs-12 col-md-8 col-lg-2">
         <span ref="weight">
           {I18n.t('Weight:')} {I18n.n(this.props.period.weight, {percentage: true})}
         </span>
       </div>
     )
   }
 }
示例#2
0
            title={I18n.t("Delete %{title}", { title: this.props.period.title })}
          >
            <span className="screenreader-only">
              {I18n.t("Delete %{title}", { title: this.props.period.title })}
            </span>
            <i className="icon-trash" role="presentation"/>
          </Button>
        );
      }
    },

    renderWeight() {
      if (this.props.weighted) {
        return (
          <div className="GradingPeriodList__period__attribute col-xs-12 col-md-8 col-lg-2">
            <span ref="weight">{ I18n.t("Weight:") } { I18n.n(this.props.period.weight, {percentage: true}) }</span>
          </div>
        );
      }
    },

    render() {
      return (
        <div className="GradingPeriodList__period">
          <div className="GradingPeriodList__period__attributes grid-row">
            <div className="GradingPeriodList__period__attribute col-xs-12 col-md-8 col-lg-4">
              <span ref="title">{this.props.period.title}</span>
            </div>
            <div className="GradingPeriodList__period__attribute col-xs-12 col-md-8 col-lg-2">
              <span ref="startDate">{I18n.t("Starts:")} {DateHelper.formatDateForDisplay(this.props.period.startDate)}</span>
            </div>