Пример #1
0
        private string GetContent(Group @group)
        {
            var course   = group.Course;
            var location =
                _.List(StringUtils.AngleBrackets(
                           Url.ComplexLinkAnchor(group.Complex).AbsoluteHref().ToString()),
                       group.Complex.Address, Images.Common("metro.gif").ToString(),
                       group.Complex.Metro).JoinWith(" ");
            var content = H.div[
                Images.Main("logo-small.gif").Style("float:left;padding:5px;"),
                H.b[course.GetName()],
                H.br,
                StringUtils.RemoveTags(course.Description),
                H.br,
                H.b["По окончании курса Вы будете уметь:"],
                H.br,
                course.OnComplete,
                H.br,
                H.b["Продолжительность курса - {0} ак. ч."
                    .FormatWith(course.BaseHours.ToIntString())],
                H.br,
                H.b["Дата начала курса: "], group.DateBeg.DefaultString(),
                H.br,
                H.b["Место проведения: "], location,
                H.br,
                H.b["График занятий: "], group.DaySequence + " ",
                group.DayShift.GetOrDefault(x => x.Name) + " " + group.TimeInterval,
                H.br,
                H.b["Ссылка на курс: "],
                H.Anchor("/course/" + course.UrlName, course.GetName()).AbsoluteHref()
                          ].ToString();

            return(content);
        }
Пример #2
0
 private string GetCrudTitle(int id, string name, string title = null)
 {
     if (id > 0)
     {
         return("Редактирование " + name + " " + title.GetOrDefault(x => StringUtils.AngleBrackets(title)));
     }
     return("Создание " + name);
 }
Пример #3
0
        public ActionResult MetroBlock()
        {
            var complexes = GetComplexes();

            return(Content(Htmls2.Menu2("Комплексы у метро") +
                           Htmls2.MarkArrow(complexes.Select(x => Url.Locations()
                                                             .Complex(x.UrlName, StringUtils.AngleBrackets(x.Name) + " " + x.Metro)))));
        }
Пример #4
0
        public List <CertTextPosition> Adobe()
        {
            var row3 = 414;

            return(_.List(
                       Text(FullName, 400, 252, 14, "Arial", bold: true, center: true),
                       Text(CertName, 400, 334, 12, "Arial", bold: true, center: true),
                       Text(TrainerName, 400, row3, 10, center: true),
                       Text("CCT" + StringUtils.AngleBrackets("Specialist"), 158, row3, 10, center: true),
                       Text(Date.ToString("dd.MM.yy", CultureInfo.InvariantCulture), 640, row3, 10, center: true)));
        }
Пример #5
0
 public TagDiv MobileGroupLectures(List <GroupVM.LectureVM> lectures)
 {
     if (!lectures.Any())
     {
         return(null);
     }
     return(H.div.Id("groups")[
                lectures.Select(g => H.Div("group")[
                                    Url.Locations().Complex(g.Lecture.Group.Complex.UrlName,
                                                            l(span.Class("coursedate")[g.DateTimeInterval],
                                                              span.Class("courseplace")[
                                                                  "УК " + StringUtils.AngleBrackets(g.Lecture.Group.Complex.Name)]
                                                              ))])]);
 }
Пример #6
0
        private static string UpdateStatus(User user, Group g, string template)
        {
            var dateText  = GetDateText(g);
            var courseUrl = GetCourseUrl(g);
            var message   = TemplateEngine.GetText(template,
                                                   new {
                CourseName = StringUtils.AngleBrackets(g.Course.WebName),
                Date       = dateText,
                CourseUrl  = courseUrl
            });

            PostStatusUpdate(user, message);
            return(message);
        }
Пример #7
0
        private ActionResult GetBestResult(string fullName, string imageName,
                                           string name,
                                           string postfix = null)
        {
            var simplePage = new SimplePage {
                Title = "Свидетельство " +
                        StringUtils.AngleBrackets(name)
            };
            var model =
                Tuple.New(simplePage,
                          fullName, imageName);
            var certificateFileSys = UserImages.GetGraduateCertificateFileSys(imageName, fullName);

            if (!System.IO.File.Exists(certificateFileSys))
            {
                using (var image = Image.FromFile(UserImages.GetGraduateCertificateFileSys(
                                                      imageName, "default" + postfix))) {
                    ImageUtils.DrawFullNameStringBest(imageName, image, fullName).Save(certificateFileSys);
                }
            }
            return(View(ViewNames.BestStudent, CommonVM.New(model, model.V1.Title)));
        }
Пример #8
0
        public override object Get()
        {
            var parts        = ListUtils.Partition(Model.Students, x => Model.StudentInfos[x.StudentInGroup_ID].IsWebinar);
            var webinarList  = parts.Item1;
            var other        = parts.Item2;
            var webinarTable = GetTable("Вебинар", webinarList, 0, true);
            var otherTable   = GetTable("Очное обучение", other, webinarList.Count);
            var form         = AjaxForm(Url.Lms().Urls.UpdateLecture(null))[
                HiddenFor(x => x.Lecture.Lecture_ID),
                webinarTable,
                otherTable,
                Model.LectureEditStatus != LectureEditStatus.Nothing ? (object)bh.SubmitButton("Сохранить")
                .Style("margin-bottom:10px;").Id("button-lecture-edit") :
                bh.Warning("Сохранить изменения может только преподаватель {0} в день проведения занятия"
                           .FormatWith(StringUtils.AngleBrackets(Model.Lecture.Teacher_TC)))].Id("form-lecture-edit");

            var date       = Model.Lecture.TrainerComingTime;
            var group      = Url.Lms().Group(Model.Lecture.Group_ID, Model.Lecture.Group_ID);
            var comingTime = div[b["Время регистрации: "],
                                 date.HasValue ? date.Value.ToShortTimeString() : "не определено",
                                 b[" Группа: "], group,
                                 Model.Rating.GetOrDefault(x => b[" Служебный код: "]),
                                 Model.Rating.GetOrDefault(x => Anchor("#", x.Current).Class("not-link").Title(RatingText.FormatWith(x.Current, x.Max)).Data("toggle", "tooltip"))
                             ];
            var updateForm = Model.LectureEditStatus == LectureEditStatus.All ? UpdateForm() : null;

            return(div[
                       GetScript("/Scripts/Views/Lms/lectureeditview.js?v=6", "LectureEditView.init",
                                 Url.File().Urls.AddLectureFile(Model.Lecture.Lecture_ID)),
                       comingTime,
                       BootHtmls.Collapse(_.List(GetWebinarBlock())),
                       BootHtmls.Collapse(_.List(updateForm)).Style("margin-top:5px;"),
                       form,
                       BootHtmls.Collapse(_.List(UploadArchive(), FtpBlock())),
                       br,
                       LmsViews.SupportInfo,
                       h3[Url.Lms().LectureQuestionnaire(Model.Lecture.Lecture_ID, "Анкета преподавателя")]
                   ].Class("lecture-edit").Style("font-size:10px;"));
        }
Пример #9
0
        public ActionResult Videos(decimal groupId)
        {
//			var emails = _.List("*****@*****.**", "*****@*****.**", "*****@*****.**", "*****@*****.**");
//			if (!emails.Contains(User.Email)) {
//				return null;
//			}
            var r     = GroupVMService.HideVimeoGroupVideo(groupId);
            var hide  = r.Item1;
            var group = r.Item2;

            if (hide)
            {
                return(BaseViewWithTitle("Записи не доступны"));
            }
            var videoIds = AlbumVideoService.GetVideos(group.VimeoAlbumId);
            var videos   = InlineBaseView.New(new GroupVideosVM {
                Group = group
            },
                                              z => SiteHtmls.VimeoPlayers(videoIds, group.WbnRecPwd));

            return(BaseViewWithTitle(
                       "Записи " + StringUtils.AngleBrackets(group.Course.WebName),
                       new PagePart(videos)));
        }
Пример #10
0
        public static List <SimplePage> GetPrivatePerson()
        {
            /*var relation =
             *      new SimplePageRelation{IsMainParent = true, SimplePage =
             *      new SimplePage{UrlName = Urls.PrivatePerson, }};*/

            var privatePerson = new List <SimplePage> {
                new SimplePage {
                    UrlName = Urls.SuccessStories, Title = "Истории успеха"
                },
                new SimplePage {
                    UrlName = Urls.Responses, Title = "Отзывы слушателей о центре компьютерного обучения " +
                                                      StringUtils.AngleBrackets("Специалист")
                },
                new SimplePage {
                    UrlName = Urls.Works, Title = "Работы выпускников"
                },
            };

            /*foreach (var simplePage in privatePerson) {
             *      simplePage.SimplePageRelations.Add(relation);
             * }*/
            return(privatePerson);
        }
Пример #11
0
 private string GetTitle(TestVM model)
 {
     return("Тест " + StringUtils.AngleBrackets(model.Test.Name));
 }
Пример #12
0
 private string GetTitle(MyBusinessUser model)
 {
     return("Регистрация промокода " + StringUtils.AngleBrackets("Мое дело"));
 }
Пример #13
0
 public TagDiv MobileCourseGroups(List <Group> groups)
 {
     if (!groups.Any())
     {
         return(null);
     }
     return(H.div.Id("groups")[
                H.h3["Ближайшие группы:"], groups.Select(g => H.Div("group")[
                                                             Url.Link <CourseController>(c => c.Group(g.Group_ID),
                                                                                         l(span.Class("coursedate")[g.DateInterval],
                                                                                           span.Class("coursetime")[g.TimeInterval + ";" + g.DaySequence +
                                                                                                                    (g.IsOpenLearning ? ";Открытое Обучение" : "")],
                                                                                           span.Class("courseplace")[
                                                                                               "УК " + StringUtils.AngleBrackets(
                                                                                                   g.Complex.GetOrDefault(x => x.Name))],
                                                                                           Raw(Htmls2.Discount(g, true))))])
            ]);
 }
Пример #14
0
        public ActionResult MtsEmployee()
        {
            var model = new MtsEmployeeFormVM();
            var dates = MtsEmployeeFormVM.CourseTCList.ToDictionary(x => x,
                                                                    x => GroupService.GetGroupsForCourse(x).Select(y => y.DateInterval + " " +
                                                                                                                   StringUtils.AngleBrackets(y.Complex.Name) + " " + y.Complex.Address).Distinct()
                                                                    .Select(z => new { id = z, name = z }.As <object>()).ToList());

            model.Courses = CourseService.GetCourseLinkList(MtsEmployeeFormVM.CourseTCList, false).ToList();
            model.Dates   = dates;
            return(BaseView(Views.Center.MtsEmployeeForm, model));
        }
Пример #15
0
        private string GetGroupTitle(decimal groupID)
        {
            var courseName = GroupService.GetByPK(groupID).Title;

            return("Выпускники курса " + StringUtils.AngleBrackets(courseName));
        }